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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.49-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

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

tdjson-1.8.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.49-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d678db751d1046b0649dbf7012fe7a0d5e328d4ad6375a36d905fb33f71a608
MD5 ee688bc747882cfdba8cbf16016f2181
BLAKE2b-256 903e2ef18c0e4b32b13f13485b4fb226cd74c70f78df365f3a91637ca578cbc2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.49-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0812ac7366ab8d2fe722398ff60a88a6f0f9c5d103c068c3fa29a9c704aab01
MD5 9f24533bfd3b112ac1a66d4e92b2a674
BLAKE2b-256 6005ec15a6757c8e3563b93be11dab1ef87b7d1acf564d7769bab7fc79f5ba97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.49-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fe1170d70c76aaf81b1e06d8f7418b5b418a07098a4451b48cba6fb499b4b819
MD5 50c99d2b18d6405df2edc07ddac85ea3
BLAKE2b-256 1fdefd999a3c15059eb7d8cb9118663c3388573bb4f62f9d41d5186c204867e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.49-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceec70a0dd76c2bffb5fd9e7fea225ff4bfc537df3d4fb9446f1a5985bae4fd8
MD5 1c284f671568a2ccfac50ce451680961
BLAKE2b-256 6ae58f48734932d5eb8af15add8dc2b69f3a2ada0b4a19c03d397bfda31eb3c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.49-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00314783c74ace0d26fdcfbfc49f6ce1ef9339b616efca0f2ca52738eccf66f0
MD5 c66c377550d950e0676b2cd2e3dbdf97
BLAKE2b-256 192ceea6ea8b3ec78021b4eacb921aa2e054d0159331b1e8a04ca4de0f7590e0

See more details on using hashes here.

Provenance

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