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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.52-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.4 MB view details)

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

tdjson-1.8.52-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.52-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.52-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.52-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d0fabfc868b0047c948ca924fa39e1c56b9c996255cf7787c36f30afc360c925
MD5 3ca580d88bcb986591e4351de3185bbe
BLAKE2b-256 d5a4192015ac482b1eac0572008cbbbc46e28822307a8546842f6fc0ba2506b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.52-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 404d93f46fc9307f633667d737062e9760218e2ad10eff808e5030fa5f546270
MD5 d38c32e81aabe722872f0ab6f3dec128
BLAKE2b-256 09f450a3249b2479cf269ea780cc2f10d6624375b29a7756bf2488553fb1c023

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.52-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3bbcabc0fc3631c89a4b2a90d42ca9b8b5a245c73738830311feba6f614f6f53
MD5 889b7f0aa33f1b4aa272380317b4c374
BLAKE2b-256 f6552d53dadbe341a72fb5e4103e3d5adafd807ec1d6511e4692c44ff7f3dbba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.52-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3d5e8cfa45e7c2c27d8dcb511597376dcf618f9ba6992ff2ff1c0a7335c9de85
MD5 e9a90df1436860027cc60b5ad4ce4aea
BLAKE2b-256 79ac059af41dcae7d861122ed895fc24c5aacdf65238b217e529ff55dcb6d661

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.52-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 337ea2795363b64e0fe4ffcbe0a01a615d1788d9045fec89cf78e8be9e0ca5ba
MD5 4cbeeab4a88d4d240c4bae8cb32768e3
BLAKE2b-256 dcd8d587972cb8389122ca7dce041b5f2fb75710ee61170497de57b3e0f042fb

See more details on using hashes here.

Provenance

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