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.51-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.51-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.51-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.51-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.51-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

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.51-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c0aed7fb8596b4c261e2e809b7abf8b8051cd027179c7278c2f5951b2f87d3e9
MD5 94b32e29172bc4f093f173f06721f2c0
BLAKE2b-256 5b45e3dd6a02774be98eb2cd8d2727f8a10d9c2c500160aebcfac5abba86e991

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.51-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 babc2d4ed2e742e685c88c3b3381696469ea7960ee3b71cdb7ca68b9c3655e5d
MD5 9d6255d43dc397da3faf2b47bb49570a
BLAKE2b-256 09c06f88e2962a580ece5b2782fd29e81c55fb8bd7c605a0bdde5a8084d0e84d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.51-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c996682def9e991808a9e471e0f5cba46e518c9fcc2b610da60862067e8544de
MD5 c2912640479abf001c9da9f7656fda8e
BLAKE2b-256 0973b2b90f9d3ddbe48d889cbdba70c671bdc10f5be6dd1ee475b6eda7609731

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.51-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9c73fa36223ece9ed252499f2ea8f025c254c240cb92d5e468dc48dcf41989e7
MD5 fa4c2ff0f576885c365a6801e9785651
BLAKE2b-256 7c78cb7097552bee24a542007e8bdbe0033fba58621dd02ee19332372221704a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.51-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0febf9b5b66bd692c885383acc9447952aaaa62473a47aa174074dd90f5251ac
MD5 65abd3e0f0e1a920b61911b4fa2f5baf
BLAKE2b-256 7a62e2953dd2247b14aef04e701f6f4a744e5b828e4c4cfcae570d32cdf1e78f

See more details on using hashes here.

Provenance

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