Skip to main content

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

Project description

tdjson Version TDLib version Downloads

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


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.54-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.54-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

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

tdjson-1.8.54-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.54-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.54-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.54-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 09ef70aa5dcb82db894b5d4eefba9b92e2377b811cf8bc3843a453a12e246ecc
MD5 c1d6c26c213b9001b12d76c549c81e25
BLAKE2b-256 4706443ca5abda5ece947a5019f8a8c656e368107832467960f32b41d964ab08

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.54-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3ea05e312aa071d18bdc4415573f941b9a7e7f058a747acb1fdd7facd48336d7
MD5 09f81578b821ad5c740a83e361d57fd7
BLAKE2b-256 232a30e17ab22d5045298a85ae75921275b2735605fd597aa8147ec3c6e2db94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.54-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f01cec5692482e6046f99dfe3bd6d6eed1484b59f22cb2fac07cc20ddd757b9c
MD5 3e2dc39ea019452f4b574992c9e4b4fa
BLAKE2b-256 ff5e474e4333a2f8b9035502d569e0fdf67c84157b7ec5a647be398c196609f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.54-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d45f5063f08923ec41907b4ff5f7b909770271b8fd23b6ec3c94d81ce7f4aa2a
MD5 4ef5e834b345a5609b8ff3a95f452dfd
BLAKE2b-256 5ee8f7f22becd4af1929707ea20a2c3a3ce4be268cd79a82365a8e127b5fd542

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.54-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3d5ef1e2d576e026e1bf5e36e76640df5dc2af87e19ab07bbcee9aa744390c8a
MD5 028ba979a711a54dad8056307b802e1a
BLAKE2b-256 01a5c1f7a6d96fa55c699d518aec3a42e47e9ba81c1d3b6fd0cf8030f50f3880

See more details on using hashes here.

Provenance

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

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