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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.50-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 MB view details)

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

tdjson-1.8.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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.50-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tdjson-1.8.50-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8012639904331d8e9f3bbcd40a2f0ac8e6715699a7f023247a868604338eb4f9
MD5 d5ccf5c5c46744103381950f8be4c600
BLAKE2b-256 014287e19e9bcf0943959eaf4fb1e77f2dd158ade9e5e8b889bbefeca15df440

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.50-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b5a57cf789f56c72ea20cd9dc1e194e6c68f47e8d75f82db5fafbfaff037136
MD5 12ed607a39f28b27e74841ba7552f708
BLAKE2b-256 423507e2eb4d022958d8523c79fea2186a7395aa86e0f907eac84d44f52e1f1a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab8600bc0d519f0ff8b99cb10d898a024ce261611ae5b33eba963032805c5309
MD5 c1e77b303194da0af0de829d63dcdf7c
BLAKE2b-256 17381a6f95119b50e407082271fcb0143ac76ee4d81a8f9c9ff97ef2b705bcec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b550b3802c967f4c14a56a5b55694372645f20878547d80d6a13880431cc3235
MD5 892104e65b9ecc650e3158f7f5ada310
BLAKE2b-256 a4fb58d7b1b2c75eedaa8570ac34ece91dfad7b73fcbf5a3afa1f1c1cbecbb54

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdd73b07acd1d7ef42809ed2a53cc6271a0b8d620c968541cbc5dd00a4207bc9
MD5 98885fe3c802bc5f2dd69dcd7f650381
BLAKE2b-256 7172397fa702c0a6b5efce66cf4fc83353bbb15cdc2beaa1423189ec4623eb2b

See more details on using hashes here.

Provenance

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