SkillAgentSearch skills...

Tdjson

High-performance Python binding for TDLib JSON interface

Install / Use

/learn @AYMENJD/Tdjson
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

tdjson Version TDLib version Python Compatibility Downloads

tdjson is a high-performance Python binding for TDLib JSON interface.

By bundling pre-built TDLib binaries, it eliminates the effort for manual compilation and offers performance advantage over traditional ctypes wrappers, making it a reliable core for projects like Pytdbot

<a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=1&c=You+deserve+a+Cup+of+TON+for+tdjson%2521" target="_blank" rel="noopener"> <img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;"> </a>

Compatibility

tdjson is compatible with the following platforms:

  • Linux (x64 and ARM64) — Debian 8+, Ubuntu 13.10+, Fedora 19+, RHEL 7+

  • Windows (x64) — Windows 7+

  • macOS (M-series) — macOS 11+

Installation

You can install tdjson directly from PyPI:

pip install tdjson

Usage

Here’s a quick example to get you started:

import json
import tdjson

# Create a new TDLib client
client_id = tdjson.td_create_client_id()

# Send a request to TDLib
request = {"@type": "getOption", "name": "version"}
tdjson.td_send(client_id, json.dumps(request).encode("utf-8"))

# Receive updates or responses
response = tdjson.td_receive(10.0)
print(response)

# Synchronously execute a TDLib request
result = tdjson.td_execute(
    json.dumps(
        {
            "@type": "getTextEntities",
            "text": "@telegram /test_command https://telegram.org telegram.me",
            "@extra": ["5", 7.0, "a"],
        }
    ).encode("utf-8")
)
print(result)

For more detailed examples, check out the examples folder.

License

MIT LICENSE

Related Skills

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated8d ago
Forks3

Languages

C++

Security Score

95/100

Audited on Mar 22, 2026

No findings