mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
* Add context manager support for bot client The bot client now supports the context manager protocol, providing automatic resource management. This enhancement helps to automatically close the session when leaving the context, which cleans up resources better. The documentation and tests have been updated accordingly to illustrate this new feature. Moreover, an example of usage without a dispatcher has been provided to clarify its use in simple cases. * Added changelog
29 lines
431 B
ReStructuredText
29 lines
431 B
ReStructuredText
.. include:: ../README.rst
|
|
|
|
Simple usage
|
|
------------
|
|
|
|
.. literalinclude:: ../examples/echo_bot.py
|
|
|
|
|
|
Usage without dispatcher
|
|
------------------------
|
|
|
|
Just only interact with Bot API, without handling events
|
|
|
|
.. literalinclude:: ../examples/without_dispatcher.py
|
|
|
|
|
|
Contents
|
|
========
|
|
|
|
.. toctree::
|
|
:maxdepth: 3
|
|
|
|
install
|
|
migration_2_to_3
|
|
api/index
|
|
dispatcher/index
|
|
utils/index
|
|
changelog
|
|
contributing
|