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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.46-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

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

tdjson-1.8.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.46-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.46-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f0ebbefa0452db37d1cc299cb632c2897ffe7f5369c64182182a52bd541f0a3
MD5 938f77f0127b68922262b807650ca3cf
BLAKE2b-256 89e6397a19b25eb038ba906bcdb190196a636d0cbd696be36ea99c888afd19b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.46-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fbbab80c4b814546a71dbcda028d7da874fabe1081fea29f9799f1b6cd6d5ee
MD5 3f15c741a5955c1ef7276fbbb5a23512
BLAKE2b-256 5732647aa7901bee9fec020dfd8ab1e8f3febeb970dc6e91c973a8686b3f6932

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15e324adf3eab8b483eb6c588b1019a507d0b7069f8b4384a3b8b0abffd31463
MD5 4c084f2e75966efdc8a37b2f3d972001
BLAKE2b-256 1e65e68629b3ad9744e7346b0a3e9c030fbc70dbdf2ffaf9666aa36fcc84064c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6cb17b25aecf5ce218df60b822f40d09432cd6a8f4ae464542d5326339384f1c
MD5 d1e8884db2349f2d6b99bbd96f49c0b2
BLAKE2b-256 7cc99eb80588a63fa9f16d35fec5b3b9e1086c7332e12c9d33f663502bda968b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.46-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61019ad2686e175b6d088d00b5b0662a0c0ca58965aabace7e9b75d8a6a5eb62
MD5 ed299c901df0c526e569ab98c4234df4
BLAKE2b-256 ab046f841793e43cf685731d76c9fb3b6a3126d9f46fa5985896259d49f4bfe8

See more details on using hashes here.

Provenance

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