Skip to main content

A high-performance Python binding for TDLib, outperforming ctypes and bundling pre-built binaries for effortless setup on Linux and Windows

Project description

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

Buy me a Cup of TON

Compatibility

tdjson is compatible with the following platforms:

  • Linux (x86_64 and aarch64)

    • Requires glibc 2.17+.
    • Debian 8+, Ubuntu 13.10+, Fedora 19+, RHEL 7+
  • Windows (x86_64) — Windows 7+

  • macOS (aarch64) — 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tdjson-1.8.59.post1-cp313-cp313t-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.13tWindows x86-64

tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

tdjson-1.8.59.post1-cp313-cp313t-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

tdjson-1.8.59.post1-cp312-abi3-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.12+Windows x86-64

tdjson-1.8.59.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

tdjson-1.8.59.post1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

tdjson-1.8.59.post1-cp312-abi3-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

tdjson-1.8.59.post1-cp311-cp311-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.11Windows x86-64

tdjson-1.8.59.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.59.post1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

tdjson-1.8.59.post1-cp311-cp311-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tdjson-1.8.59.post1-cp310-cp310-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.10Windows x86-64

tdjson-1.8.59.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.59.post1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

tdjson-1.8.59.post1-cp310-cp310-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tdjson-1.8.59.post1-cp39-cp39-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.9Windows x86-64

tdjson-1.8.59.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

tdjson-1.8.59.post1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

