{"id":13815096,"url":"https://github.com/pytdbot/client","last_synced_at":"2026-01-14T08:33:15.229Z","repository":{"id":37395497,"uuid":"499904766","full_name":"pytdbot/client","owner":"pytdbot","description":"Easy-to-use asynchronous TDLib wrapper for Python.","archived":false,"fork":false,"pushed_at":"2026-01-04T09:08:27.000Z","size":177307,"stargazers_count":111,"open_issues_count":2,"forks_count":29,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-05T04:05:55.432Z","etag":null,"topics":["async","asyncio","bot","bot-api","library","mtproto","python","tdlib","tdlib-python","telegram","telegram-api","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pytdbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-04T18:20:25.000Z","updated_at":"2026-01-04T09:08:30.000Z","dependencies_parsed_at":"2023-11-13T21:29:49.752Z","dependency_job_id":"d7bf1f87-916a-4b37-806d-6b6802ee5c80","html_url":"https://github.com/pytdbot/client","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/pytdbot/client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytdbot%2Fclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytdbot%2Fclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytdbot%2Fclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytdbot%2Fclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytdbot","download_url":"https://codeload.github.com/pytdbot/client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytdbot%2Fclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:31:27.429Z","status":"ssl_error","status_checked_at":"2026-01-14T08:31:19.098Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asyncio","bot","bot-api","library","mtproto","python","tdlib","tdlib-python","telegram","telegram-api","telegram-bot","telegram-bot-api"],"created_at":"2024-08-04T04:02:57.540Z","updated_at":"2026-01-14T08:33:15.220Z","avatar_url":"https://github.com/pytdbot.png","language":"Python","readme":"# Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat\u0026logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.60-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month\u0026units=none\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram\u0026label=Telegram)](https://t.me/pytdbotchat)\n\n\u003ca href=\"https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL\u0026n=AYMEN\u0026t=5\u0026c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521\" target=\"_blank\" rel=\"noopener\"\u003e\n    \u003cimg src=\"https://cupofton.pages.dev/assets/badge-1.svg\" alt=\"Buy me a Cup of TON\" style=\"width: 600px; height: auto;\"\u003e\n\u003c/a\u003e\n\nPytdbot is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.\n\n### Features\n\n`Pytdbot` offers numerous advantages, including:\n\n- **Easy to Use**: Designed with simplicity in mind, making it accessible for developers\n- **Performance**: Fast and powerful, making it ready to fight\n- **Asynchronous**: Fully asynchronous that allows for non-blocking requests and improved responsiveness\n- **Scalable**: Easily scalable using [TDLib Server](https://github.com/pytdbot/tdlib-server)\n- **Well-typed**: Provides clear and well-defined methods and types to enhance developer experience\n- **Decorator-Based Updates**: Simplifies the implementation of update handlers through a decorator pattern\n- **Bound Methods**: Features types bound methods for improved usability\n- **Unlimited Support**: Supports **Plugins**, [**filters**](pytdbot/filters.py#L23), [**TDLib**](https://github.com/tdlib/td) types/functions and much more\n\n### Requirements\n\n- Python 3.9+\n- Telegram [API key](https://my.telegram.org/apps)\n- [tdjson](https://github.com/AYMENJD/tdjson) or [TDLib](https://github.com/tdlib/td#building)\n- [deepdiff](https://github.com/seperman/deepdiff)\n- [aio-pika](https://github.com/mosquito/aio-pika)\n\n### Installation\n\n\u003e For better performance, it's recommended to install [orjson](https://github.com/ijl/orjson#install) or [ujson](https://github.com/ultrajson/ultrajson#ultrajson).\n\nYou can install Pytdbot with TDLib included using pip:\n\n```bash\npip install --upgrade pytdbot[tdjson]\n```\n\nIf the installation fails, then install without **pre-built** TDLib:\n\n```bash\npip install pytdbot\n```\n\nThen you need to build TDLib from [source](https://github.com/tdlib/td#building) and pass it to `Client.lib_path`.\n\nYou could also install the development version using the following command:\n\n```bash\npip install --pre pytdbot\n```\n\n### Examples\n\nBasic example:\n\n```python\n\nimport asyncio\nimport logging\n\nfrom pytdbot import Client, types\n\nlogging.basicConfig(\n    level=logging.INFO,\n    format=\"[%(levelname)s][p %(process)d %(threadName)s][%(created)f][%(filename)s:%(lineno)d][%(funcName)s][%(name)s]  %(message)s\",\n)\nclient = Client(\n    token=\"1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI\",  # Your bot token\n    api_id=0,\n    api_hash=\"API_HASH\",\n    files_directory=\"BotDB\",  # Path where to store TDLib files\n    database_encryption_key=\"1234echobot$\",\n    td_verbosity=2,  # TDLib verbosity level\n    td_log=types.LogStreamFile(\"tdlib.log\", 104857600),  # Set TDLib log file path\n)\n\n\n@client.on_updateNewMessage()\nasync def print_message(c: Client, message: types.UpdateNewMessage):\n    print(message)\n\n\n@client.on_message()\nasync def say_hello(c: Client, message: types.Message):\n    msg = await message.reply_text(f\"Hey {await message.mention(parse_mode='html')}! I'm cooking up a surprise... 🍳👨‍🍳\", parse_mode=\"html\")\n\n    async with message.action(\"choose_sticker\"):\n        await asyncio.sleep(5)\n\n        await msg.edit_text(\"Boo! 👻 Just kidding.\")\n\n\n\n# Run the client\nclient.run()\n\n```\n\nFor more examples, check the [examples](https://github.com/pytdbot/client/tree/main/examples) folder.\n\n# Thanks to\n\n- You for viewing or using this project.\n\n- [@levlam](https://github.com/levlam) for maintaining [TDLib](https://github.com/tdlib/td) and for the help to create [Pytdbot](https://github.com/pytdbot/client).\n\n# License\n\nMIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytdbot%2Fclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytdbot%2Fclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytdbot%2Fclient/lists"}