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

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

tdjson-1.8.53-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

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

tdjson-1.8.53-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tdjson-1.8.53-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tdjson-1.8.53-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for tdjson-1.8.53-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a971020aac1142220990112d8fd1144d4257c14c1a4d109cbee30701d21c3df2
MD5 064bd27a151bf4f86d0940ee96324734
BLAKE2b-256 a8503916a1b13c505af3e0d52a0a91714fb5c4c186b66646358110f62004cdbe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.53-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4ebf8fdcb23be4116296510ce10e7cd5b2439a23e24579ae0770bbd086e50007
MD5 ec2c761b6d7d0c58a68c71f5457b399e
BLAKE2b-256 9f8e706195f3e95509787c7d8777894fb7e59d8f6685e3c73d335de7037821b3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.53-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 14f7e2c4cf98ce2362eb79cb1de66f03bddd6c5682188bfc5ee1efd7da7273ba
MD5 6f70d2faefeb6010e0fec41ab440b1dc
BLAKE2b-256 c87badc043db6b0114893b8852eff4d0dd48014dc2806042c976167633b51cb0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.53-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 1b6cc640f3f6fb286151d6515e682bc60a436431f9d2ae18da35ef56ce2e6ded
MD5 75546a6c0f204b77a13e738f5b78b9b2
BLAKE2b-256 980e86c7a27e899b7d99202fc02c8b80224df128bebdc6df9a681dc8d3530c82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tdjson-1.8.53-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 95d904752147e72032b3a53af6845e72d860eebe965f156c07b4f5b67a31ac19
MD5 2d7c7315e6f092bdf24809d868045024
BLAKE2b-256 b5804db18b1e57c7740fc9529aef920f7f702557e1267b852064fe302e56315f

See more details on using hashes here.

Provenance

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