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

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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

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

tdjson-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-0.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d857243832e43d16a2e4f9d74ccd1527b30990b4b683a36a2409d790d80096c
MD5 dabedc518cbed8a121c860ead7a0700f
BLAKE2b-256 117c7eae4b392ca260272aadc9930e06c047a00ab84fb182a2840b8e97ff3bea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f13cc01c4ece48f174b4dd3fbe18a5d08bf8b729297a23d72cc035ef2a017cf
MD5 cf5922e94e8e875234a8aabae688cfe0
BLAKE2b-256 eb5706edc4aad7b83c16a47e183bec38ee6ec15147e7f561f99ec5dc17430553

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6212a5995cc02f2ba8adfe937eee08aa0a25d758e0fb3ed02c54165a0fd181cb
MD5 956e9cfa638d0e93f640c89ccb98667f
BLAKE2b-256 6e959a0f11bdd95b448c5727c6dac28d29de11cf10434170163b2e25d0a25240

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 546a1b64c7e062b0f85f8b789593ff35fad61ffe6998db2459526b0e37168658
MD5 ab9b7df2d930ce0a5f9abd928ce12cb1
BLAKE2b-256 47b44d853cffbf8cc9df684a739abd738672e21717e876052b6ab98e5d5b6672

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6dff965ad09aaab5068d11304bebefa18fae8b8c737c43de15f76168cc629eb3
MD5 1d55786ecbda4bcb4f1785c8e5bb7e19
BLAKE2b-256 6a66a4aa6080602886d62713077f9b62133b2441c950cd276a834da3d28ce4f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tdjson-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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