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.58.post2-cp313-cp313t-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.13tWindows x86-64

tdjson-1.8.58.post2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.58.post2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

tdjson-1.8.58.post2-cp312-abi3-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.12+Windows x86-64

tdjson-1.8.58.post2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

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

tdjson-1.8.58.post2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

tdjson-1.8.58.post2-cp311-cp311-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.11Windows x86-64

tdjson-1.8.58.post2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.58.post2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

tdjson-1.8.58.post2-cp310-cp310-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.10Windows x86-64

tdjson-1.8.58.post2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.58.post2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

tdjson-1.8.58.post2-cp39-cp39-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.9Windows x86-64

tdjson-1.8.58.post2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

tdjson-1.8.58.post2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

Details for the file tdjson-1.8.58.post2-cp313-cp313t-win_amd64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 1b00f4c21a91baccf53e8eaedf73cc3d42a0f63e667b7e0e0a1c953ff95f2131
MD5 68b2cb6dcb404f7eec19e95586a99647
BLAKE2b-256 85dd20652ca60eec5fcaacd31608dc3f9b63e1d1a2c3d58abc3bc17e50ef4346

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f0a8e27c41ddd7ba700111c0eff0830e2b5f74001d3062a075cc615afe8d8a56
MD5 e66b21977ce73f40d76b73911bd8c113
BLAKE2b-256 563e6eae60d4fcb488584f20c7e4343e11baaeef2a3d640e14b55cac0e21b708

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 66fe422ba97a145f27a47c85b799832f39dea190bad932c4b7a87df52c579d0f
MD5 e5c2819dc9059c88e85c79b7c123014b
BLAKE2b-256 b7b00f70348b291604b752a657bd585cbed01749508c766a2d2795fef9a1fdad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5373d8db6386dc1ec81c2152dfe02834c53678d1aa206058e890be7ce63b7596
MD5 837e6046e93839d7916dd113d9abf85e
BLAKE2b-256 031084a3e33633400687e0821f585300bb60c594933aeca98023e676faaa4714

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5cd13d64ed8b4039b42491a28d6d84bceb5a01c496a94f7205848e01678d0a1d
MD5 d7ba51893aeaf01a3bd9ce587f6d4c2b
BLAKE2b-256 00c958b5e9874d24a830f3f33970cf794c1498219db249c591cb20ac375c25c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 091671e02e991b49fd77d850e6e9149367607b180caf2ae094bc3bd8dc1c5891
MD5 d6dc50b88cc547c327874d9b1a0dfbde
BLAKE2b-256 d9a814000e1f84b728e1deaa01002fb214bc219b6d3dcc38befdf57ce477f5c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14aeb658d2d43691104c679c88343b796e160c4e9d72ac13002af03996f9e068
MD5 410cce420f2746fa30dbdb640e918ec6
BLAKE2b-256 4e395b73b811baca289e7b7e58c95d2cd3bab62d01338c973494720bd652d201

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 53c94d5eba47d37ff438c5187c58858e7d7b8f13582ceaf534e1ed98f9de5141
MD5 8dbd0dd6829714a458e13c81e0dd762c
BLAKE2b-256 d150e3dfebbb02d0c147ee49754e83b57f081361f0f54d098f14e542df447483

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 4b4446dc76f28f4b606663d36113fa1a8480a2ce49447d47fad509bd6cac172e
MD5 b3484d2de4025e4cea80e0d03b495bf3
BLAKE2b-256 0631db5b370cead20d0e3df2d8b5e2d42c8d59cb12f0bdc40e2c01fbb12637f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 18a8ef61f93db4605abaf55868daa7f9704b705c215a0ccef3c98345f62ac808
MD5 ee4edc9a1fc6331ec4d24ec38ca1661c
BLAKE2b-256 4325b2d639d66e6c8e8370f2aa881f3ee65989d6a0c7f6615327a242481733a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9d5673b957c6e69b2164f5470353c59508a925adc76441a5cd8612081928bae1
MD5 2901477ed42841bd45ad093a34d8b9c4
BLAKE2b-256 7d327b1f5062e2f53649ebc5d7ae4b87a93afbafa4fc4b8a0cfe6c6a01a37e64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c5169c114824dfec8de945d4ab48dd70f6a49617bb2c95a2f9c1a2f7d905686b
MD5 786049003e42126d3561a6a5338371da
BLAKE2b-256 00ff7df1cbf50e0da1c30444e4da364e36edc4c00641ef0849717e156bda5ea4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2c0173d388d67d57db8d3c0ff804c353684df4471f04f5213ee32bc4af347ea2
MD5 3353951108fd7cc910de97b1c537311a
BLAKE2b-256 eb78284e099e4ac8ef9f804fc1027a98dc20fa90fa623a08f5786b3935839da3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5bdbaad78f0bafc1f64b360966e7275572f94245d3c77e1b04d35c679c15ea18
MD5 2bae0b8d9df45c1a08eeae7df30841eb
BLAKE2b-256 93150222530131cbb0c345e22a1a04cb01eebec5d4d3a56a50898ba3732a4060

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.58.post2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0581a4ab84d4aa3e2c1dd78cae0f242192f996e06fedff9e5c6572cf465c9eda
MD5 a282318d6f9f5e3ad0ffc9abb9d2eae8
BLAKE2b-256 08c1a1621ce8ec777c2f5a7b939ce2f4a1b138d00369dd9b9892c88bec16815a

See more details on using hashes here.

Provenance

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