[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2167":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":14,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":33,"discoverSource":34},2167,"python-telegram-bot","python-telegram-bot\u002Fpython-telegram-bot","We have made you a wrapper you can't refuse","https:\u002F\u002Fpython-telegram-bot.org",null,"Python",29216,6075,599,21,0,2,114,6,45,"GNU General Public License v3.0",false,"master",true,[25,26,27,28,29],"bot","chatbot","framework","python","telegram","2026-06-12 02:00:38",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fpython-telegram-bot\u002Flogos\u002Fmaster\u002Flogo-text\u002Fpng\u002Fptb-logo-text_768.png\n   :align: center\n   :target: https:\u002F\u002Fpython-telegram-bot.org\n   :alt: python-telegram-bot Logo\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: PyPi Package Version\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: Supported Python versions\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBot%20API-9.5-blue?logo=telegram\n   :target: https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi-changelog\n   :alt: Supported Bot API version\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fpython-telegram-bot\n   :target: https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fpython-telegram-bot\n   :alt: PyPi Package Monthly Download\n\n.. image:: https:\u002F\u002Fapp.readthedocs.org\u002Fprojects\u002Fpython-telegram-bot\u002Fbadge\u002F?version=stable\n   :target: https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002F\n   :alt: Documentation Status\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html\n   :alt: LGPLv3 License\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Factions\u002Fworkflows\u002Funit_tests.yml\u002Fbadge.svg?branch=master\n   :target: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002F\n   :alt: Github Actions workflow\n\n.. image:: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg\n   :target: https:\u002F\u002Fapp.codecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: Code coverage\n\n.. image:: https:\u002F\u002Fisitmaintained.com\u002Fbadge\u002Fresolution\u002Fpython-telegram-bot\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fisitmaintained.com\u002Fproject\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: Median time to resolve an issue\n\n.. image:: https:\u002F\u002Fapi.codacy.com\u002Fproject\u002Fbadge\u002FGrade\u002F99d901eaa09b44b4819aec05c330c968\n   :target: https:\u002F\u002Fapp.codacy.com\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdashboard\n   :alt: Code quality: Codacy\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack\n   :alt: Code Style: Black\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Channel-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel\n   :alt: Telegram Channel\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Group-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup\n   :alt: Telegram Group\n\nWe have made you a wrapper you can't refuse\n\nWe have a vibrant community of developers helping each other in our `Telegram group \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_. Join us!\n\n*Stay tuned for library updates and new releases on our* `Telegram Channel \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotchannel>`_.\n\nIntroduction\n------------\n\nThis library provides a pure Python, asynchronous interface for the\n`Telegram Bot API \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_.\nIt's compatible with Python versions **3.10+**.\n\nIn addition to the pure API implementation, this library features several convenience methods and shortcuts as well as a number of high-level classes to\nmake the development of bots easy and straightforward. These classes are contained in the\n``telegram.ext`` submodule.\n\nAfter installing_ the library, be sure to check out the section on `working with PTB`_.\n\nTelegram API support\n~~~~~~~~~~~~~~~~~~~~\n\nAll types and methods of the Telegram Bot API **9.5** are natively supported by this library.\nIn addition, Bot API functionality not yet natively included can still be used as described `in our wiki \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FBot-API-Forward-Compatibility>`_.\n\nNotable Features\n~~~~~~~~~~~~~~~~\n\n- `Fully asynchronous \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FConcurrency>`_\n- Convenient shortcut methods, e.g. `Message.reply_text \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.message.html#telegram.Message.reply_text>`_\n- `Fully annotated with static type hints \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FType-Checking>`_\n- `Customizable and extendable interface \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArchitecture>`_\n- Seamless integration with `webhooks \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FWebhooks>`_ and `polling \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.ext.application.html#telegram.ext.Application.run_polling>`_\n- `Comprehensive documentation and examples \u003C#working-with-ptb>`_\n\nInstalling\n----------\n\nYou can install or upgrade ``python-telegram-bot`` via\n\n.. code:: shell\n\n    $ pip install python-telegram-bot --upgrade\n\nTo install a pre-release, use the ``--pre`` `flag \u003Chttps:\u002F\u002Fpip.pypa.io\u002Fen\u002Fstable\u002Fcli\u002Fpip_install\u002F#cmdoption-pre>`_ in addition.\n\nYou can also install ``python-telegram-bot`` from source, though this is usually not necessary.\n\n.. code:: shell\n\n    $ git clone https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n    $ cd python-telegram-bot\n    $ pip install build\n    $ python -m build\n\nYou can also use your favored package manager (such as ``uv``, ``hatch``, ``poetry``, etc.) instead of ``pip``.\n\nVerifying Releases\n~~~~~~~~~~~~~~~~~~\n\nTo enable you to verify that a release file that you downloaded was indeed provided by the ``python-telegram-bot`` team, we have taken the following measures.\n\nStarting with v21.4, all releases are signed via `sigstore \u003Chttps:\u002F\u002Fwww.sigstore.dev>`_.\nThe corresponding signature files are uploaded to the `GitHub releases page`_.\nTo verify the signature, please install the `sigstore Python client \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fsigstore\u002F>`_ and follow the instructions for `verifying signatures from GitHub Actions \u003Chttps:\u002F\u002Fgithub.com\u002Fsigstore\u002Fsigstore-python?tab=readme-ov-file>`_. As input for the ``--repository`` parameter, please use the value ``python-telegram-bot\u002Fpython-telegram-bot``.\n\nEarlier releases are signed with a GPG key.\nThe signatures are uploaded to both the `GitHub releases page`_ and the `PyPI project \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F>`_ and end with a suffix ``.asc``.\nPlease find the public keys `here \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Ftree\u002Fmaster\u002Fpublic_keys>`_.\nThe keys are named in the format ``\u003Cfirst_version>-\u003Clast_version>.gpg``.\n\nIn addition, the GitHub release page also contains the sha1 hashes of the release files in the files with the suffix ``.sha1``.\n\nDependencies & Their Versions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``python-telegram-bot`` tries to use as few 3rd party dependencies as possible.\nHowever, for some features using a 3rd party library is more sane than implementing the functionality again.\nAs these features are *optional*, the corresponding 3rd party dependencies are not installed by default.\nInstead, they are listed as optional dependencies.\nThis allows to avoid unnecessary dependency conflicts for users who don't need the optional features.\n\nThe only required dependency is `httpx >=0.27,\u003C0.29 \u003Chttps:\u002F\u002Fwww.python-httpx.org>`_ for\n``telegram.request.HTTPXRequest``, the default networking backend.\n\n``python-telegram-bot`` is most useful when used along with additional libraries.\nTo minimize dependency conflicts, we try to be liberal in terms of version requirements on the (optional) dependencies.\nOn the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds.\nIf you encounter dependency conflicts due to these bounds, feel free to reach out.\n\nOptional Dependencies\n#####################\n\nPTB can be installed with optional dependencies:\n\n* ``pip install \"python-telegram-bot[passport]\"`` installs the `cryptography>=39.0.1 \u003Chttps:\u002F\u002Fcryptography.io\u002Fen\u002Fstable>`_ library. Use this, if you want to use Telegram Passport related functionality.\n* ``pip install \"python-telegram-bot[socks]\"`` installs `httpx[socks] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_. Use this, if you want to work behind a Socks5 server.\n* ``pip install \"python-telegram-bot[http2]\"`` installs `httpx[http2] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_. Use this, if you want to use HTTP\u002F2.\n* ``pip install \"python-telegram-bot[rate-limiter]\"`` installs `aiolimiter~=1.1,\u003C1.3 \u003Chttps:\u002F\u002Faiolimiter.readthedocs.io\u002Fen\u002Fstable\u002F>`_. Use this, if you want to use ``telegram.ext.AIORateLimiter``.\n* ``pip install \"python-telegram-bot[webhooks]\"`` installs the `tornado~=6.4 \u003Chttps:\u002F\u002Fwww.tornadoweb.org\u002Fen\u002Fstable\u002F>`_ library. Use this, if you want to use ``telegram.ext.Updater.start_webhook``\u002F``telegram.ext.Application.run_webhook``.\n* ``pip install \"python-telegram-bot[callback-data]\"`` installs the `cachetools>=5.3.3,\u003C6.3.0 \u003Chttps:\u002F\u002Fcachetools.readthedocs.io\u002Fen\u002Flatest\u002F>`_ library. Use this, if you want to use `arbitrary callback_data \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArbitrary-callback_data>`_.\n* ``pip install \"python-telegram-bot[job-queue]\"`` installs the `APScheduler>=3.10.4,\u003C3.12.0 \u003Chttps:\u002F\u002Fapscheduler.readthedocs.io\u002Fen\u002F3.x\u002F>`_ library. Use this, if you want to use the ``telegram.ext.JobQueue``.\n\nTo install multiple optional dependencies, separate them by commas, e.g. ``pip install \"python-telegram-bot[socks,webhooks]\"``.\n\nAdditionally, two shortcuts are provided:\n\n* ``pip install \"python-telegram-bot[all]\"`` installs all optional dependencies.\n* ``pip install \"python-telegram-bot[ext]\"`` installs all optional dependencies that are related to ``telegram.ext``, i.e. ``[rate-limiter, webhooks, callback-data, job-queue]``.\n\nWorking with PTB\n----------------\n\nOnce you have installed the library, you can begin working with it - so let's get started!\n\nQuick Start\n~~~~~~~~~~~\n\nOur Wiki contains an `Introduction to the API \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FIntroduction-to-the-API>`_ explaining how the pure Bot API can be accessed via ``python-telegram-bot``.\nMoreover, the `Tutorial: Your first Bot \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FExtensions---Your-first-Bot>`_ gives an introduction on how chatbots can be easily programmed with the help of the ``telegram.ext`` module.\n\nResources\n~~~~~~~~~\n\n- The `package documentation \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002F>`_ is the technical reference for ``python-telegram-bot``.\n  It contains descriptions of all available classes, modules, methods and arguments as well as the `changelog \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fchangelog.html>`_.\n- The `wiki \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002F>`_ is home to number of more elaborate introductions of the different features of ``python-telegram-bot`` and other useful resources that go beyond the technical documentation.\n- Our `examples section \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fexamples.html>`_ contains several examples that showcase the different features of both the Bot API and ``python-telegram-bot``.\n  Even if it is not your approach for learning, please take a look at ``echobot.py``. It is the de facto base for most of the bots out there.\n  The code for these examples is released to the public domain, so you can start by grabbing the code and building on top of it.\n- The `official Telegram Bot API documentation \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_ is of course always worth a read.\n\nGetting help\n~~~~~~~~~~~~\n\nIf the resources mentioned above don't answer your questions or simply overwhelm you, there are several ways of getting help.\n\n1. We have a vibrant community of developers helping each other in our `Telegram group \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_. Join us! Asking a question here is often the quickest way to get a pointer in the right direction.\n\n2. Ask questions by opening `a discussion \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdiscussions\u002Fnew>`_.\n\n3. You can even ask for help on Stack Overflow using the `python-telegram-bot tag \u003Chttps:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fpython-telegram-bot>`_.\n\nConcurrency\n~~~~~~~~~~~\n\nSince v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.\nBecause ``asyncio`` is in general single-threaded, ``python-telegram-bot`` currently does not aim to be thread-safe.\nNoteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include:\n\n* ``telegram.ext.Application\u002FUpdater.update_queue``\n* ``telegram.ext.ConversationHandler.check\u002Fhandle_update``\n* ``telegram.ext.CallbackDataCache``\n* ``telegram.ext.BasePersistence``\n* all classes in the ``telegram.ext.filters`` module that allow to add\u002Fremove allowed users\u002Fchats at runtime\n\nFree threading\n~~~~~~~~~~~~~~\n\nWhile ``python-telegram-bot`` is tested to work with Python 3.14 free threading, we do not guarantee that\nPTB is thread-safe for all use cases. Please see issue `#4873 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F4873>`_ for more information.\n\nContributing\n------------\n\nContributions of all sizes are welcome.\nPlease review our `contribution guidelines \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.rst>`_ to get started.\nYou can also help by `reporting bugs or feature requests \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002Fnew\u002Fchoose>`_.\n\nDonating\n--------\nOccasionally we are asked if we accept donations to support the development.\nWhile we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations.\nIf you still want to donate, we kindly ask you to donate to another open source project\u002Finitiative of your choice instead.\n\nLicense\n-------\n\nYou may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 \u003Chttps:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html>`_.\nDerivative works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.\n\n.. _`GitHub releases page`: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Freleases\n","python-telegram-bot 是一个用于 Telegram Bot API 的 Python 封装库，提供了一个简洁且异步的接口来与 Telegram 机器人进行交互。其核心功能包括支持最新的 Telegram Bot API、易于使用的装饰器模式以及强大的错误处理机制。该库使用 Python 编写，并遵循 GNU General Public License v3.0 许可协议。它适合于需要构建自动化消息服务、客户服务聊天机器人或任何基于 Telegram 平台的应用场景。此外，项目拥有活跃的社区支持，能够帮助开发者解决开发过程中遇到的问题。","2026-06-11 02:48:34","top_language"]