tdjson-1.8.59.post1-cp39-cp39-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file tdjson-1.8.59.post1-cp313-cp313t-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 2196a3fcd35ad7caa7c1397c992eb1e34f87d28039f42fd6527a56d776b3dbb8
MD5 b217bfb7de02a0635e0ec3e15d0f9e71
BLAKE2b-256 13a77e03ba470108a5d06ec1d2c427fab49d85bfb077b3fa71ba432eceaa0b6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp313-cp313t-win_amd64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 253299a7ea7384bb900f0c350abc2c2ee61dd7208e903a797d9714d2584815b7
MD5 fd775df66e3630f11839958ac950b5a0
BLAKE2b-256 ff29661e1196d1d7fd952fb3ac4d7070c3c6f99c95f72a219aa4eeaeb85648b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 88158c155c04e1f391b715276517c2f9b257831dafe256c75a2c2db75791860c
MD5 51d9e50b3e53093f8f8845a8db07074e
BLAKE2b-256 febd7d6476be9553b66e75169acd6376f432778ca8a1429f7546feeb1980ffb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17dacb5285d1178dd7d2ff235045161ed755195bf6b48b71c1217e5416c72e4e
MD5 54212360727bd69efaf63f19b8bac185
BLAKE2b-256 86ef6665ea3274676a333e435ff11c1e6ed0c5c8c47dbb20a8160ca65537bdeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp313-cp313t-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0e3f709e33c2b0fbb22c836396c70806aa1250d93533dc8a2321f801b3bf354a
MD5 7b5b07c8e804ec114da43548073f4277
BLAKE2b-256 6ff41070267d1a7d321bae48c35665995d909a3e8b79363e46a538ba46ca8a79

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp312-abi3-win_amd64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 91460ae7948b07fd44aceef793fec8cb04cf14e1b9a865171834e2158b5ee3cc
MD5 55931d8f86d312be80a4f311e7272118
BLAKE2b-256 78dc03f1efddbb34dc76dfbcba1bea8f01b0c1a67d7f4012e6a9e1e22a4b3879

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 b70f0a98485898424eff10c83357bda99ddc86360439680c55156be1a65b2b7b
MD5 4c07808dcb438fa2b8ff55f357ebcaa8
BLAKE2b-256 ccf609f9fdf89d66138b38e7855d4af33d37a8a84a6be4bcc15ccc42752e492f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9b9de01f03d56ac53a54a24d7e72527a5590fa5fad33e4aaca2490e3d219660
MD5 ffe522bf9de83a5388c32419cb2724be
BLAKE2b-256 da038e8ae6d452d7b53c5831b1086fa3ba598ac7ccd5c91e36e75ba7750b7875

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 804fd30203aa1f575fe386e77e971c564e76f3f26d50f407a92f51f4980b64bc
MD5 738d95117901b5e5e2e1ac45403b86b0
BLAKE2b-256 303507111f1b2f5a830fad336594e0b4c1a0466d01d837f5023f6466f6a7fadf

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cfd75a64f1182c7086b9e01957771a8e11be5790673001fc2bed3cf1a332545c
MD5 2c4a3bbd18b13f5e76c6b730d6c75975
BLAKE2b-256 a665a4319b0e589d5c2bed79665e0d9255cc69273c40eb51a51573a3f5193338

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 98f647d55ea308b21da315197151f6baf55bbd4c56f5aac40139f9e5050d82d5
MD5 5ed00e0adda2214d87264a779166d700
BLAKE2b-256 83a6dd610ca0b4966546dfe0faa6f560345ec27491752b0e34ba5f7b6089ad06

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc7b65a7fd37d11e1adc91353c043d69772211985e24567a24a3ea74a07c9ea6
MD5 cf52f187376b9f45708ffcf64176a740
BLAKE2b-256 78e5330efb59612117d41feebeb1b1c509882dd8baaad25448de00713d682936

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eec345de48022a3da8ed55dc49276788480f2652c5c698d4d483133699efbe94
MD5 f7273c0b8f517755c2b48ded1c6902dd
BLAKE2b-256 8d4a0bea9a52b2921d1507eab4e9dc682a849407989d02d9732b2f0a01935d9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 437d2bea701f9d5d79ae880bcccb808a930393c27aab7354faeffd59b0cb22ce
MD5 db5e2db42efa4c2d04ead3b94ac5c9c2
BLAKE2b-256 b4443d2d79ea730e1bded57cbb14e02b92393112e991d0a771eb5a7ceb3fa300

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 d48de91ae1e7ec579dc4d1508212259fd58cd296f4b197c7597a4a1586558d9e
MD5 81048a1437147d7bae31a15aed1fea7e
BLAKE2b-256 91e48a0c337b5d5b6bc11aee8e15b60ea7f77742b7a0348bcdf2abc0c5b8359b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70b3aa5727de1f18b9380a073cdf365b2805bd8f5e29b6915631cf3cc04ea17c
MD5 00120df462b384d364fc53a11eb9005e
BLAKE2b-256 d5b743d8f6525325564333f8497283b9c3b2cfa779cf7601a35b427e94ad25b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 522cdd1ac65e22d52eae8fb5bf806e2e68b487c79611fb1b86e6e98ed7adac40
MD5 c52d0ee3806a57734f497c12a8afa626
BLAKE2b-256 d3b9a90834eb0a73ec133f6acf95eeda71768570a0a4aae3ad318c663131c3a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp39-cp39-win_amd64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 84b1c7f2a5694a3d7b20464a73c3367de09428123aabda1798b50b702dc33ba5
MD5 fcb55a1eca77d2e336e4e4b61c346859
BLAKE2b-256 97b7c8277e41d16ba32803375ed29f2e8380bf2fc7b8f8026ce40ca4e2898686

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 8fdbc67264050cca546d78a2fa96ad535ee8e6c2b8f54c982d990977a723d079
MD5 2148369557b45effb4fc8e041c1e093d
BLAKE2b-256 a62235a741dd6538be2473a7f24d4678c2be70969cf0248eacf52232c638acb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tdjson-1.8.59.post1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59.post1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f8bc974f68c65d56695346135ec771b2c9a204bcab9d6a90067c0f92abd3c1c
MD5 cecee7da908bfaeb7b9a59f80fd66743
BLAKE2b-256 b775f97d01464aafaf076f172532a4564728c54df45e90530dd36627ee12277a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59.post1-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on AYMENJD/tdjson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page