tdjson


Nametdjson JSON
Version 1.8.45 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-02-12 17:58:27
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.45-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.45-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.45",
    "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": "c38b39630c0d257a0be6d90aa45948fe30de0ca478d2de8fcbb79698b3af6453",
                "md5": "650f2bf5532a601b03fff741e6dd02e3",
                "sha256": "21d805f6751dabced768113d4936ae77b6e24c57675c746c1b5ed46568bfaafc"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.45-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "650f2bf5532a601b03fff741e6dd02e3",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 15696616,
            "upload_time": "2025-02-12T17:58:27",
            "upload_time_iso_8601": "2025-02-12T17:58:27.190335Z",
            "url": "https://files.pythonhosted.org/packages/c3/8b/39630c0d257a0be6d90aa45948fe30de0ca478d2de8fcbb79698b3af6453/tdjson-1.8.45-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "35e4646778eb8256926eb0dc21960c5f78aafcc87eb9c369b28daaeb90c0e05e",
                "md5": "83ded38edd1c185b15677335c59c26d5",
                "sha256": "53984a6461032581d098a74ae6bc157c6ff763c81253e471514cd6bcf801fe71"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.45-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "83ded38edd1c185b15677335c59c26d5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 15696631,
            "upload_time": "2025-02-12T17:58:31",
            "upload_time_iso_8601": "2025-02-12T17:58:31.803906Z",
            "url": "https://files.pythonhosted.org/packages/35/e4/646778eb8256926eb0dc21960c5f78aafcc87eb9c369b28daaeb90c0e05e/tdjson-1.8.45-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "71413f7741e527a7ac0711b64148bf1c4ae47eb50404f945f9229672247029d3",
                "md5": "d8005c95a499de6304d06c2d0392cf36",
                "sha256": "aaf96519d1fbfb5e1cf2549eae16a5bfbc376b658bbf655f856742d295b4a974"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.45-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d8005c95a499de6304d06c2d0392cf36",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 15694336,
            "upload_time": "2025-02-12T17:58:35",
            "upload_time_iso_8601": "2025-02-12T17:58:35.737639Z",
            "url": "https://files.pythonhosted.org/packages/71/41/3f7741e527a7ac0711b64148bf1c4ae47eb50404f945f9229672247029d3/tdjson-1.8.45-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9bdda48b5c943f284d33efe0c59e3dcd84e887b739a3740cf85fa332111344af",
                "md5": "a6138fc626c9816ea551c38c3944e2b2",
                "sha256": "e79d8dee8671b24b242a428fdf12d01d1c318be388de6cb78a6de7b8d05657a3"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.45-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a6138fc626c9816ea551c38c3944e2b2",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 15697246,
            "upload_time": "2025-02-12T17:58:40",
            "upload_time_iso_8601": "2025-02-12T17:58:40.319238Z",
            "url": "https://files.pythonhosted.org/packages/9b/dd/a48b5c943f284d33efe0c59e3dcd84e887b739a3740cf85fa332111344af/tdjson-1.8.45-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "426f71771385c48bd6854d317ca562e48a591839d48f5de2972a6251990c3be6",
                "md5": "88cd327614b685e4914e3e760565e49a",
                "sha256": "345f8738e40bc31ff32f359e7a6723745d553db377ba954d1d1c0416af03ae8a"
            },
            "downloads": -1,
            "filename": "tdjson-1.8.45-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "88cd327614b685e4914e3e760565e49a",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 15696627,
            "upload_time": "2025-02-12T17:58:43",
            "upload_time_iso_8601": "2025-02-12T17:58:43.944430Z",
            "url": "https://files.pythonhosted.org/packages/42/6f/71771385c48bd6854d317ca562e48a591839d48f5de2972a6251990c3be6/tdjson-1.8.45-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-12 17:58:27",
    "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: 0.62783s