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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.55-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.1 MB view details)

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

tdjson-1.8.55-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.55-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.55-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.55-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a21c386fb4585f9a48c3594ce70d736cebad3ef14719a1faf5bbd9706ce4daf0
MD5 52cebb69801a5bb64aa9de215255808f
BLAKE2b-256 2f289d3b6b028ce8693543402f67127fe0a3045a38f6c99524517594a5df3299

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.55-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 676d817384ef599cfb6080ef9736768b7dbba48e62b502034e0bfe816b8ace03
MD5 bf6970120f503d11e7c9e8e8fe95425f
BLAKE2b-256 ac48c90668757db058660e057252f20f0782df7c92453c553bce762ad05b7953

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.55-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9b45b4e1365df7c3edbff43708c5d4e38f0c0f3e03e43e4bf906dc6f08b970cb
MD5 05052642218076265d462befe9cf3ef4
BLAKE2b-256 62b364b6a5316dea21b8f7cb81f6a925443489422b88d430f85a4ad859fe7d95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.55-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 af54c9f3c1d95d29f414355d1c662997470420b253ef7fce81e3cbb43f618579
MD5 49532dcd4b9658c7f940d75c9225d98c
BLAKE2b-256 542a417b53f97e38b18fe37bee87cb99bb1dea1b4a7c477af816bbef1ff76e61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.55-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3d91f1dfebf7928d8fdab02c0028501aa1cd299ad6218677899f72a4a406666d
MD5 c5a9a7bb34763cbcb265f88767f64833
BLAKE2b-256 9015a8415cd0bb7fd509b994405de419ea6cb324a2f9e89adba89e323a2a888e

See more details on using hashes here.

Provenance

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