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.56.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.56.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.2 MB view details)

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

tdjson-1.8.56.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.56.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.56.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.56.post1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 bd1e5092f614ab9efab31d1aeedac6b60be1429efdba410bbad99da1a11809b0
MD5 cd5392e1b312fb13d8998a797d0ae497
BLAKE2b-256 ed8f8ad211bfbefbc03ee34080d3ee6bb085a6cfaa1dce27e0c799204bb83f6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.56.post1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 33f0b445bc194f8d99e5ea8644bdcb9f0c82f2eda10eb47dca195f5b4ade8ed5
MD5 f74624d34334f79e3c3947745fe414de
BLAKE2b-256 39172dc7d4bc9b0a8f5f1ab769fd1fe3e22f416ea6160a597e894dbf63fae66b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.56.post1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9e98290d0f6c5d0c4a2112e1879e9b82c24a5ab9be1047e6f5be3a927e55d380
MD5 5c30594bff2fbecb4c01c87f566ec6c9
BLAKE2b-256 32fe41ee78f4bb9d4605dbbd5e4a5dcad559da3ae25ac2aa61d75989c9338b5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.56.post1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4b2b936ac907b10d8708c0b6e1aed442bcebcd2548454011db83ca872dedffa6
MD5 db424c262e2371d9413eda1b97e1c2da
BLAKE2b-256 684f23d0c290a24e79bc50d1c3744824f728d1a829bbcc3bd8bd3c4b5760529f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.56.post1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c8a7965aa2a7142cb0975cd9cd64a16c1d2096ad1ce99754ed4574c2a9b71d42
MD5 4ca768292b9e8844863d7bcfb0809c6c
BLAKE2b-256 067e2f667942a586eb09ba4f67d349a124b1bbb6a1c463c5b376f82ca6280a43

See more details on using hashes here.

Provenance

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