tdjson


Nametdjson JSON
Version 1.8.56.post2 PyPI version JSON
download
home_pageNone
SummaryHigh-performance Python binding for TDLib JSON interface. Works on Linux x86_64, includes pre-built TDLib, and outperforms python ctypes
upload_time2025-10-26 03:49:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords tdlib telegram python-binding high-performance linux
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tdjson [![Version](https://img.shields.io/pypi/v/Tdjson?style=flat&logo=pypi)](https://pypi.org/project/Tdjson) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.56-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/tdjson?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/tdjson)

`tdjson` is a high-performance Python binding for [TDLib](https://github.com/tdlib/td)'s JSON interface. Outperforms `ctypes`, and **includes** `TDLib` for easy setup and use. Mainly created for [Pytdbot](https://github.com/pytdbot/client)

## 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:

```bash
pip install tdjson
```

## Usage

Here’s a quick example to get you started:

```python
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](https://github.com/AYMENJD/tdjson/blob/main/examples) folder.

## License

MIT [LICENSE](https://github.com/AYMENJD/tdjson/blob/main/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tdjson",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "tdlib, telegram, python-binding, high-performance, linux",
    "author": null,
    "author_email": "AYMEN Mohammed <let.me.code.safe@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# tdjson [![Version](https://img.shields.io/pypi/v/Tdjson?style=flat&logo=pypi)](https://pypi.org/project/Tdjson) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.56-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/tdjson?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/tdjson)\n\n`tdjson` is a high-performance Python binding for [TDLib](https://github.com/tdlib/td)'s JSON interface. Outperforms `ctypes`, and **includes** `TDLib` for easy setup and use. Mainly created for [Pytdbot](https://github.com/pytdbot/client)\n\n## Compatibility\n\n`tdjson` is compatible with almost all Linux `x86_64` distributions that use `glibc 2.17+`. This includes most modern Linux distributions:\n\n- Debian 8+\n- Ubuntu 13.10+\n- Fedora 19+\n- RHEL 7+\n\n## Installation\n\nYou can install `tdjson` directly from PyPI:\n\n```bash\npip install tdjson\n```\n\n## Usage\n\nHere\u2019s a quick example to get you started:\n\n```python\nimport json\nimport tdjson\n\n# Create a new TDLib client\nclient_id = tdjson.td_create_client_id()\n\n# Send a request to TDLib\nrequest = {\"@type\": \"getOption\", \"name\": \"version\"}\ntdjson.td_send(client_id, json.dumps(request))\n\n# Receive updates or responses\nresponse = tdjson.td_receive(10.0)\nprint(response)\n\n# Synchronously execute a TDLib request\nresult = tdjson.td_execute(json.dumps({\"@type\": \"getTextEntities\", \"text\": \"@telegram /test_command https://telegram.org telegram.me\", \"@extra\": [\"5\", 7.0, \"a\"]}))\nprint(result)\n```\n\nFor more detailed examples, check out the [examples](https://github.com/AYMENJD/tdjson/blob/main/examples) folder.\n\n## License\n\nMIT [LICENSE](https://github.com/AYMENJD/tdjson/blob/main/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "High-performance Python binding for TDLib JSON interface. Works on Linux x86_64, includes pre-built TDLib, and outperforms python ctypes",
    "version": "1.8.56.post2",
    "project_urls": {
        "Source": "https://github.com/AYMENJD/tdjson",
        "Tracker": "https://github.com/AYMENJD/tdjson/issues"
    },
    "split_keywords": [
        "tdlib",
        " telegram",
        " python-binding",
        " high-performance",
        " linux"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b8c49051258bfe7e7ed980473a59301980fde71d850f1334d3cebaa4b84ffa70",
                "md5": "1e71477299fb21602111bb251ab57d49",
                "sha256": "9766f1024c47e934bfb9272fae42cdec6c934f4720cf602ecd9cacbc0076b585"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "has_sig": false,
            "md5_digest": "1e71477299fb21602111bb251ab57d49",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 15994096,
            "upload_time": "2025-10-26T03:49:08",
            "upload_time_iso_8601": "2025-10-26T03:49:08.095959Z",
            "url": "https://files.pythonhosted.org/packages/b8/c4/9051258bfe7e7ed980473a59301980fde71d850f1334d3cebaa4b84ffa70/tdjson-1.8.56.post2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b8f9d58a7c079dfc6d17b93f25a2d0cd0cb56130e4d99bee1a49cc138eb50c55",
                "md5": "578f4b888e6fbf0970d47f8bc0152d39",
                "sha256": "aef4f6e3a4f879c7959afebfb86feb934ffd8dd23a0ab3488b8592c29cb47bb2"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "578f4b888e6fbf0970d47f8bc0152d39",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 16211249,
            "upload_time": "2025-10-26T03:49:10",
            "upload_time_iso_8601": "2025-10-26T03:49:10.472841Z",
            "url": "https://files.pythonhosted.org/packages/b8/f9/d58a7c079dfc6d17b93f25a2d0cd0cb56130e4d99bee1a49cc138eb50c55/tdjson-1.8.56.post2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c2e58d4ae121624acbd7e7b0fa44102d5b8211c651d60ed1712041ac013d364d",
                "md5": "4bd87c49ab47e7c5d1270f93af1e725e",
                "sha256": "c416b95258597c37cfcc81ef046d7f345e8ad0abcee46b8ac2d50ef1cdbeec05"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "has_sig": false,
            "md5_digest": "4bd87c49ab47e7c5d1270f93af1e725e",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 15994110,
            "upload_time": "2025-10-26T03:49:12",
            "upload_time_iso_8601": "2025-10-26T03:49:12.981864Z",
            "url": "https://files.pythonhosted.org/packages/c2/e5/8d4ae121624acbd7e7b0fa44102d5b8211c651d60ed1712041ac013d364d/tdjson-1.8.56.post2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6df48cd87849a69efa492c9a9fb6f53885d2f6db581ba2535fc694009fd400d5",
                "md5": "060a192b98466b8f850f1e76698f67c8",
                "sha256": "58cff8de79c4931c84d2fd16d930097c5a392354cbae9ff80f59937ade6db3e6"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "060a192b98466b8f850f1e76698f67c8",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 16211345,
            "upload_time": "2025-10-26T03:49:16",
            "upload_time_iso_8601": "2025-10-26T03:49:16.095592Z",
            "url": "https://files.pythonhosted.org/packages/6d/f4/8cd87849a69efa492c9a9fb6f53885d2f6db581ba2535fc694009fd400d5/tdjson-1.8.56.post2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "65a1df04a245e1dee6aa2365b5bd28b5d3028701427b1ecab457c53edd66110c",
                "md5": "6b15e02277db307cfd100238f54b3be9",
                "sha256": "8aa2fa3091b1333bf88394401dd1478f3b96233505b286e184be0fccc5a3bc1b"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "has_sig": false,
            "md5_digest": "6b15e02277db307cfd100238f54b3be9",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 15991860,
            "upload_time": "2025-10-26T03:49:18",
            "upload_time_iso_8601": "2025-10-26T03:49:18.524556Z",
            "url": "https://files.pythonhosted.org/packages/65/a1/df04a245e1dee6aa2365b5bd28b5d3028701427b1ecab457c53edd66110c/tdjson-1.8.56.post2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "01c6cacf6dfbe9da2e59022acb94282902bbd52ef4b623bc1c8e248756917e69",
                "md5": "b453d73064b4618ce617b6a0311156d6",
                "sha256": "146b7d4a5da41c57c0224e14bfb63b45b26e660b0a3c08f016746104c902a767"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b453d73064b4618ce617b6a0311156d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 16209083,
            "upload_time": "2025-10-26T03:49:21",
            "upload_time_iso_8601": "2025-10-26T03:49:21.109231Z",
            "url": "https://files.pythonhosted.org/packages/01/c6/cacf6dfbe9da2e59022acb94282902bbd52ef4b623bc1c8e248756917e69/tdjson-1.8.56.post2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f7c35f37cec91744f7da4e7860ad37a57074be11aabd4a44548a5a5a4b145434",
                "md5": "f739ad03ed1c4e0d87326625a338d4e1",
                "sha256": "f4a4605fe7bfbcef17335a517a599f44bdb2265a26017fc08ef588c45cc163fa"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "has_sig": false,
            "md5_digest": "f739ad03ed1c4e0d87326625a338d4e1",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 15994340,
            "upload_time": "2025-10-26T03:49:23",
            "upload_time_iso_8601": "2025-10-26T03:49:23.689793Z",
            "url": "https://files.pythonhosted.org/packages/f7/c3/5f37cec91744f7da4e7860ad37a57074be11aabd4a44548a5a5a4b145434/tdjson-1.8.56.post2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dd9855f658758f755e5f38133f2b7c5e5df5aa84bbe6a88f51ace9224c331857",
                "md5": "f54a0ecd7c744411f95415cb029343fc",
                "sha256": "922ed4c63dbd8e85bfd2501a5fdb8a70e0fe2eed5a1591f3fe67107891cbc612"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f54a0ecd7c744411f95415cb029343fc",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 16211856,
            "upload_time": "2025-10-26T03:49:26",
            "upload_time_iso_8601": "2025-10-26T03:49:26.370603Z",
            "url": "https://files.pythonhosted.org/packages/dd/98/55f658758f755e5f38133f2b7c5e5df5aa84bbe6a88f51ace9224c331857/tdjson-1.8.56.post2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b122b118bc973ad9292b8c22a2619f0e8f890008db52cb3387cc65a37f0f6566",
                "md5": "d40a39abd70ef1b45662e760897470aa",
                "sha256": "32604ff118e012e3f492fcb9a8e2247e6b04ebdacd47769fc57fbc8eae5f6cd4"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "has_sig": false,
            "md5_digest": "d40a39abd70ef1b45662e760897470aa",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 15994192,
            "upload_time": "2025-10-26T03:49:28",
            "upload_time_iso_8601": "2025-10-26T03:49:28.967528Z",
            "url": "https://files.pythonhosted.org/packages/b1/22/b118bc973ad9292b8c22a2619f0e8f890008db52cb3387cc65a37f0f6566/tdjson-1.8.56.post2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "387e5bbfda6ec9c5bd2919712267781fe152640ab9ae232306113b2849e9b234",
                "md5": "63b08db2b5fae96f52d4e64b65857baa",
                "sha256": "63fbd179d4061bf3d768106ac1bf9537617f5f43f701b53d3c0ef0355123cc10"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.56.post2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "has_sig": false,
            "md5_digest": "63b08db2b5fae96f52d4e64b65857baa",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 16211390,
            "upload_time": "2025-10-26T03:49:31",
            "upload_time_iso_8601": "2025-10-26T03:49:31.200994Z",
            "url": "https://files.pythonhosted.org/packages/38/7e/5bbfda6ec9c5bd2919712267781fe152640ab9ae232306113b2849e9b234/tdjson-1.8.56.post2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-26 03:49:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AYMENJD",
    "github_project": "tdjson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tdjson"
}
        
Elapsed time: 3.35072s