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+.
    • Includes most modern distributions like:
      • Debian 8+
      • Ubuntu 13.10+
      • Fedora 19+
      • RHEL 7+
  • Windows (x86_64)

    • Windows 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).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-cp313-cp313t-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.13tWindows x86-64

tdjson-1.8.59-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-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-cp312-abi3-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.12+Windows x86-64

tdjson-1.8.59-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-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-cp311-cp311-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.11Windows x86-64

tdjson-1.8.59-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-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-cp310-cp310-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.10Windows x86-64

tdjson-1.8.59-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-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-cp39-cp39-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.9Windows x86-64

tdjson-1.8.59-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-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: tdjson-1.8.59-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.13t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tdjson-1.8.59-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 c453ef7933acf666faa2a827297396f2ea71436bf5fabc21507833e328d1db23
MD5 4440fbb1224be534c609ff376fea4664
BLAKE2b-256 add0769a734cfaa5a10443f49d77bde5bc079e8d2a43ed3aa0cd1f48effafd5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 eaa8270c9a73b15b8d99b3100e96ba0253d7ccc7322be080911e8f5636b97561
MD5 c9511dac0b2b9d22a78b1f7ddebb9e11
BLAKE2b-256 08e0451864f726906e525fab08524c96b61ef6d85fffd3eea9677e9995c80624

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 9fe51c220435f62c3589b5ee63e0297504c879983f7ae22001b4a485a3cad2db
MD5 dd8e373638cb31ae4a15d5aea259b2c5
BLAKE2b-256 6d66b7ef24de5475c090db4bcd0411566a29b26b3ec139928ca590cc53502aa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: tdjson-1.8.59-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tdjson-1.8.59-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 070f9da83ed047c310ccb416a384675328e8d633f16fdf54d07de2e341790f58
MD5 d9e156ec8871709618f3adb17aeab1a6
BLAKE2b-256 cbec988e9f18f03c4acbb53498b8684e7725a84fb2c581cccf616ab9c772dcdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0b0ffc27e56ba96ec85c040cb665316ae269e446388ca61d533024c15310e44d
MD5 57bd170eb4ad4f7d37e3c29d7d4e6ca1
BLAKE2b-256 6b06430d8a91d711e56d91a0f0b0f15802cbeba68b751135017648acbd128e48

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 62f1b909d76dfca26aac1217ed978cb6f8fcd6ab2cd1d1b6d38720e5e8e3d10e
MD5 7e55beb2fea0a95a71d0cc413ada4e12
BLAKE2b-256 77581424be22fbc4780e47f408f0387c01104594429665a1a1395c7532008d73

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tdjson-1.8.59-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tdjson-1.8.59-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 09eee7ba552544da7e0798765b3a39230d845201e25736e8f3445bb934711a78
MD5 eda7a5e9389d97afc126aa6f4331e727
BLAKE2b-256 eeb8908201527226e0a8a41659a6f8ed42f9280d29cf72d01097ca968bdcdc40

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 451dc3d8e2d7627d6a024b4f21d7041b0d549059ecaec6f22fb276648fd31bf2
MD5 acf1233af72ef9fa81e19fc126cbad49
BLAKE2b-256 a9d3d9b5d15bebc6f6d3fd5fcd0ed718bcabfeb8ad20567de431b0fe2aede4f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 4c22ae48924708c4a48e8e1ae149428bf409ddd7aa6b0b50c38f60cf40b751eb
MD5 ec9a9fc85389c8fa1f13cb099cd5946f
BLAKE2b-256 7dd277319d1457a842181b476feef2723bb61268d493fd487b5f7d83ed3a81ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tdjson-1.8.59-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tdjson-1.8.59-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0017a96ebefecbc07a0360462c80d6dc627b9e8ce292117b4c017defad9b6f8f
MD5 63c45625c452ac9049b0bb864a61382a
BLAKE2b-256 395fd13369f0d724bc0714a4f5bbbc821116a12dc74c721cae709cddbea042b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a47dfa964e92b8b20c810a11b370a03e15406fc973813dc44cc65f5374acf1e7
MD5 e3e6db139e02a9475d4af0e45e0f8c6f
BLAKE2b-256 bcbbf796c7a2b04b44aa0bf1cf8d7b3e7280fc1c5ada59ae61f29b0bfc3b8918

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c24b6b244a195b5ef8378449b1a4f010b64e0baa30be874d9116b704c0cc6d34
MD5 f6f2ce1846b6d85cfc7e8268af148264
BLAKE2b-256 7a0226c184dc42de838d414f9f61e61fe7dfe361835452871e4601330857336a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: tdjson-1.8.59-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tdjson-1.8.59-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 732ea5da5937174aead4e1bdd863117b47571c090825c551bc62fd8c82b48cad
MD5 30f52dc9333ad8de9d124b2ffbcdea16
BLAKE2b-256 154120a81cb8b3b6cc6d22ff97bbd236fff5702a23ed8dd5ad1c8d2120c298a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a33a29232de0fd8fb1c9e4cb69744f2ae6414826de1f1b0c83e741ef06e47962
MD5 3c324ef36d2de093cf9d446eaf7ee858
BLAKE2b-256 abad8c8ac367ab5cd59943e15c623b726e33f82fc5592e54744f7d5500d3eb5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.59-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 cbd0f03a251de22718d8d7f9648373315dc208b5581b5d1b367024e0f4f0d06b
MD5 65b1ce00a84477f97dbed302663fed13
BLAKE2b-256 2659099568fa5002ab09b7ebdfc56d7f02b6d8759b0e367670524aaa1c4885a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-1.8.59-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.

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