High-performance Python binding for TDLib JSON interface. Works on Linux x86_64, includes pre-built TDLib, and outperforms python ctypes
Project description
tdjson

tdjson is a high-performance Python binding for TDLib's JSON interface. Outperforms ctypes, and includes TDLib for easy setup and use. Mainly created for Pytdbot
Compatibility
tdjson is compatible with almost all Linux x86_64 distributions that use glibc 2.17+. This includes most modern Linux distributions:
- Debian 8+
- Ubuntu 13.10+
- Fedora 19+
- RHEL 7+
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))
# 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"]}))
print(result)
For more detailed examples, check out the examples folder.
License
MIT LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tdjson-1.8.49-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tdjson-1.8.49-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.13t, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d678db751d1046b0649dbf7012fe7a0d5e328d4ad6375a36d905fb33f71a608
|
|
| MD5 |
ee688bc747882cfdba8cbf16016f2181
|
|
| BLAKE2b-256 |
903e2ef18c0e4b32b13f13485b4fb226cd74c70f78df365f3a91637ca578cbc2
|
Provenance
The following attestation bundles were made for tdjson-1.8.49-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build_wheels.yml on AYMENJD/tdjson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tdjson-1.8.49-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
7d678db751d1046b0649dbf7012fe7a0d5e328d4ad6375a36d905fb33f71a608 - Sigstore transparency entry: 208736582
- Sigstore integration time:
-
Permalink:
AYMENJD/tdjson@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AYMENJD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tdjson-1.8.49-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tdjson-1.8.49-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0812ac7366ab8d2fe722398ff60a88a6f0f9c5d103c068c3fa29a9c704aab01
|
|
| MD5 |
9f24533bfd3b112ac1a66d4e92b2a674
|
|
| BLAKE2b-256 |
6005ec15a6757c8e3563b93be11dab1ef87b7d1acf564d7769bab7fc79f5ba97
|
Provenance
The following attestation bundles were made for tdjson-1.8.49-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build_wheels.yml on AYMENJD/tdjson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tdjson-1.8.49-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
d0812ac7366ab8d2fe722398ff60a88a6f0f9c5d103c068c3fa29a9c704aab01 - Sigstore transparency entry: 208736580
- Sigstore integration time:
-
Permalink:
AYMENJD/tdjson@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AYMENJD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tdjson-1.8.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tdjson-1.8.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1170d70c76aaf81b1e06d8f7418b5b418a07098a4451b48cba6fb499b4b819
|
|
| MD5 |
50c99d2b18d6405df2edc07ddac85ea3
|
|
| BLAKE2b-256 |
1fdefd999a3c15059eb7d8cb9118663c3388573bb4f62f9d41d5186c204867e7
|
Provenance
The following attestation bundles were made for tdjson-1.8.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build_wheels.yml on AYMENJD/tdjson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tdjson-1.8.49-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
fe1170d70c76aaf81b1e06d8f7418b5b418a07098a4451b48cba6fb499b4b819 - Sigstore transparency entry: 208736581
- Sigstore integration time:
-
Permalink:
AYMENJD/tdjson@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AYMENJD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tdjson-1.8.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tdjson-1.8.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceec70a0dd76c2bffb5fd9e7fea225ff4bfc537df3d4fb9446f1a5985bae4fd8
|
|
| MD5 |
1c284f671568a2ccfac50ce451680961
|
|
| BLAKE2b-256 |
6ae58f48734932d5eb8af15add8dc2b69f3a2ada0b4a19c03d397bfda31eb3c0
|
Provenance
The following attestation bundles were made for tdjson-1.8.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build_wheels.yml on AYMENJD/tdjson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tdjson-1.8.49-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
ceec70a0dd76c2bffb5fd9e7fea225ff4bfc537df3d4fb9446f1a5985bae4fd8 - Sigstore transparency entry: 208736587
- Sigstore integration time:
-
Permalink:
AYMENJD/tdjson@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AYMENJD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tdjson-1.8.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tdjson-1.8.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00314783c74ace0d26fdcfbfc49f6ce1ef9339b616efca0f2ca52738eccf66f0
|
|
| MD5 |
c66c377550d950e0676b2cd2e3dbdf97
|
|
| BLAKE2b-256 |
192ceea6ea8b3ec78021b4eacb921aa2e054d0159331b1e8a04ca4de0f7590e0
|
Provenance
The following attestation bundles were made for tdjson-1.8.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build_wheels.yml on AYMENJD/tdjson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tdjson-1.8.49-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
00314783c74ace0d26fdcfbfc49f6ce1ef9339b616efca0f2ca52738eccf66f0 - Sigstore transparency entry: 208736585
- Sigstore integration time:
-
Permalink:
AYMENJD/tdjson@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AYMENJD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@1c0e68ab6ec8920fbc3b4de48f485daa95495b1c -
Trigger Event:
workflow_dispatch
-
Statement type: