init new bot

This commit is contained in:
ada-dmitry
2024-08-26 20:22:16 +03:00
parent 8208bd226e
commit 564398d0dd
1675 changed files with 164420 additions and 115 deletions
+3
View File
@@ -1 +1,4 @@
config.py config.py
project/config.py
project/bot.log
+2
View File
@@ -0,0 +1,2 @@
2024-08-26 16:15:10 - INFO - ˜˜˜˜˜˜˜˜ ˜˜˜˜˜˜˜˜˜ /start ˜˜ ˜˜˜˜˜˜˜˜˜˜˜˜ 451218808
2024-08-26 16:15:10 - INFO - ˜˜˜˜˜˜˜˜˜˜˜˜ 451218808 ˜˜ ˜˜˜˜˜˜ ˜ ˜˜˜˜ ˜˜˜˜˜˜
-114
View File
@@ -1,114 +0,0 @@
import telebot
from telebot import types
# Укажите свой токен бота
API_TOKEN = '7092073070:AAGFOnZHUR86RdAjb7pgSN7plOiQe1_4Qow'
bot = telebot.TeleBot(API_TOKEN)
# Словари для хранения данных пользователей
users = {}
# Enum для ролей
class Role:
CURATOR = "Куратор"
FRESHMAN = "Первокурсник"
# Стартовая команда
@bot.message_handler(commands=['start'])
def start(message):
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton("Куратор")
item2 = types.KeyboardButton("Первокурсник")
markup.add(item1, item2)
bot.send_message(message.chat.id, "Привет! Выберите, кем вы являетесь:", reply_markup=markup)
bot.register_next_step_handler(message, handle_role_selection)
# Обработка выбора роли
def handle_role_selection(message):
if message.text == "Куратор":
role = Role.CURATOR
elif message.text == "Первокурсник":
role = Role.FRESHMAN
else:
bot.send_message(message.chat.id, "Некорректный выбор. Пожалуйста, выберите 'Куратор' или 'Первокурсник'.")
return
# Сохраняем данные пользователя
user_id = message.from_user.id
users[user_id] = {
"role": role,
"name": "",
"group": ""
}
bot.send_message(message.chat.id, "Введите ваше ФИО:")
bot.register_next_step_handler(message, enter_name)
# Ввод ФИО
def enter_name(message):
user_id = message.from_user.id
users[user_id]["name"] = message.text
bot.send_message(message.chat.id, "Введите вашу группу:")
bot.register_next_step_handler(message, enter_group)
# Ввод группы
def enter_group(message):
user_id = message.from_user.id
users[user_id]["group"] = message.text
role = users[user_id]["role"]
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
if role == Role.CURATOR:
item1 = types.KeyboardButton("Отчитаться за мероприятие")
item2 = types.KeyboardButton("Добавить мероприятие")
markup.add(item1, item2)
bot.send_message(message.chat.id, "Вы куратор. Вы можете выбрать действие:", reply_markup=markup)
elif role == Role.FRESHMAN:
item1 = types.KeyboardButton("Задать вопрос куратору")
item2 = types.KeyboardButton("Поблагодарить куратора")
markup.add(item1, item2)
bot.send_message(message.chat.id, "Вы первокурсник. Вы можете выбрать действие:", reply_markup=markup)
# Обработка инструкций для кураторов
@bot.message_handler(func=lambda message: users.get(message.from_user.id, {}).get('role') == Role.CURATOR)
def handle_curator_actions(message):
if message.text == 'Отчитаться за мероприятие':
bot.send_message(message.chat.id, "Пожалуйста, пришлите фото мероприятия:")
bot.register_next_step_handler(message, upload_activity_photo)
elif message.text == 'Добавить мероприятие':
bot.send_message(message.chat.id, "Пожалуйста, опишите мероприятие:")
bot.register_next_step_handler(message, add_activity)
def upload_activity_photo(message):
user_id = message.from_user.id
bot.send_message(message.chat.id, "Спасибо! Фото получено.")
def add_activity(message):
description = message.text
bot.send_message(message.chat.id, f"Мероприятие добавлено: {description}")
# Обработка инструкций для первокурсников
@bot.message_handler(func=lambda message: users.get(message.from_user.id, {}).get('role') == Role.FRESHMAN)
def handle_freshman_actions(message):
if message.text == 'Задать вопрос куратору':
bot.send_message(message.chat.id, "Пожалуйста, напишите свой вопрос:")
bot.register_next_step_handler(message, submit_question)
elif message.text == 'Поблагодарить куратора':
bot.send_message(message.chat.id, "Пожалуйста, пришлите фото с вашим куратором:")
bot.register_next_step_handler(message, upload_thank_you_photo)
def submit_question(message):
question = message.text
bot.send_message(message.chat.id, f"Ваш вопрос отправлен: {question}")
def upload_thank_you_photo(message):
user_id = message.from_user.id
bot.send_message(message.chat.id, "Спасибо! Фото получено.")
# Запуск бота
if __name__ == '__main__':
bot.polling(none_stop=True)
@@ -0,0 +1 @@
pip
+291
View File
@@ -0,0 +1,291 @@
Metadata-Version: 2.1
Name: aiofiles
Version: 23.2.1
Summary: File support for asyncio.
Project-URL: Changelog, https://github.com/Tinche/aiofiles#history
Project-URL: Bug Tracker, https://github.com/Tinche/aiofiles/issues
Project-URL: repository, https://github.com/Tinche/aiofiles
Author-email: Tin Tvrtkovic <tinchester@gmail.com>
License: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Description-Content-Type: text/markdown
# aiofiles: file support for asyncio
[![PyPI](https://img.shields.io/pypi/v/aiofiles.svg)](https://pypi.python.org/pypi/aiofiles)
[![Build](https://github.com/Tinche/aiofiles/workflows/CI/badge.svg)](https://github.com/Tinche/aiofiles/actions)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Tinche/882f02e3df32136c847ba90d2688f06e/raw/covbadge.json)](https://github.com/Tinche/aiofiles/actions/workflows/main.yml)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/aiofiles.svg)](https://github.com/Tinche/aiofiles)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
**aiofiles** is an Apache2 licensed library, written in Python, for handling local
disk files in asyncio applications.
Ordinary local file IO is blocking, and cannot easily and portably be made
asynchronous. This means doing file IO may interfere with asyncio applications,
which shouldn't block the executing thread. aiofiles helps with this by
introducing asynchronous versions of files that support delegating operations to
a separate thread pool.
```python
async with aiofiles.open('filename', mode='r') as f:
contents = await f.read()
print(contents)
'My file contents'
```
Asynchronous iteration is also supported.
```python
async with aiofiles.open('filename') as f:
async for line in f:
...
```
Asynchronous interface to tempfile module.
```python
async with aiofiles.tempfile.TemporaryFile('wb') as f:
await f.write(b'Hello, World!')
```
## Features
- a file API very similar to Python's standard, blocking API
- support for buffered and unbuffered binary files, and buffered text files
- support for `async`/`await` ([PEP 492](https://peps.python.org/pep-0492/)) constructs
- async interface to tempfile module
## Installation
To install aiofiles, simply:
```bash
$ pip install aiofiles
```
## Usage
Files are opened using the `aiofiles.open()` coroutine, which in addition to
mirroring the builtin `open` accepts optional `loop` and `executor`
arguments. If `loop` is absent, the default loop will be used, as per the
set asyncio policy. If `executor` is not specified, the default event loop
executor will be used.
In case of success, an asynchronous file object is returned with an
API identical to an ordinary file, except the following methods are coroutines
and delegate to an executor:
- `close`
- `flush`
- `isatty`
- `read`
- `readall`
- `read1`
- `readinto`
- `readline`
- `readlines`
- `seek`
- `seekable`
- `tell`
- `truncate`
- `writable`
- `write`
- `writelines`
In case of failure, one of the usual exceptions will be raised.
`aiofiles.stdin`, `aiofiles.stdout`, `aiofiles.stderr`,
`aiofiles.stdin_bytes`, `aiofiles.stdout_bytes`, and
`aiofiles.stderr_bytes` provide async access to `sys.stdin`,
`sys.stdout`, `sys.stderr`, and their corresponding `.buffer` properties.
The `aiofiles.os` module contains executor-enabled coroutine versions of
several useful `os` functions that deal with files:
- `stat`
- `statvfs`
- `sendfile`
- `rename`
- `renames`
- `replace`
- `remove`
- `unlink`
- `mkdir`
- `makedirs`
- `rmdir`
- `removedirs`
- `link`
- `symlink`
- `readlink`
- `listdir`
- `scandir`
- `access`
- `path.exists`
- `path.isfile`
- `path.isdir`
- `path.islink`
- `path.ismount`
- `path.getsize`
- `path.getatime`
- `path.getctime`
- `path.samefile`
- `path.sameopenfile`
### Tempfile
**aiofiles.tempfile** implements the following interfaces:
- TemporaryFile
- NamedTemporaryFile
- SpooledTemporaryFile
- TemporaryDirectory
Results return wrapped with a context manager allowing use with async with and async for.
```python
async with aiofiles.tempfile.NamedTemporaryFile('wb+') as f:
await f.write(b'Line1\n Line2')
await f.seek(0)
async for line in f:
print(line)
async with aiofiles.tempfile.TemporaryDirectory() as d:
filename = os.path.join(d, "file.ext")
```
### Writing tests for aiofiles
Real file IO can be mocked by patching `aiofiles.threadpool.sync_open`
as desired. The return type also needs to be registered with the
`aiofiles.threadpool.wrap` dispatcher:
```python
aiofiles.threadpool.wrap.register(mock.MagicMock)(
lambda *args, **kwargs: threadpool.AsyncBufferedIOBase(*args, **kwargs))
async def test_stuff():
data = 'data'
mock_file = mock.MagicMock()
with mock.patch('aiofiles.threadpool.sync_open', return_value=mock_file) as mock_open:
async with aiofiles.open('filename', 'w') as f:
await f.write(data)
mock_file.write.assert_called_once_with(data)
```
### History
#### 23.2.1 (2023-08-09)
- Import `os.statvfs` conditionally to fix importing on non-UNIX systems.
[#171](https://github.com/Tinche/aiofiles/issues/171) [#172](https://github.com/Tinche/aiofiles/pull/172)
#### 23.2.0 (2023-08-09)
- aiofiles is now tested on Python 3.12 too.
[#166](https://github.com/Tinche/aiofiles/issues/166) [#168](https://github.com/Tinche/aiofiles/pull/168)
- On Python 3.12, `aiofiles.tempfile.NamedTemporaryFile` now accepts a `delete_on_close` argument, just like the stdlib version.
- On Python 3.12, `aiofiles.tempfile.NamedTemporaryFile` no longer exposes a `delete` attribute, just like the stdlib version.
- Added `aiofiles.os.statvfs` and `aiofiles.os.path.ismount`.
[#162](https://github.com/Tinche/aiofiles/pull/162)
- Use [PDM](https://pdm.fming.dev/latest/) instead of Poetry.
[#169](https://github.com/Tinche/aiofiles/pull/169)
#### 23.1.0 (2023-02-09)
- Added `aiofiles.os.access`.
[#146](https://github.com/Tinche/aiofiles/pull/146)
- Removed `aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.softspace`.
[#151](https://github.com/Tinche/aiofiles/pull/151)
- Added `aiofiles.stdin`, `aiofiles.stdin_bytes`, and other stdio streams.
[#154](https://github.com/Tinche/aiofiles/pull/154)
- Transition to `asyncio.get_running_loop` (vs `asyncio.get_event_loop`) internally.
#### 22.1.0 (2022-09-04)
- Added `aiofiles.os.path.islink`.
[#126](https://github.com/Tinche/aiofiles/pull/126)
- Added `aiofiles.os.readlink`.
[#125](https://github.com/Tinche/aiofiles/pull/125)
- Added `aiofiles.os.symlink`.
[#124](https://github.com/Tinche/aiofiles/pull/124)
- Added `aiofiles.os.unlink`.
[#123](https://github.com/Tinche/aiofiles/pull/123)
- Added `aiofiles.os.link`.
[#121](https://github.com/Tinche/aiofiles/pull/121)
- Added `aiofiles.os.renames`.
[#120](https://github.com/Tinche/aiofiles/pull/120)
- Added `aiofiles.os.{listdir, scandir}`.
[#143](https://github.com/Tinche/aiofiles/pull/143)
- Switched to CalVer.
- Dropped Python 3.6 support. If you require it, use version 0.8.0.
- aiofiles is now tested on Python 3.11.
#### 0.8.0 (2021-11-27)
- aiofiles is now tested on Python 3.10.
- Added `aiofiles.os.replace`.
[#107](https://github.com/Tinche/aiofiles/pull/107)
- Added `aiofiles.os.{makedirs, removedirs}`.
- Added `aiofiles.os.path.{exists, isfile, isdir, getsize, getatime, getctime, samefile, sameopenfile}`.
[#63](https://github.com/Tinche/aiofiles/pull/63)
- Added `suffix`, `prefix`, `dir` args to `aiofiles.tempfile.TemporaryDirectory`.
[#116](https://github.com/Tinche/aiofiles/pull/116)
#### 0.7.0 (2021-05-17)
- Added the `aiofiles.tempfile` module for async temporary files.
[#56](https://github.com/Tinche/aiofiles/pull/56)
- Switched to Poetry and GitHub actions.
- Dropped 3.5 support.
#### 0.6.0 (2020-10-27)
- `aiofiles` is now tested on ppc64le.
- Added `name` and `mode` properties to async file objects.
[#82](https://github.com/Tinche/aiofiles/pull/82)
- Fixed a DeprecationWarning internally.
[#75](https://github.com/Tinche/aiofiles/pull/75)
- Python 3.9 support and tests.
#### 0.5.0 (2020-04-12)
- Python 3.8 support. Code base modernization (using `async/await` instead of `asyncio.coroutine`/`yield from`).
- Added `aiofiles.os.remove`, `aiofiles.os.rename`, `aiofiles.os.mkdir`, `aiofiles.os.rmdir`.
[#62](https://github.com/Tinche/aiofiles/pull/62)
#### 0.4.0 (2018-08-11)
- Python 3.7 support.
- Removed Python 3.3/3.4 support. If you use these versions, stick to aiofiles 0.3.x.
#### 0.3.2 (2017-09-23)
- The LICENSE is now included in the sdist.
[#31](https://github.com/Tinche/aiofiles/pull/31)
#### 0.3.1 (2017-03-10)
- Introduced a changelog.
- `aiofiles.os.sendfile` will now work if the standard `os` module contains a `sendfile` function.
### Contributing
Contributions are very welcome. Tests can be run with `tox`, please ensure
the coverage at least stays the same before you submit a pull request.
+26
View File
@@ -0,0 +1,26 @@
aiofiles-23.2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
aiofiles-23.2.1.dist-info/METADATA,sha256=cot28p_PNjdl_MK--l9Qu2e6QOv9OxdHrKbjLmYf9Uw,9673
aiofiles-23.2.1.dist-info/RECORD,,
aiofiles-23.2.1.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
aiofiles-23.2.1.dist-info/licenses/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
aiofiles-23.2.1.dist-info/licenses/NOTICE,sha256=EExY0dRQvWR0wJ2LZLwBgnM6YKw9jCU-M0zegpRSD_E,55
aiofiles/__init__.py,sha256=1iAMJQyJtX3LGIS0AoFTJeO1aJ_RK2jpBSBhg0VoIrE,344
aiofiles/__pycache__/__init__.cpython-311.pyc,,
aiofiles/__pycache__/base.cpython-311.pyc,,
aiofiles/__pycache__/os.cpython-311.pyc,,
aiofiles/__pycache__/ospath.cpython-311.pyc,,
aiofiles/base.py,sha256=rZwA151Ji8XlBkzvDmcF1CgDTY2iKNuJMfvNlM0s0E0,2684
aiofiles/os.py,sha256=zuFGaIyGCGUuFb7trFFEm6SLdCRqTFsSV0mY6SO8z3M,970
aiofiles/ospath.py,sha256=zqG2VFzRb6yYiIOWipqsdgvZmoMTFvZmBdkxkAl1FT4,764
aiofiles/tempfile/__init__.py,sha256=hFSNTOjOUv371Ozdfy6FIxeln46Nm3xOVh4ZR3Q94V0,10244
aiofiles/tempfile/__pycache__/__init__.cpython-311.pyc,,
aiofiles/tempfile/__pycache__/temptypes.cpython-311.pyc,,
aiofiles/tempfile/temptypes.py,sha256=ddEvNjMLVlr7WUILCe6ypTqw77yREeIonTk16Uw_NVs,2093
aiofiles/threadpool/__init__.py,sha256=c_aexl1t193iKdPZaolPEEbHDrQ0RrsH_HTAToMPQBo,3171
aiofiles/threadpool/__pycache__/__init__.cpython-311.pyc,,
aiofiles/threadpool/__pycache__/binary.cpython-311.pyc,,
aiofiles/threadpool/__pycache__/text.cpython-311.pyc,,
aiofiles/threadpool/__pycache__/utils.cpython-311.pyc,,
aiofiles/threadpool/binary.py,sha256=hp-km9VCRu0MLz_wAEUfbCz7OL7xtn9iGAawabpnp5U,2315
aiofiles/threadpool/text.py,sha256=fNmpw2PEkj0BZSldipJXAgZqVGLxALcfOMiuDQ54Eas,1223
aiofiles/threadpool/utils.py,sha256=B59dSZwO_WZs2dFFycKeA91iD2Xq2nNw1EFF8YMBI5k,1868
+4
View File
@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.17.1
Root-Is-Purelib: true
Tag: py3-none-any
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,2 @@
Asyncio support for files
Copyright 2016 Tin Tvrtkovic
+22
View File
@@ -0,0 +1,22 @@
"""Utilities for asyncio-friendly file handling."""
from .threadpool import (
open,
stdin,
stdout,
stderr,
stdin_bytes,
stdout_bytes,
stderr_bytes,
)
from . import tempfile
__all__ = [
"open",
"tempfile",
"stdin",
"stdout",
"stderr",
"stdin_bytes",
"stdout_bytes",
"stderr_bytes",
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
+113
View File
@@ -0,0 +1,113 @@
"""Various base classes."""
from types import coroutine
from collections.abc import Coroutine
from asyncio import get_running_loop
class AsyncBase:
def __init__(self, file, loop, executor):
self._file = file
self._executor = executor
self._ref_loop = loop
@property
def _loop(self):
return self._ref_loop or get_running_loop()
def __aiter__(self):
"""We are our own iterator."""
return self
def __repr__(self):
return super().__repr__() + " wrapping " + repr(self._file)
async def __anext__(self):
"""Simulate normal file iteration."""
line = await self.readline()
if line:
return line
else:
raise StopAsyncIteration
class AsyncIndirectBase(AsyncBase):
def __init__(self, name, loop, executor, indirect):
self._indirect = indirect
self._name = name
super().__init__(None, loop, executor)
@property
def _file(self):
return self._indirect()
@_file.setter
def _file(self, v):
pass # discard writes
class _ContextManager(Coroutine):
__slots__ = ("_coro", "_obj")
def __init__(self, coro):
self._coro = coro
self._obj = None
def send(self, value):
return self._coro.send(value)
def throw(self, typ, val=None, tb=None):
if val is None:
return self._coro.throw(typ)
elif tb is None:
return self._coro.throw(typ, val)
else:
return self._coro.throw(typ, val, tb)
def close(self):
return self._coro.close()
@property
def gi_frame(self):
return self._coro.gi_frame
@property
def gi_running(self):
return self._coro.gi_running
@property
def gi_code(self):
return self._coro.gi_code
def __next__(self):
return self.send(None)
@coroutine
def __iter__(self):
resp = yield from self._coro
return resp
def __await__(self):
resp = yield from self._coro
return resp
async def __anext__(self):
resp = await self._coro
return resp
async def __aenter__(self):
self._obj = await self._coro
return self._obj
async def __aexit__(self, exc_type, exc, tb):
self._obj.close()
self._obj = None
class AiofilesContextManager(_ContextManager):
"""An adjusted async context manager for aiofiles."""
async def __aexit__(self, exc_type, exc_val, exc_tb):
await get_running_loop().run_in_executor(
None, self._obj._file.__exit__, exc_type, exc_val, exc_tb
)
self._obj = None
+51
View File
@@ -0,0 +1,51 @@
"""Async executor versions of file functions from the os module."""
import os
from . import ospath as path
from .ospath import wrap
__all__ = [
"path",
"stat",
"statvfs",
"rename",
"renames",
"replace",
"remove",
"unlink",
"mkdir",
"makedirs",
"rmdir",
"removedirs",
"link",
"symlink",
"readlink",
"listdir",
"scandir",
"access",
"sendfile",
"wrap",
]
stat = wrap(os.stat)
rename = wrap(os.rename)
renames = wrap(os.renames)
replace = wrap(os.replace)
remove = wrap(os.remove)
unlink = wrap(os.unlink)
mkdir = wrap(os.mkdir)
makedirs = wrap(os.makedirs)
rmdir = wrap(os.rmdir)
removedirs = wrap(os.removedirs)
link = wrap(os.link)
symlink = wrap(os.symlink)
readlink = wrap(os.readlink)
listdir = wrap(os.listdir)
scandir = wrap(os.scandir)
access = wrap(os.access)
if hasattr(os, "sendfile"):
sendfile = wrap(os.sendfile)
if hasattr(os, "statvfs"):
statvfs = wrap(os.statvfs)
+28
View File
@@ -0,0 +1,28 @@
"""Async executor versions of file functions from the os.path module."""
import asyncio
from functools import partial, wraps
from os import path
def wrap(func):
@wraps(func)
async def run(*args, loop=None, executor=None, **kwargs):
if loop is None:
loop = asyncio.get_running_loop()
pfunc = partial(func, *args, **kwargs)
return await loop.run_in_executor(executor, pfunc)
return run
exists = wrap(path.exists)
isfile = wrap(path.isfile)
isdir = wrap(path.isdir)
islink = wrap(path.islink)
ismount = wrap(path.ismount)
getsize = wrap(path.getsize)
getmtime = wrap(path.getmtime)
getatime = wrap(path.getatime)
getctime = wrap(path.getctime)
samefile = wrap(path.samefile)
sameopenfile = wrap(path.sameopenfile)
+357
View File
@@ -0,0 +1,357 @@
import asyncio
from functools import partial, singledispatch
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOBase
from tempfile import NamedTemporaryFile as syncNamedTemporaryFile
from tempfile import SpooledTemporaryFile as syncSpooledTemporaryFile
from tempfile import TemporaryDirectory as syncTemporaryDirectory
from tempfile import TemporaryFile as syncTemporaryFile
from tempfile import _TemporaryFileWrapper as syncTemporaryFileWrapper
from ..base import AiofilesContextManager
from ..threadpool.binary import AsyncBufferedIOBase, AsyncBufferedReader, AsyncFileIO
from ..threadpool.text import AsyncTextIOWrapper
from .temptypes import AsyncSpooledTemporaryFile, AsyncTemporaryDirectory
import sys
__all__ = [
"NamedTemporaryFile",
"TemporaryFile",
"SpooledTemporaryFile",
"TemporaryDirectory",
]
# ================================================================
# Public methods for async open and return of temp file/directory
# objects with async interface
# ================================================================
if sys.version_info >= (3, 12):
def NamedTemporaryFile(
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
delete=True,
delete_on_close=True,
loop=None,
executor=None,
):
"""Async open a named temporary file"""
return AiofilesContextManager(
_temporary_file(
named=True,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
delete=delete,
delete_on_close=delete_on_close,
loop=loop,
executor=executor,
)
)
else:
def NamedTemporaryFile(
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
delete=True,
loop=None,
executor=None,
):
"""Async open a named temporary file"""
return AiofilesContextManager(
_temporary_file(
named=True,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
delete=delete,
loop=loop,
executor=executor,
)
)
def TemporaryFile(
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
loop=None,
executor=None,
):
"""Async open an unnamed temporary file"""
return AiofilesContextManager(
_temporary_file(
named=False,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
loop=loop,
executor=executor,
)
)
def SpooledTemporaryFile(
max_size=0,
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
loop=None,
executor=None,
):
"""Async open a spooled temporary file"""
return AiofilesContextManager(
_spooled_temporary_file(
max_size=max_size,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
loop=loop,
executor=executor,
)
)
def TemporaryDirectory(suffix=None, prefix=None, dir=None, loop=None, executor=None):
"""Async open a temporary directory"""
return AiofilesContextManagerTempDir(
_temporary_directory(
suffix=suffix, prefix=prefix, dir=dir, loop=loop, executor=executor
)
)
# =========================================================
# Internal coroutines to open new temp files/directories
# =========================================================
if sys.version_info >= (3, 12):
async def _temporary_file(
named=True,
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
delete=True,
delete_on_close=True,
loop=None,
executor=None,
max_size=0,
):
"""Async method to open a temporary file with async interface"""
if loop is None:
loop = asyncio.get_running_loop()
if named:
cb = partial(
syncNamedTemporaryFile,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
delete=delete,
delete_on_close=delete_on_close,
)
else:
cb = partial(
syncTemporaryFile,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
)
f = await loop.run_in_executor(executor, cb)
# Wrap based on type of underlying IO object
if type(f) is syncTemporaryFileWrapper:
# _TemporaryFileWrapper was used (named files)
result = wrap(f.file, f, loop=loop, executor=executor)
result._closer = f._closer
return result
else:
# IO object was returned directly without wrapper
return wrap(f, f, loop=loop, executor=executor)
else:
async def _temporary_file(
named=True,
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
delete=True,
loop=None,
executor=None,
max_size=0,
):
"""Async method to open a temporary file with async interface"""
if loop is None:
loop = asyncio.get_running_loop()
if named:
cb = partial(
syncNamedTemporaryFile,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
delete=delete,
)
else:
cb = partial(
syncTemporaryFile,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
)
f = await loop.run_in_executor(executor, cb)
# Wrap based on type of underlying IO object
if type(f) is syncTemporaryFileWrapper:
# _TemporaryFileWrapper was used (named files)
result = wrap(f.file, f, loop=loop, executor=executor)
# add delete property
result.delete = f.delete
return result
else:
# IO object was returned directly without wrapper
return wrap(f, f, loop=loop, executor=executor)
async def _spooled_temporary_file(
max_size=0,
mode="w+b",
buffering=-1,
encoding=None,
newline=None,
suffix=None,
prefix=None,
dir=None,
loop=None,
executor=None,
):
"""Open a spooled temporary file with async interface"""
if loop is None:
loop = asyncio.get_running_loop()
cb = partial(
syncSpooledTemporaryFile,
max_size=max_size,
mode=mode,
buffering=buffering,
encoding=encoding,
newline=newline,
suffix=suffix,
prefix=prefix,
dir=dir,
)
f = await loop.run_in_executor(executor, cb)
# Single interface provided by SpooledTemporaryFile for all modes
return AsyncSpooledTemporaryFile(f, loop=loop, executor=executor)
async def _temporary_directory(
suffix=None, prefix=None, dir=None, loop=None, executor=None
):
"""Async method to open a temporary directory with async interface"""
if loop is None:
loop = asyncio.get_running_loop()
cb = partial(syncTemporaryDirectory, suffix, prefix, dir)
f = await loop.run_in_executor(executor, cb)
return AsyncTemporaryDirectory(f, loop=loop, executor=executor)
class AiofilesContextManagerTempDir(AiofilesContextManager):
"""With returns the directory location, not the object (matching sync lib)"""
async def __aenter__(self):
self._obj = await self._coro
return self._obj.name
@singledispatch
def wrap(base_io_obj, file, *, loop=None, executor=None):
"""Wrap the object with interface based on type of underlying IO"""
raise TypeError("Unsupported IO type: {}".format(base_io_obj))
@wrap.register(TextIOBase)
def _(base_io_obj, file, *, loop=None, executor=None):
return AsyncTextIOWrapper(file, loop=loop, executor=executor)
@wrap.register(BufferedWriter)
def _(base_io_obj, file, *, loop=None, executor=None):
return AsyncBufferedIOBase(file, loop=loop, executor=executor)
@wrap.register(BufferedReader)
@wrap.register(BufferedRandom)
def _(base_io_obj, file, *, loop=None, executor=None):
return AsyncBufferedReader(file, loop=loop, executor=executor)
@wrap.register(FileIO)
def _(base_io_obj, file, *, loop=None, executor=None):
return AsyncFileIO(file, loop=loop, executor=executor)
+69
View File
@@ -0,0 +1,69 @@
"""Async wrappers for spooled temp files and temp directory objects"""
from functools import partial
from ..base import AsyncBase
from ..threadpool.utils import (
cond_delegate_to_executor,
delegate_to_executor,
proxy_property_directly,
)
@delegate_to_executor("fileno", "rollover")
@cond_delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"readline",
"readlines",
"seek",
"tell",
"truncate",
)
@proxy_property_directly("closed", "encoding", "mode", "name", "newlines")
class AsyncSpooledTemporaryFile(AsyncBase):
"""Async wrapper for SpooledTemporaryFile class"""
async def _check(self):
if self._file._rolled:
return
max_size = self._file._max_size
if max_size and self._file.tell() > max_size:
await self.rollover()
async def write(self, s):
"""Implementation to anticipate rollover"""
if self._file._rolled:
cb = partial(self._file.write, s)
return await self._loop.run_in_executor(self._executor, cb)
else:
file = self._file._file # reference underlying base IO object
rv = file.write(s)
await self._check()
return rv
async def writelines(self, iterable):
"""Implementation to anticipate rollover"""
if self._file._rolled:
cb = partial(self._file.writelines, iterable)
return await self._loop.run_in_executor(self._executor, cb)
else:
file = self._file._file # reference underlying base IO object
rv = file.writelines(iterable)
await self._check()
return rv
@delegate_to_executor("cleanup")
@proxy_property_directly("name")
class AsyncTemporaryDirectory:
"""Async wrapper for TemporaryDirectory class"""
def __init__(self, file, loop, executor):
self._file = file
self._loop = loop
self._executor = executor
async def close(self):
await self.cleanup()
+141
View File
@@ -0,0 +1,141 @@
"""Handle files using a thread pool executor."""
import asyncio
import sys
from functools import partial, singledispatch
from io import (
BufferedIOBase,
BufferedRandom,
BufferedReader,
BufferedWriter,
FileIO,
TextIOBase,
)
from types import coroutine
from ..base import AiofilesContextManager
from .binary import (
AsyncBufferedIOBase,
AsyncBufferedReader,
AsyncFileIO,
AsyncIndirectBufferedIOBase,
)
from .text import AsyncTextIndirectIOWrapper, AsyncTextIOWrapper
sync_open = open
__all__ = (
"open",
"stdin",
"stdout",
"stderr",
"stdin_bytes",
"stdout_bytes",
"stderr_bytes",
)
def open(
file,
mode="r",
buffering=-1,
encoding=None,
errors=None,
newline=None,
closefd=True,
opener=None,
*,
loop=None,
executor=None,
):
return AiofilesContextManager(
_open(
file,
mode=mode,
buffering=buffering,
encoding=encoding,
errors=errors,
newline=newline,
closefd=closefd,
opener=opener,
loop=loop,
executor=executor,
)
)
@coroutine
def _open(
file,
mode="r",
buffering=-1,
encoding=None,
errors=None,
newline=None,
closefd=True,
opener=None,
*,
loop=None,
executor=None,
):
"""Open an asyncio file."""
if loop is None:
loop = asyncio.get_running_loop()
cb = partial(
sync_open,
file,
mode=mode,
buffering=buffering,
encoding=encoding,
errors=errors,
newline=newline,
closefd=closefd,
opener=opener,
)
f = yield from loop.run_in_executor(executor, cb)
return wrap(f, loop=loop, executor=executor)
@singledispatch
def wrap(file, *, loop=None, executor=None):
raise TypeError("Unsupported io type: {}.".format(file))
@wrap.register(TextIOBase)
def _(file, *, loop=None, executor=None):
return AsyncTextIOWrapper(file, loop=loop, executor=executor)
@wrap.register(BufferedWriter)
@wrap.register(BufferedIOBase)
def _(file, *, loop=None, executor=None):
return AsyncBufferedIOBase(file, loop=loop, executor=executor)
@wrap.register(BufferedReader)
@wrap.register(BufferedRandom)
def _(file, *, loop=None, executor=None):
return AsyncBufferedReader(file, loop=loop, executor=executor)
@wrap.register(FileIO)
def _(file, *, loop=None, executor=None):
return AsyncFileIO(file, loop=loop, executor=executor)
stdin = AsyncTextIndirectIOWrapper("sys.stdin", None, None, indirect=lambda: sys.stdin)
stdout = AsyncTextIndirectIOWrapper(
"sys.stdout", None, None, indirect=lambda: sys.stdout
)
stderr = AsyncTextIndirectIOWrapper(
"sys.stderr", None, None, indirect=lambda: sys.stderr
)
stdin_bytes = AsyncIndirectBufferedIOBase(
"sys.stdin.buffer", None, None, indirect=lambda: sys.stdin.buffer
)
stdout_bytes = AsyncIndirectBufferedIOBase(
"sys.stdout.buffer", None, None, indirect=lambda: sys.stdout.buffer
)
stderr_bytes = AsyncIndirectBufferedIOBase(
"sys.stderr.buffer", None, None, indirect=lambda: sys.stderr.buffer
)
+104
View File
@@ -0,0 +1,104 @@
from ..base import AsyncBase, AsyncIndirectBase
from .utils import delegate_to_executor, proxy_method_directly, proxy_property_directly
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"read1",
"readinto",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"writable",
"write",
"writelines",
)
@proxy_method_directly("detach", "fileno", "readable")
@proxy_property_directly("closed", "raw", "name", "mode")
class AsyncBufferedIOBase(AsyncBase):
"""The asyncio executor version of io.BufferedWriter and BufferedIOBase."""
@delegate_to_executor("peek")
class AsyncBufferedReader(AsyncBufferedIOBase):
"""The asyncio executor version of io.BufferedReader and Random."""
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"readall",
"readinto",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"writable",
"write",
"writelines",
)
@proxy_method_directly("fileno", "readable")
@proxy_property_directly("closed", "name", "mode")
class AsyncFileIO(AsyncBase):
"""The asyncio executor version of io.FileIO."""
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"read1",
"readinto",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"writable",
"write",
"writelines",
)
@proxy_method_directly("detach", "fileno", "readable")
@proxy_property_directly("closed", "raw", "name", "mode")
class AsyncIndirectBufferedIOBase(AsyncIndirectBase):
"""The indirect asyncio executor version of io.BufferedWriter and BufferedIOBase."""
@delegate_to_executor("peek")
class AsyncIndirectBufferedReader(AsyncIndirectBufferedIOBase):
"""The indirect asyncio executor version of io.BufferedReader and Random."""
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"readall",
"readinto",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"writable",
"write",
"writelines",
)
@proxy_method_directly("fileno", "readable")
@proxy_property_directly("closed", "name", "mode")
class AsyncIndirectFileIO(AsyncIndirectBase):
"""The indirect asyncio executor version of io.FileIO."""
+64
View File
@@ -0,0 +1,64 @@
from ..base import AsyncBase, AsyncIndirectBase
from .utils import delegate_to_executor, proxy_method_directly, proxy_property_directly
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"readable",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"write",
"writable",
"writelines",
)
@proxy_method_directly("detach", "fileno", "readable")
@proxy_property_directly(
"buffer",
"closed",
"encoding",
"errors",
"line_buffering",
"newlines",
"name",
"mode",
)
class AsyncTextIOWrapper(AsyncBase):
"""The asyncio executor version of io.TextIOWrapper."""
@delegate_to_executor(
"close",
"flush",
"isatty",
"read",
"readable",
"readline",
"readlines",
"seek",
"seekable",
"tell",
"truncate",
"write",
"writable",
"writelines",
)
@proxy_method_directly("detach", "fileno", "readable")
@proxy_property_directly(
"buffer",
"closed",
"encoding",
"errors",
"line_buffering",
"newlines",
"name",
"mode",
)
class AsyncTextIndirectIOWrapper(AsyncIndirectBase):
"""The indirect asyncio executor version of io.TextIOWrapper."""
+72
View File
@@ -0,0 +1,72 @@
import functools
def delegate_to_executor(*attrs):
def cls_builder(cls):
for attr_name in attrs:
setattr(cls, attr_name, _make_delegate_method(attr_name))
return cls
return cls_builder
def proxy_method_directly(*attrs):
def cls_builder(cls):
for attr_name in attrs:
setattr(cls, attr_name, _make_proxy_method(attr_name))
return cls
return cls_builder
def proxy_property_directly(*attrs):
def cls_builder(cls):
for attr_name in attrs:
setattr(cls, attr_name, _make_proxy_property(attr_name))
return cls
return cls_builder
def cond_delegate_to_executor(*attrs):
def cls_builder(cls):
for attr_name in attrs:
setattr(cls, attr_name, _make_cond_delegate_method(attr_name))
return cls
return cls_builder
def _make_delegate_method(attr_name):
async def method(self, *args, **kwargs):
cb = functools.partial(getattr(self._file, attr_name), *args, **kwargs)
return await self._loop.run_in_executor(self._executor, cb)
return method
def _make_proxy_method(attr_name):
def method(self, *args, **kwargs):
return getattr(self._file, attr_name)(*args, **kwargs)
return method
def _make_proxy_property(attr_name):
def proxy_property(self):
return getattr(self._file, attr_name)
return property(proxy_property)
def _make_cond_delegate_method(attr_name):
"""For spooled temp files, delegate only if rolled to file object"""
async def method(self, *args, **kwargs):
if self._file._rolled:
cb = functools.partial(getattr(self._file, attr_name), *args, **kwargs)
return await self._loop.run_in_executor(self._executor, cb)
else:
return getattr(self._file, attr_name)(*args, **kwargs)
return method
@@ -0,0 +1 @@
pip
+163
View File
@@ -0,0 +1,163 @@
Metadata-Version: 2.3
Name: aiogram
Version: 3.12.0
Summary: Modern and fully asynchronous framework for Telegram Bot API
Project-URL: Homepage, https://aiogram.dev/
Project-URL: Documentation, https://docs.aiogram.dev/
Project-URL: Repository, https://github.com/aiogram/aiogram/
Author-email: Alex Root Junior <jroot.junior@gmail.com>
Maintainer-email: Alex Root Junior <jroot.junior@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: api,asyncio,bot,framework,telegram,wrapper
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: aiofiles~=23.2.1
Requires-Dist: aiohttp<3.11,>=3.9.0
Requires-Dist: certifi>=2023.7.22
Requires-Dist: magic-filter<1.1,>=1.0.12
Requires-Dist: pydantic<2.9,>=2.4.1
Requires-Dist: typing-extensions<=5.0,>=4.7.0
Provides-Extra: cli
Requires-Dist: aiogram-cli~=1.0.3; extra == 'cli'
Provides-Extra: dev
Requires-Dist: black~=24.4.2; extra == 'dev'
Requires-Dist: isort~=5.13.2; extra == 'dev'
Requires-Dist: motor-types~=1.0.0b4; extra == 'dev'
Requires-Dist: mypy~=1.10.0; extra == 'dev'
Requires-Dist: packaging~=24.1; extra == 'dev'
Requires-Dist: pre-commit~=3.5; extra == 'dev'
Requires-Dist: ruff~=0.5.1; extra == 'dev'
Requires-Dist: toml~=0.10.2; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo~=2023.9.10; extra == 'docs'
Requires-Dist: markdown-include~=0.8.1; extra == 'docs'
Requires-Dist: pygments~=2.16.1; extra == 'docs'
Requires-Dist: pymdown-extensions~=10.3; extra == 'docs'
Requires-Dist: sphinx-autobuild~=2021.3.14; extra == 'docs'
Requires-Dist: sphinx-copybutton~=0.5.2; extra == 'docs'
Requires-Dist: sphinx-intl~=2.1.0; extra == 'docs'
Requires-Dist: sphinx-substitution-extensions~=2022.2.16; extra == 'docs'
Requires-Dist: sphinxcontrib-towncrier~=0.4.0a0; extra == 'docs'
Requires-Dist: sphinx~=7.2.6; extra == 'docs'
Requires-Dist: towncrier~=24.7.1; extra == 'docs'
Provides-Extra: fast
Requires-Dist: aiodns>=3.0.0; extra == 'fast'
Requires-Dist: uvloop>=0.17.0; ((sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy') and extra == 'fast'
Provides-Extra: i18n
Requires-Dist: babel~=2.13.0; extra == 'i18n'
Provides-Extra: mongo
Requires-Dist: motor~=3.3.2; extra == 'mongo'
Provides-Extra: proxy
Requires-Dist: aiohttp-socks~=0.8.3; extra == 'proxy'
Provides-Extra: redis
Requires-Dist: redis[hiredis]~=5.0.1; extra == 'redis'
Provides-Extra: test
Requires-Dist: aresponses~=2.1.6; extra == 'test'
Requires-Dist: pycryptodomex~=3.19.0; extra == 'test'
Requires-Dist: pytest-aiohttp~=1.0.5; extra == 'test'
Requires-Dist: pytest-asyncio~=0.21.1; extra == 'test'
Requires-Dist: pytest-cov~=4.1.0; extra == 'test'
Requires-Dist: pytest-html~=4.0.2; extra == 'test'
Requires-Dist: pytest-lazy-fixture~=0.6.3; extra == 'test'
Requires-Dist: pytest-mock~=3.12.0; extra == 'test'
Requires-Dist: pytest-mypy~=0.10.3; extra == 'test'
Requires-Dist: pytest~=7.4.2; extra == 'test'
Requires-Dist: pytz~=2023.3; extra == 'test'
Description-Content-Type: text/x-rst
#######
aiogram
#######
.. image:: https://img.shields.io/pypi/l/aiogram.svg?style=flat-square
:target: https://opensource.org/licenses/MIT
:alt: MIT License
.. image:: https://img.shields.io/pypi/status/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: PyPi status
.. image:: https://img.shields.io/pypi/v/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: Downloads
.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: Supported python versions
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&logo=telegram&label=Telegram%20Bot%20API&query=%24.api.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Faiogram%2Faiogram%2Fdev-3.x%2F.butcher%2Fschema%2Fschema.json&style=flat-square
:target: https://core.telegram.org/bots/api
:alt: Telegram Bot API
.. image:: https://img.shields.io/github/actions/workflow/status/aiogram/aiogram/tests.yml?branch=dev-3.x&style=flat-square
:target: https://github.com/aiogram/aiogram/actions
:alt: Tests
.. image:: https://img.shields.io/codecov/c/github/aiogram/aiogram?style=flat-square
:target: https://app.codecov.io/gh/aiogram/aiogram
:alt: Codecov
**aiogram** is a modern and fully asynchronous framework for
`Telegram Bot API <https://core.telegram.org/bots/api>`_ written in Python 3.8+ using
`asyncio <https://docs.python.org/3/library/asyncio.html>`_ and
`aiohttp <https://github.com/aio-libs/aiohttp>`_.
Make your bots faster and more powerful!
Documentation:
- 🇺🇸 `English <https://docs.aiogram.dev/en/dev-3.x/>`_
- 🇺🇦 `Ukrainian <https://docs.aiogram.dev/uk_UA/dev-3.x/>`_
Features
========
- Asynchronous (`asyncio docs <https://docs.python.org/3/library/asyncio.html>`_, :pep:`492`)
- Has type hints (:pep:`484`) and can be used with `mypy <http://mypy-lang.org/>`_
- Supports `PyPy <https://www.pypy.org/>`_
- Supports `Telegram Bot API 7.9 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Telegram Bot API integration code was `autogenerated <https://github.com/aiogram/tg-codegen>`_ and can be easily re-generated when API gets updated
- Updates router (Blueprints)
- Has Finite State Machine
- Uses powerful `magic filters <https://docs.aiogram.dev/en/latest/dispatcher/filters/magic_filters.html#magic-filters>`_
- Middlewares (incoming updates and API calls)
- Provides `Replies into Webhook <https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates>`_
- Integrated I18n/L10n support with GNU Gettext (or Fluent)
.. warning::
It is strongly advised that you have prior experience working
with `asyncio <https://docs.python.org/3/library/asyncio.html>`_
before beginning to use **aiogram**.
If you have any questions, you can visit our community chats on Telegram:
- 🇺🇸 `@aiogram <https://t.me/aiogram>`_
- 🇺🇦 `@aiogramua <https://t.me/aiogramua>`_
- 🇺🇿 `@aiogram_uz <https://t.me/aiogram_uz>`_
- 🇰🇿 `@aiogram_kz <https://t.me/aiogram_kz>`_
- 🇷🇺 `@aiogram_ru <https://t.me/aiogram_ru>`_
- 🇮🇷 `@aiogram_fa <https://t.me/aiogram_fa>`_
- 🇮🇹 `@aiogram_it <https://t.me/aiogram_it>`_
- 🇧🇷 `@aiogram_br <https://t.me/aiogram_br>`_
+961
View File
@@ -0,0 +1,961 @@
aiogram-3.12.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
aiogram-3.12.0.dist-info/METADATA,sha256=xLpro6MzAiOqnI3s9iwMQa4utDb-lP5628N1tsZdgN4,7344
aiogram-3.12.0.dist-info/RECORD,,
aiogram-3.12.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram-3.12.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
aiogram-3.12.0.dist-info/licenses/LICENSE,sha256=kTEqDVZ6fYSuFKAER9NvxX60epaWBKI_h-xGsoiU6Iw,1070
aiogram/__init__.py,sha256=hzEKX_gFXmp5n4GXZEU80SJep1_FAH9owAnFTqd9nK0,948
aiogram/__meta__.py,sha256=55lJQIAoSsYeR0jyyKdVygUQrmEXQxbAvKlsKTLaShU,47
aiogram/__pycache__/__init__.cpython-311.pyc,,
aiogram/__pycache__/__meta__.cpython-311.pyc,,
aiogram/__pycache__/exceptions.cpython-311.pyc,,
aiogram/__pycache__/loggers.cpython-311.pyc,,
aiogram/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/client/__pycache__/__init__.cpython-311.pyc,,
aiogram/client/__pycache__/bot.cpython-311.pyc,,
aiogram/client/__pycache__/context_controller.cpython-311.pyc,,
aiogram/client/__pycache__/default.cpython-311.pyc,,
aiogram/client/__pycache__/telegram.cpython-311.pyc,,
aiogram/client/bot.py,sha256=gYy_a9F6Hass5YwsobSFeOu15mDrnR1u6N1x0YohQnA,262513
aiogram/client/context_controller.py,sha256=rAminUBsB3K5FDyj-WQopkD1e94c7GrGVXNyaqPbXZ0,761
aiogram/client/default.py,sha256=sqctTqHKsc69UBGh4sJeFbihGH5feDudb685CbMtdDU,2750
aiogram/client/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/client/session/__pycache__/__init__.cpython-311.pyc,,
aiogram/client/session/__pycache__/aiohttp.cpython-311.pyc,,
aiogram/client/session/__pycache__/base.cpython-311.pyc,,
aiogram/client/session/aiohttp.py,sha256=q2OZLVEdz3LghDlEC5KfDEJJLtwYEbfJMXEmsVNnRcQ,7197
aiogram/client/session/base.py,sha256=e3n5NrwL6L-pFhLetTgBg76uLJDxDP6jQqyxPgjtI_0,8335
aiogram/client/session/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/client/session/middlewares/__pycache__/__init__.cpython-311.pyc,,
aiogram/client/session/middlewares/__pycache__/base.cpython-311.pyc,,
aiogram/client/session/middlewares/__pycache__/manager.cpython-311.pyc,,
aiogram/client/session/middlewares/__pycache__/request_logging.cpython-311.pyc,,
aiogram/client/session/middlewares/base.py,sha256=ck8-iOnaYO2FHb3Yjq6E_TZwiPMg8w8THOXqyHDLjro,1394
aiogram/client/session/middlewares/manager.py,sha256=c1CS6S_UvxYVAfCq6MZ4Laet6sxReEmQ915XltTJR5o,1903
aiogram/client/session/middlewares/request_logging.py,sha256=_nUsciMnQeTZ-_nJw3A3NNBlGWzGqKMqYw2oJqJw3s8,1183
aiogram/client/telegram.py,sha256=cu0HUZqwPzvZp-tMI3yewmnNZ78aTpFfEF0ZZVf0qAw,3080
aiogram/dispatcher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/dispatcher/__pycache__/__init__.cpython-311.pyc,,
aiogram/dispatcher/__pycache__/dispatcher.cpython-311.pyc,,
aiogram/dispatcher/__pycache__/flags.cpython-311.pyc,,
aiogram/dispatcher/__pycache__/router.cpython-311.pyc,,
aiogram/dispatcher/dispatcher.py,sha256=j3V5oi-nBUT1CBSBAs8lbCRQNIveZ9sVOJmUHnuJEqE,23205
aiogram/dispatcher/event/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/dispatcher/event/__pycache__/__init__.cpython-311.pyc,,
aiogram/dispatcher/event/__pycache__/bases.cpython-311.pyc,,
aiogram/dispatcher/event/__pycache__/event.cpython-311.pyc,,
aiogram/dispatcher/event/__pycache__/handler.cpython-311.pyc,,
aiogram/dispatcher/event/__pycache__/telegram.cpython-311.pyc,,
aiogram/dispatcher/event/bases.py,sha256=Piod0CEyGvBOwEuE7e70JMQal4XFilFD3NMinR2bEyE,871
aiogram/dispatcher/event/event.py,sha256=YXOroGX5Mj-5w6Jgl9oPf-muIp6ijeWjNJ3hEr2mA68,1352
aiogram/dispatcher/event/handler.py,sha256=rgV8j1x2a8qpmWCue1-uQ3fRzrc8qDdhKNJBkBnFSYo,3631
aiogram/dispatcher/event/telegram.py,sha256=BjptMwTbDVdpiIkngGyy8zY2b3i5__gwnuyA7uw9HoY,4767
aiogram/dispatcher/flags.py,sha256=vEevCfweZKDCEW2tA5E3UbqMH-TjDBI0ujf7ktzsx9o,3479
aiogram/dispatcher/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/dispatcher/middlewares/__pycache__/__init__.cpython-311.pyc,,
aiogram/dispatcher/middlewares/__pycache__/base.cpython-311.pyc,,
aiogram/dispatcher/middlewares/__pycache__/error.cpython-311.pyc,,
aiogram/dispatcher/middlewares/__pycache__/manager.cpython-311.pyc,,
aiogram/dispatcher/middlewares/__pycache__/user_context.cpython-311.pyc,,
aiogram/dispatcher/middlewares/base.py,sha256=czbD9IDLoHb6pf6HisRGyG8pAQMLbC4R5k-iuTIWSNU,784
aiogram/dispatcher/middlewares/error.py,sha256=xDfQxTo9PT1qXvE35OGesDi7WydeQeB4zgT07eXM5G4,1119
aiogram/dispatcher/middlewares/manager.py,sha256=-ivUdff-Addpd_s_AlDA4RaVsMJmzgWwvt2DIqITnBw,2166
aiogram/dispatcher/middlewares/user_context.py,sha256=kc2ONIgh_b4MlItGxH-7RkxZ6zCevY2sfplJl1keyVU,7115
aiogram/dispatcher/router.py,sha256=vnAvQQANQ85JXE84s7JXkVo60uKUvyqg0bcIFGJ8we8,10512
aiogram/enums/__init__.py,sha256=oQH8dIPtHKcgQwX6k6-EIda0PLM_HWyyPy5Oft1BSoY,2014
aiogram/enums/__pycache__/__init__.cpython-311.pyc,,
aiogram/enums/__pycache__/bot_command_scope_type.cpython-311.pyc,,
aiogram/enums/__pycache__/chat_action.cpython-311.pyc,,
aiogram/enums/__pycache__/chat_boost_source_type.cpython-311.pyc,,
aiogram/enums/__pycache__/chat_member_status.cpython-311.pyc,,
aiogram/enums/__pycache__/chat_type.cpython-311.pyc,,
aiogram/enums/__pycache__/content_type.cpython-311.pyc,,
aiogram/enums/__pycache__/currency.cpython-311.pyc,,
aiogram/enums/__pycache__/dice_emoji.cpython-311.pyc,,
aiogram/enums/__pycache__/encrypted_passport_element.cpython-311.pyc,,
aiogram/enums/__pycache__/inline_query_result_type.cpython-311.pyc,,
aiogram/enums/__pycache__/input_media_type.cpython-311.pyc,,
aiogram/enums/__pycache__/input_paid_media_type.cpython-311.pyc,,
aiogram/enums/__pycache__/keyboard_button_poll_type_type.cpython-311.pyc,,
aiogram/enums/__pycache__/mask_position_point.cpython-311.pyc,,
aiogram/enums/__pycache__/menu_button_type.cpython-311.pyc,,
aiogram/enums/__pycache__/message_entity_type.cpython-311.pyc,,
aiogram/enums/__pycache__/message_origin_type.cpython-311.pyc,,
aiogram/enums/__pycache__/paid_media_type.cpython-311.pyc,,
aiogram/enums/__pycache__/parse_mode.cpython-311.pyc,,
aiogram/enums/__pycache__/passport_element_error_type.cpython-311.pyc,,
aiogram/enums/__pycache__/poll_type.cpython-311.pyc,,
aiogram/enums/__pycache__/reaction_type_type.cpython-311.pyc,,
aiogram/enums/__pycache__/revenue_withdrawal_state_type.cpython-311.pyc,,
aiogram/enums/__pycache__/sticker_format.cpython-311.pyc,,
aiogram/enums/__pycache__/sticker_type.cpython-311.pyc,,
aiogram/enums/__pycache__/topic_icon_color.cpython-311.pyc,,
aiogram/enums/__pycache__/transaction_partner_type.cpython-311.pyc,,
aiogram/enums/__pycache__/update_type.cpython-311.pyc,,
aiogram/enums/bot_command_scope_type.py,sha256=aPn5UKE6AN5BpK9kTH1ffJzG3qUOWFu5lyZOifMu5so,477
aiogram/enums/chat_action.py,sha256=KKItRU_RQuNzFMrAtc67Pn0aT4rZuuynpH6-yXfBhRY,972
aiogram/enums/chat_boost_source_type.py,sha256=80MfT0G_9-uv-7MsTs0lZjtJiA7EaUmqYd5b3vH6JtU,277
aiogram/enums/chat_member_status.py,sha256=OLr5ZfkZocicy1t5i30g7ufR8kujBPHENzR5UHnsDpc,334
aiogram/enums/chat_type.py,sha256=1Oi1TYITumT8jZritu1fgHNKDvK9otlAhPm4soyBKQQ,280
aiogram/enums/content_type.py,sha256=sSTHtq4LqeYB4J3zFug1HkhVuORSdcT7g91ZQTjOZrE,2311
aiogram/enums/currency.py,sha256=P5S_e7Y3wYmODiaK_8Fz0MHVwJXkt1P9Y3gd2SGo1iU,1563
aiogram/enums/dice_emoji.py,sha256=9KlOPTQlgt-6d3myDEWWUTB9H8BrE_LRaOZvBM2ceWs,303
aiogram/enums/encrypted_passport_element.py,sha256=m0-tAF9myf6FwPbsuJgj4AYvywzLMzzltUgrqWgGVws,704
aiogram/enums/inline_query_result_type.py,sha256=HGNN5aOg_jZbE4NNfHs21M-xK5cj2rBar4-C77T73YI,465
aiogram/enums/input_media_type.py,sha256=BfCDkzFOjrzJSo2syY2lq3E3JP8AdlGemp7qMnAupw0,291
aiogram/enums/input_paid_media_type.py,sha256=KoqJo7AelAiY8pmS1mRBuQLz97hedWFImEEVFnEoMmY,247
aiogram/enums/keyboard_button_poll_type_type.py,sha256=vPjequaOO5zySi7hiQjyVIfQl-jhtpgCGHYMR7DOYWY,324
aiogram/enums/mask_position_point.py,sha256=lhlx8U-9gtGn_LPiSOHWBe1u8YTLZCERs5x8DRmUubM,290
aiogram/enums/menu_button_type.py,sha256=4FDz7HKaVtfBlvXObCOVAUmyQQvRsyPi0Vu_Kc-HbDs,264
aiogram/enums/message_entity_type.py,sha256=00ioN4bPLNUYvCL_nJzp7rNUPhIqNOqoWY3PjiC4ob8,703
aiogram/enums/message_origin_type.py,sha256=qWHgXPzpuhsTcLx-huqNS1l36JSwqbsCY70_d20nreM,279
aiogram/enums/paid_media_type.py,sha256=FrGQyXq9bimIb8_b0hpuqYG4mWVruoBYkSC6drd7hw4,261
aiogram/enums/parse_mode.py,sha256=t5F3LaNLsUOaNQuYlQseWt36suA-oRgr_uScGEU8TKU,234
aiogram/enums/passport_element_error_type.py,sha256=HCcvvc8DDUNRD-mdFgFqMEFlr_4pa5Us5_U6pO2wXsc,471
aiogram/enums/poll_type.py,sha256=DluT-wQcOGqBgQimYLlO6OlTIIYnnbtHOmY9pjqVToo,200
aiogram/enums/reaction_type_type.py,sha256=HfSXXZFcMXjIoD0Q8B_lZju6mPuB4jNIBbRyIfLYnEI,233
aiogram/enums/revenue_withdrawal_state_type.py,sha256=ZVw59f9-RYG00TJdSHnZo_LTbdR_J8RmkhDCV4C8AFg,290
aiogram/enums/sticker_format.py,sha256=UmbwulTvkG7TFwS2twsblqiBj89jeEWY-y7P7Ah2qgo,235
aiogram/enums/sticker_type.py,sha256=XonGtnasf3tXwoD2DVRx5E16rHCE5VqgAFSfcFMIAGU,278
aiogram/enums/topic_icon_color.py,sha256=q-DilvJsgVmz5VafMOxj1BKJcMoHzpRrbatTPE4inxk,399
aiogram/enums/transaction_partner_type.py,sha256=VSLiUN_53Ggi9_YrrxoF8OeltgiLY2jJGkAYQJcaHWI,305
aiogram/enums/update_type.py,sha256=WAXTSDLbOXyzjLanGn_22HsALq96OVdd5q8HunubdG8,1086
aiogram/exceptions.py,sha256=Y6wDVG2fyoczPn15U5epm_nnTx8eTC3CgX19SzyiqOE,5153
aiogram/filters/__init__.py,sha256=w7mWuJOIpLDZyUt1eznzMeF-o1UrstHQ-OYbBHHG6ek,1031
aiogram/filters/__pycache__/__init__.cpython-311.pyc,,
aiogram/filters/__pycache__/base.cpython-311.pyc,,
aiogram/filters/__pycache__/callback_data.cpython-311.pyc,,
aiogram/filters/__pycache__/chat_member_updated.cpython-311.pyc,,
aiogram/filters/__pycache__/command.cpython-311.pyc,,
aiogram/filters/__pycache__/exception.cpython-311.pyc,,
aiogram/filters/__pycache__/logic.cpython-311.pyc,,
aiogram/filters/__pycache__/magic_data.cpython-311.pyc,,
aiogram/filters/__pycache__/state.cpython-311.pyc,,
aiogram/filters/base.py,sha256=6mCB2nSjqskDDl9mKCZ3SghhwQ1jryaSTd5PvWii3bM,2005
aiogram/filters/callback_data.py,sha256=nxRCCPXX4iuk1bnVpg3MdLOCeGlmJFKIcS6yjPkM2V8,6225
aiogram/filters/chat_member_updated.py,sha256=3VsiMYLK6L7AfLS7RQRWwjXThWGN7gj4NAYnR0Wdr8I,7484
aiogram/filters/command.py,sha256=IXb54dwKHLz-Jaq2_HHn2si7r5iAr9pYW3sSxD8szCk,9957
aiogram/filters/exception.py,sha256=HbJIOVrXHh0_LkID6b-yn8Xow-llmLqKYmK0_tqB4YA,1488
aiogram/filters/logic.py,sha256=2M-fYY8m1ybX00wFn_8toRHj5alTfy4T6zkIkYrQZbM,2174
aiogram/filters/magic_data.py,sha256=Y07K9NLDXpXV0EuFR7GR7Yq4SzCYaD3XJsvDH-6JFkQ,718
aiogram/filters/state.py,sha256=A4GuSAo5KPdSZMetCC9crrfbJ-yghLunJUVYkOdBPTI,1448
aiogram/fsm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/fsm/__pycache__/__init__.cpython-311.pyc,,
aiogram/fsm/__pycache__/context.cpython-311.pyc,,
aiogram/fsm/__pycache__/middleware.cpython-311.pyc,,
aiogram/fsm/__pycache__/scene.cpython-311.pyc,,
aiogram/fsm/__pycache__/state.cpython-311.pyc,,
aiogram/fsm/__pycache__/strategy.cpython-311.pyc,,
aiogram/fsm/context.py,sha256=o0cKPtB43Z2S8DgSD9be5moF8FqOboBca8Wyd6qvUgU,1072
aiogram/fsm/middleware.py,sha256=4MsKWzr93tzLTmv3dph3pKhznuX9EGsrhBhCb6mhzPo,3755
aiogram/fsm/scene.py,sha256=7a5zMRvfE2vHQ-3zSCHiBDa93QedmOr6kgLs1svjHAg,31903
aiogram/fsm/state.py,sha256=T0sPq1_JV5Jq1jVKu67bUQ0-y9Kqsk3hGpj7PgjpacQ,5640
aiogram/fsm/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/fsm/storage/__pycache__/__init__.cpython-311.pyc,,
aiogram/fsm/storage/__pycache__/base.cpython-311.pyc,,
aiogram/fsm/storage/__pycache__/memory.cpython-311.pyc,,
aiogram/fsm/storage/__pycache__/mongo.cpython-311.pyc,,
aiogram/fsm/storage/__pycache__/redis.cpython-311.pyc,,
aiogram/fsm/storage/base.py,sha256=5SVkAFfcCLN8uZkE1EX7DFFcGJ89p4fp3wB9R8FU2no,5023
aiogram/fsm/storage/memory.py,sha256=xG3507DVY01GTntkGSG1-2fPlWkcDL48QUTIE5WFowQ,2133
aiogram/fsm/storage/mongo.py,sha256=xGvz9rLr6ji8BhumZb1FTvQ5RvmlGquhLAPe1-vi9ms,4880
aiogram/fsm/storage/redis.py,sha256=7ZyaB-AMNEITjdYVn24Bha28_MIFRPX41mn5_0sEtiY,5322
aiogram/fsm/strategy.py,sha256=RUDc6kMae9ZFbyC1bdbAIRz6GoeaIHFzXCXRu8p3Kn0,1147
aiogram/handlers/__init__.py,sha256=XVErtJHhSmg4ytiDTP9J5pQY0RwBN1TsjT5v-Ls7RE4,800
aiogram/handlers/__pycache__/__init__.cpython-311.pyc,,
aiogram/handlers/__pycache__/base.cpython-311.pyc,,
aiogram/handlers/__pycache__/callback_query.cpython-311.pyc,,
aiogram/handlers/__pycache__/chat_member.cpython-311.pyc,,
aiogram/handlers/__pycache__/chosen_inline_result.cpython-311.pyc,,
aiogram/handlers/__pycache__/error.cpython-311.pyc,,
aiogram/handlers/__pycache__/inline_query.cpython-311.pyc,,
aiogram/handlers/__pycache__/message.cpython-311.pyc,,
aiogram/handlers/__pycache__/poll.cpython-311.pyc,,
aiogram/handlers/__pycache__/pre_checkout_query.cpython-311.pyc,,
aiogram/handlers/__pycache__/shipping_query.cpython-311.pyc,,
aiogram/handlers/base.py,sha256=SKLNknDSxAItRHwPMJanOPFztWakJQCun4myH9TBNik,1097
aiogram/handlers/callback_query.py,sha256=XWGgkmyt2Bgnh1B_3ivIZ_jMRJIQUEXPeKSUO4VW_zg,1036
aiogram/handlers/chat_member.py,sha256=TCr1m47duHFUpL92W56ok0hF1k0NN3Yk88-1zzEsYmw,322
aiogram/handlers/chosen_inline_result.py,sha256=NjAPc5EgBb8V4p3WVpcPNPd8b1OApymvBN-I75EYMQo,410
aiogram/handlers/error.py,sha256=86pedHPBgYxXYwrW00s0cadf_lRP6TeHEG0goJ6zNJk,352
aiogram/handlers/inline_query.py,sha256=sOkT3uMuvamMnSTxct-cdQFng6GBqaOlSNV4aHUbVPQ,381
aiogram/handlers/message.py,sha256=I6R4TJ8V6bbGVppmxmGSxIkCzeN9JMn1CDojywWrt50,721
aiogram/handlers/poll.py,sha256=Bn075JIux1lNPjKWH3woV_OzMcvPgPvtkgp4W22mUX8,396
aiogram/handlers/pre_checkout_query.py,sha256=ZO0iZFVwRz4CtBWIVLds8JoHhMPqCahz6lwOfR4dEkg,321
aiogram/handlers/shipping_query.py,sha256=ku14YRYvddTbHeKoIwb2oDpfrpsetFC1m2BwIsNwoAs,314
aiogram/loggers.py,sha256=3MCGSmwgXXsWbgtSaTc6bPSwVOIe8FkQZglc0QLVvsY,257
aiogram/methods/__init__.py,sha256=v4-H0SB9W9Z7rY4Y_uF5Z86dUZje0aI0cafAxDbL2W0,9575
aiogram/methods/__pycache__/__init__.cpython-311.pyc,,
aiogram/methods/__pycache__/add_sticker_to_set.cpython-311.pyc,,
aiogram/methods/__pycache__/answer_callback_query.cpython-311.pyc,,
aiogram/methods/__pycache__/answer_inline_query.cpython-311.pyc,,
aiogram/methods/__pycache__/answer_pre_checkout_query.cpython-311.pyc,,
aiogram/methods/__pycache__/answer_shipping_query.cpython-311.pyc,,
aiogram/methods/__pycache__/answer_web_app_query.cpython-311.pyc,,
aiogram/methods/__pycache__/approve_chat_join_request.cpython-311.pyc,,
aiogram/methods/__pycache__/ban_chat_member.cpython-311.pyc,,
aiogram/methods/__pycache__/ban_chat_sender_chat.cpython-311.pyc,,
aiogram/methods/__pycache__/base.cpython-311.pyc,,
aiogram/methods/__pycache__/close.cpython-311.pyc,,
aiogram/methods/__pycache__/close_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/close_general_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/copy_message.cpython-311.pyc,,
aiogram/methods/__pycache__/copy_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/create_chat_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/create_chat_subscription_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/create_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/create_invoice_link.cpython-311.pyc,,
aiogram/methods/__pycache__/create_new_sticker_set.cpython-311.pyc,,
aiogram/methods/__pycache__/decline_chat_join_request.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_chat_photo.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_chat_sticker_set.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_message.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_my_commands.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_sticker_from_set.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_sticker_set.cpython-311.pyc,,
aiogram/methods/__pycache__/delete_webhook.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_chat_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_chat_subscription_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_general_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_message_caption.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_message_live_location.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_message_media.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_message_reply_markup.cpython-311.pyc,,
aiogram/methods/__pycache__/edit_message_text.cpython-311.pyc,,
aiogram/methods/__pycache__/export_chat_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/forward_message.cpython-311.pyc,,
aiogram/methods/__pycache__/forward_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/get_business_connection.cpython-311.pyc,,
aiogram/methods/__pycache__/get_chat.cpython-311.pyc,,
aiogram/methods/__pycache__/get_chat_administrators.cpython-311.pyc,,
aiogram/methods/__pycache__/get_chat_member.cpython-311.pyc,,
aiogram/methods/__pycache__/get_chat_member_count.cpython-311.pyc,,
aiogram/methods/__pycache__/get_chat_menu_button.cpython-311.pyc,,
aiogram/methods/__pycache__/get_custom_emoji_stickers.cpython-311.pyc,,
aiogram/methods/__pycache__/get_file.cpython-311.pyc,,
aiogram/methods/__pycache__/get_forum_topic_icon_stickers.cpython-311.pyc,,
aiogram/methods/__pycache__/get_game_high_scores.cpython-311.pyc,,
aiogram/methods/__pycache__/get_me.cpython-311.pyc,,
aiogram/methods/__pycache__/get_my_commands.cpython-311.pyc,,
aiogram/methods/__pycache__/get_my_default_administrator_rights.cpython-311.pyc,,
aiogram/methods/__pycache__/get_my_description.cpython-311.pyc,,
aiogram/methods/__pycache__/get_my_name.cpython-311.pyc,,
aiogram/methods/__pycache__/get_my_short_description.cpython-311.pyc,,
aiogram/methods/__pycache__/get_star_transactions.cpython-311.pyc,,
aiogram/methods/__pycache__/get_sticker_set.cpython-311.pyc,,
aiogram/methods/__pycache__/get_updates.cpython-311.pyc,,
aiogram/methods/__pycache__/get_user_chat_boosts.cpython-311.pyc,,
aiogram/methods/__pycache__/get_user_profile_photos.cpython-311.pyc,,
aiogram/methods/__pycache__/get_webhook_info.cpython-311.pyc,,
aiogram/methods/__pycache__/hide_general_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/leave_chat.cpython-311.pyc,,
aiogram/methods/__pycache__/log_out.cpython-311.pyc,,
aiogram/methods/__pycache__/pin_chat_message.cpython-311.pyc,,
aiogram/methods/__pycache__/promote_chat_member.cpython-311.pyc,,
aiogram/methods/__pycache__/refund_star_payment.cpython-311.pyc,,
aiogram/methods/__pycache__/reopen_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/reopen_general_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/replace_sticker_in_set.cpython-311.pyc,,
aiogram/methods/__pycache__/restrict_chat_member.cpython-311.pyc,,
aiogram/methods/__pycache__/revoke_chat_invite_link.cpython-311.pyc,,
aiogram/methods/__pycache__/send_animation.cpython-311.pyc,,
aiogram/methods/__pycache__/send_audio.cpython-311.pyc,,
aiogram/methods/__pycache__/send_chat_action.cpython-311.pyc,,
aiogram/methods/__pycache__/send_contact.cpython-311.pyc,,
aiogram/methods/__pycache__/send_dice.cpython-311.pyc,,
aiogram/methods/__pycache__/send_document.cpython-311.pyc,,
aiogram/methods/__pycache__/send_game.cpython-311.pyc,,
aiogram/methods/__pycache__/send_invoice.cpython-311.pyc,,
aiogram/methods/__pycache__/send_location.cpython-311.pyc,,
aiogram/methods/__pycache__/send_media_group.cpython-311.pyc,,
aiogram/methods/__pycache__/send_message.cpython-311.pyc,,
aiogram/methods/__pycache__/send_paid_media.cpython-311.pyc,,
aiogram/methods/__pycache__/send_photo.cpython-311.pyc,,
aiogram/methods/__pycache__/send_poll.cpython-311.pyc,,
aiogram/methods/__pycache__/send_sticker.cpython-311.pyc,,
aiogram/methods/__pycache__/send_venue.cpython-311.pyc,,
aiogram/methods/__pycache__/send_video.cpython-311.pyc,,
aiogram/methods/__pycache__/send_video_note.cpython-311.pyc,,
aiogram/methods/__pycache__/send_voice.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_administrator_custom_title.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_description.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_menu_button.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_permissions.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_photo.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_sticker_set.cpython-311.pyc,,
aiogram/methods/__pycache__/set_chat_title.cpython-311.pyc,,
aiogram/methods/__pycache__/set_custom_emoji_sticker_set_thumbnail.cpython-311.pyc,,
aiogram/methods/__pycache__/set_game_score.cpython-311.pyc,,
aiogram/methods/__pycache__/set_message_reaction.cpython-311.pyc,,
aiogram/methods/__pycache__/set_my_commands.cpython-311.pyc,,
aiogram/methods/__pycache__/set_my_default_administrator_rights.cpython-311.pyc,,
aiogram/methods/__pycache__/set_my_description.cpython-311.pyc,,
aiogram/methods/__pycache__/set_my_name.cpython-311.pyc,,
aiogram/methods/__pycache__/set_my_short_description.cpython-311.pyc,,
aiogram/methods/__pycache__/set_passport_data_errors.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_emoji_list.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_keywords.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_mask_position.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_position_in_set.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_set_thumbnail.cpython-311.pyc,,
aiogram/methods/__pycache__/set_sticker_set_title.cpython-311.pyc,,
aiogram/methods/__pycache__/set_webhook.cpython-311.pyc,,
aiogram/methods/__pycache__/stop_message_live_location.cpython-311.pyc,,
aiogram/methods/__pycache__/stop_poll.cpython-311.pyc,,
aiogram/methods/__pycache__/unban_chat_member.cpython-311.pyc,,
aiogram/methods/__pycache__/unban_chat_sender_chat.cpython-311.pyc,,
aiogram/methods/__pycache__/unhide_general_forum_topic.cpython-311.pyc,,
aiogram/methods/__pycache__/unpin_all_chat_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/unpin_all_forum_topic_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/unpin_all_general_forum_topic_messages.cpython-311.pyc,,
aiogram/methods/__pycache__/unpin_chat_message.cpython-311.pyc,,
aiogram/methods/__pycache__/upload_sticker_file.cpython-311.pyc,,
aiogram/methods/add_sticker_to_set.py,sha256=PR2B-SDNNYLaH70oevadRNAoiUjFQXLffGSIhQ7uah4,1443
aiogram/methods/answer_callback_query.py,sha256=YVozC3bMDE8YoH6x5TipzWiXCwdWLAU96GWOJTxf1AE,2903
aiogram/methods/answer_inline_query.py,sha256=039jip6Ty3cdvEuYbfougTO-DZIzi1f5hisl6yRg8qw,6017
aiogram/methods/answer_pre_checkout_query.py,sha256=5peOULN2DO0VoK3nEAnsN-E9RWAH5ab64UUc-4apRHk,2172
aiogram/methods/answer_shipping_query.py,sha256=oiq-B_Go-J_sRalwvgyFjUUZDEF1MX5IGNKV6khU0N8,2254
aiogram/methods/answer_web_app_query.py,sha256=AXM-hDf_xIarwburmGT27ZoKFoGsbcVbPNM_EHUHKVo,3676
aiogram/methods/approve_chat_join_request.py,sha256=KUetMV7jHSB9_v702JlSI-CVlJMHUCNstvjUC0GU3i4,1281
aiogram/methods/ban_chat_member.py,sha256=hfHkT_Ucg-26oVtvRQwGvijDMn7uaV84agEY7vIEp-E,2481
aiogram/methods/ban_chat_sender_chat.py,sha256=rr77ixJufnD9bWevxTaSHCcJVh3lIf19JGLEctMMm7A,1569
aiogram/methods/base.py,sha256=VH-3rKUGvNYoiQ9Tw78FujrzlJLs9smBhmI8ejx3-2Y,2734
aiogram/methods/close.py,sha256=Bnzle__tO6tCMMLHkN1E00ypkrdQ0RjhkBNxhjDOq3k,593
aiogram/methods/close_forum_topic.py,sha256=njPMjFb7CkLYbjEuNWPrSDh2HSpqlmO76B9Xs_Xahco,1475
aiogram/methods/close_general_forum_topic.py,sha256=lLWx-ZgE4eV15D2yLXg1wWVECfcN7_1y2XA5vqr1d84,1223
aiogram/methods/copy_message.py,sha256=jvPiwstYa8Lt0XNeI15_HyrwAvnPdgmi0KJZI3GuXOs,6109
aiogram/methods/copy_messages.py,sha256=PbxTovACFr7NM8Te3iN2tq7VLLKvxGDzr_Gp8hrjukA,3293
aiogram/methods/create_chat_invite_link.py,sha256=Snalw6e_zk5g5FI2wKB4Pr0qbGS1PbjIcq7567RC5YE,2545
aiogram/methods/create_chat_subscription_invite_link.py,sha256=ulylrmNJXJa7hipKx7j_2wOeZSVgufPaW2h5JFO2OIw,2508
aiogram/methods/create_forum_topic.py,sha256=FuJ8R-jkpfk7hPKe6pffiUQE21Hhh22G7cFMCFe5kok,2188
aiogram/methods/create_invoice_link.py,sha256=PsgrJvP9W55DuTBmGut1puRNYQOuE6xvRHmblwv64lM,6655
aiogram/methods/create_new_sticker_set.py,sha256=0LwiOVBGTo-sJLOd76Au3_G2-d6YtqFHfju6TU0A2vw,2928
aiogram/methods/decline_chat_join_request.py,sha256=19Sj8OHe6erv3_E4p-Sw_y8XygNYOWrPI5S23CU5P1w,1281
aiogram/methods/delete_chat_photo.py,sha256=0nrFbxWyO7R0pVMAWook7VRXAIU-AeEr_wpiFvyLssQ,1194
aiogram/methods/delete_chat_sticker_set.py,sha256=KaRyvzLt1ystCbkptimtxqUM_4_RzpI7Sl91heSVlKc,1348
aiogram/methods/delete_forum_topic.py,sha256=LrncMipGRW2Be4bYFzSYMjydvRijmPU5Owtmb61e374,1470
aiogram/methods/delete_message.py,sha256=wCMd8oHwYETY1Nk2vP4DYhu-sdrm-LqhQBKPAgQQhSY,1956
aiogram/methods/delete_messages.py,sha256=Hp9tfOVK4T9y3SuAAlfLo58_58CP83JWfpLnN3jkbiM,1401
aiogram/methods/delete_my_commands.py,sha256=LiYVWXeqBxs_hUbq6pQ1h3zSKUyzw7ahdaXb1esAH8Q,2608
aiogram/methods/delete_sticker_from_set.py,sha256=J2PsBRRTBks5TDlp4mlmubem7MSWKh8jzJMmLJQV9CI,944
aiogram/methods/delete_sticker_set.py,sha256=csUT6RkdqmOy0K7vT2QXXR_YJfpQ78S31WYttFqEPY8,908
aiogram/methods/delete_webhook.py,sha256=7kfmOOSlujfXV5JZEozbuQQzNrX5YV0f6nMvUo5aw_k,1155
aiogram/methods/edit_chat_invite_link.py,sha256=N2RqH2DHbRK-zF97jtHlhMV2YykBgHgpqw_iDz8KQRw,2564
aiogram/methods/edit_chat_subscription_invite_link.py,sha256=AvDlMClqa00KJnf4sXZkdOYGBErGtuwLMeHEM0AND5E,1610
aiogram/methods/edit_forum_topic.py,sha256=hELFkBuB_6I3_y2xencOolPXPUjEK3xXCgfzC4lAuCA,2195
aiogram/methods/edit_general_forum_topic.py,sha256=PK37qgJRVISQWhYAWlg3LNGmgneVdQxpJCa1dMiq_uY,1306
aiogram/methods/edit_message_caption.py,sha256=wv-USNcfyHIjskv6PaSQAABE9yDK8lr9lgDS5yBfiVM,3995
aiogram/methods/edit_message_live_location.py,sha256=akOy16TytMIR1ONYR8lu8W48HplUl9ugqW-tttrn2Zk,4205
aiogram/methods/edit_message_media.py,sha256=fjDjBVQ6jbHoSDsxX3_19Q_TF-WzACaItS4gfdKtGuw,3529
aiogram/methods/edit_message_reply_markup.py,sha256=H5elelToPCzLoOsGDDfOa7nXRQ10AMhxP13quMGRt1k,2658
aiogram/methods/edit_message_text.py,sha256=IQPTgqWDn-xK5L7hjJ3FOhJqe8DJC9uRnnVWE-gmWcs,4345
aiogram/methods/export_chat_invite_link.py,sha256=oC00_UAsmJ7icNtjmnCbQ9sYyJLoOujNJsLIRMyx9qg,1792
aiogram/methods/forward_message.py,sha256=KM6v9CrqMnwC0YLgiIEVxTFBUmb5GhFfAMycrxY0IJ4,2655
aiogram/methods/forward_messages.py,sha256=BIUEDoLp8jD5YglFN2pbHp6FtuhMFMB1VCSzMPhtOPs,2774
aiogram/methods/get_business_connection.py,sha256=wJhKMcBoLcOXTxK1_xG8SR2h85e1sW1C4sWD6L6bTTM,1200
aiogram/methods/get_chat.py,sha256=yOPjLV12HVZOk6ch2bUOfyrZBPIhyAXhhHEhiZKEdro,1145
aiogram/methods/get_chat_administrators.py,sha256=uxzQWmNc0EJRJ-c0ecJmjLPWDOwlMD1KWDiOAnqofxs,1815
aiogram/methods/get_chat_member.py,sha256=pltcJQL_aSljObA_XAVa9chzyC5saahC-jCA85U0Z_E,1857
aiogram/methods/get_chat_member_count.py,sha256=phZ05LJUn3EAXBuH_7HqMFOuTg99nyVNjNEVWry1sto,1067
aiogram/methods/get_chat_menu_button.py,sha256=Ko5U5PMvTP08x8SkCUddFASaGr-LbtP_4GhvbM-TP7c,1362
aiogram/methods/get_custom_emoji_stickers.py,sha256=ob0rvnUFtuDlZ6GmNHlFZH2hNZNITf2k0mjBBvmeNY0,1201
aiogram/methods/get_file.py,sha256=FutkpYaOz_xjdU_1FwGY75ZYZ-uqBCZapZBiE5K9sC0,1571
aiogram/methods/get_forum_topic_icon_stickers.py,sha256=TUAX41OPjlluu3zxI-_lYCzBHzX-Wa_Fgde727H4llg,557
aiogram/methods/get_game_high_scores.py,sha256=IhEZ81rRGOh_pkq54qGys0RGoywhTG7I5UdYikoVS8A,2156
aiogram/methods/get_me.py,sha256=gA4vD-v3WYPpZaSTy6mpGZmsV5WXdSHv06EymV9ZQnU,439
aiogram/methods/get_my_commands.py,sha256=67G3OlYrwZAnQZM8D2nQwNwEhPB1siDqOvMkc9saSgo,2464
aiogram/methods/get_my_default_administrator_rights.py,sha256=dw1MnQACVfVsQeYs5ikZG1jThB15HR8Trv1xHg_oSLY,1359
aiogram/methods/get_my_description.py,sha256=UzgJhr6sl4i4RD9LIYxvTx4z4V3cZMGQavCFucWwv1I,1156
aiogram/methods/get_my_name.py,sha256=GGY2ZnZ_uXL5GqRKHJ2uXs5v_LUBqg6yx0NdrBLZoy8,1057
aiogram/methods/get_my_short_description.py,sha256=yRQ0ertSdcbEy32FC07FAo12q7eyLEN04h0gkxzpmGE,1203
aiogram/methods/get_star_transactions.py,sha256=kCp-vAuYCbogKN6PQ4_ulx4ByBatWbMwuXUTsMib22M,1374
aiogram/methods/get_sticker_set.py,sha256=oh9jEInEgKDfOhAu58ex4rUYRCJCk-BTsOAvNa7GPMg,965
aiogram/methods/get_updates.py,sha256=dMl44T18fGWKDG2ZK-GQ2OJu7PIYe3GJ93IzX26LXqs,3024
aiogram/methods/get_user_chat_boosts.py,sha256=2HYUsuZMxrP-YdZO7S4rX0QItzjUN8H01mmwvm2SSkc,1255
aiogram/methods/get_user_profile_photos.py,sha256=URseFqr69kRj4-gqNkSl4TsiEaAK78iAyjYrTv4tCpA,1507
aiogram/methods/get_webhook_info.py,sha256=8h38GW1au2fAZau2qmXuOnmu-H6kIjXQEms3VKLJf5c,576
aiogram/methods/hide_general_forum_topic.py,sha256=dKPkMB4okbduRG9K-Mah5hf6OsKzGg8NrtnTQdcVu78,1270
aiogram/methods/leave_chat.py,sha256=m3F4mKwOmJaxk958rbBZqGIRcM7007JMce1S2zpEvPY,1063
aiogram/methods/log_out.py,sha256=yBkCbabI7CRBkTHwhJ61KmqazMxiUuGRMhxlzl7BWB4,660
aiogram/methods/pin_chat_message.py,sha256=njAbF_yEAZobt9b-0CqxblQpJ2M-jAgZHDpKdw_THAI,2143
aiogram/methods/promote_chat_member.py,sha256=BDT9L1MIVTwWrmph-HUe0Rh7kKMPQt4bkMkICPiDfgE,5568
aiogram/methods/refund_star_payment.py,sha256=s-eELWhpYoE8ubWNvlYc0dmPGCcBiATS0fU50IXXZ5g,1264
aiogram/methods/reopen_forum_topic.py,sha256=TfJtX4zGVNYjjhivHRwBFV9sbWINhr8k_q5lXoLtITw,1480
aiogram/methods/reopen_general_forum_topic.py,sha256=kxJtoOauJNWYxqesoT6qeDvXAJujUZvK-3QO5lnFEw8,1287
aiogram/methods/replace_sticker_in_set.py,sha256=df80oQuwZsYrbmUixIPxtQ75iUqIMZXsiIyoMZHious,1858
aiogram/methods/restrict_chat_member.py,sha256=KFAtkHVDqA4Ny4quy1jCnqH1mxf_5kSo8kDlA_ben4Q,2751
aiogram/methods/revoke_chat_invite_link.py,sha256=RrIN4jcxTHaoThF0Dru3d4z7RGEQk0u0cTkNx13Do-s,1526
aiogram/methods/send_animation.py,sha256=axQu7PxIUqpMtxCJH-7-5aUxzTl1UnUexDMkXXzRK3c,7678
aiogram/methods/send_audio.py,sha256=6SrnsKd4smXuDLR3PfpgV9gf2TXBb42GtBxJGt6jeBY,7134
aiogram/methods/send_chat_action.py,sha256=sOrGWv2bA9Przot-gPT1ksZ8UEhPpJeEsd7tPd-06gg,3187
aiogram/methods/send_contact.py,sha256=zyup2lC1OQ94IXs1yW0Or4j8SaAqUe_a_AVTIE1rlJs,5053
aiogram/methods/send_dice.py,sha256=v4j0-lETnu_rjj8oD3KdvOwMUh_IkXXcnWJW7jZmg-E,4823
aiogram/methods/send_document.py,sha256=-ANAOHscFJhk3Y0LfmvAO_1_u3BUhEdBQ3YYafc5u64,6886
aiogram/methods/send_game.py,sha256=gtcKxuwixa1N3JXOY8bLqCuvQ30QYrhi89VChwRTDmU,4243
aiogram/methods/send_invoice.py,sha256=grSq2uQhWGWI4VLTCVBsuzbkrnrOkLAlBALUb8NLmbE,10135
aiogram/methods/send_location.py,sha256=52UX5uvJBNfA80CEdmSEPTAmymurXXkYeEPXNitaY38,5851
aiogram/methods/send_media_group.py,sha256=C67CTZUPPgqrDLGwP1mxzREridLXhBMpVKyfzL2wS-c,4430
aiogram/methods/send_message.py,sha256=pMW81tP9p21i6iMo_KWYBhgy_uM2k_oa1_7kLQ81HN4,6112
aiogram/methods/send_paid_media.py,sha256=Wf66l54kgMqWGTfMioVe0xdS-P3x2NQ4MpZkcHfson0,4658
aiogram/methods/send_photo.py,sha256=2mN1S3ppYKaTzs6omllqGEZiRbd7Hx3XD5V1fxiOdwo,6492
aiogram/methods/send_poll.py,sha256=_ATWrR7o6OeI8bllk83HRsG24-8w7TQzif3qpxFxYrs,8387
aiogram/methods/send_sticker.py,sha256=mfqQAqLimwwNMhWwqokA7SQoNV17z1_cO-SiBBZFHAU,5284
aiogram/methods/send_venue.py,sha256=rYIxNQbd_fZJybWLcFS4OmbE2EYvKrReqQyegMpNoxo,5820
aiogram/methods/send_video.py,sha256=LfebSy4ucxxQi-euGGfTpXfLjWfn_AcCN7NkUh76tbk,7894
aiogram/methods/send_video_note.py,sha256=dAXiWtv1hngrGQONybstfrC_Q29po0BpKHuVzGKx9I4,6038
aiogram/methods/send_voice.py,sha256=Dk-oqbTfs_ZAHLpAyFgDlKd2sU0IVc8-8JAitlVNKRA,6282
aiogram/methods/set_chat_administrator_custom_title.py,sha256=lOizk5Z8-tUh6EOiZ2hRyVSUrP2qQzDHlcKIbJCKgSg,1490
aiogram/methods/set_chat_description.py,sha256=AvzTU_XRaTuI9s9iKX_hihCLpsH4F8du3dBQ-wrNZnU,1407
aiogram/methods/set_chat_menu_button.py,sha256=5y8sOvgs6cH4sWBa_NuBnsRH7sE8ch0_s4YygG1PbZY,1622
aiogram/methods/set_chat_permissions.py,sha256=x42Gmf910ycY0Nf5lCnM1Xe6z5bhjNqUMHA673X1J_A,2159
aiogram/methods/set_chat_photo.py,sha256=kHjTl8U-i5B03KaFIEKxQnT8Sgl8CAa_F9kQeFUW_9M,1394
aiogram/methods/set_chat_sticker_set.py,sha256=RFNtIcj8Lq8It6L6qoJLCk247RYVgGROdJM5UoF0HSQ,1571
aiogram/methods/set_chat_title.py,sha256=X21F3pX37t3z13-4o6WJfQHKVfLPr8c_HGO-vNqI3k0,1275
aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py,sha256=E8zURRFNnJnjzxVnYchBta807eCrarjMzpKWp0R5Ypg,1309
aiogram/methods/set_game_score.py,sha256=RDiYH61W1aN6WZoRLKI_vDQJz8-7V1I8tP__UbZLw1s,2626
aiogram/methods/set_message_reaction.py,sha256=bEK822WDw3OqvO99WU3IV543yYI7tWpA-mIJVgv2rGg,2457
aiogram/methods/set_my_commands.py,sha256=sjd1da-uPfDIH0OGTpuyZzBl8ARwbWPiMoAHenQc530,2803
aiogram/methods/set_my_default_administrator_rights.py,sha256=DKX3KXLXbfv-heE5uJfPbcFXQRvNG6ps3ih1bQNa5RY,1750
aiogram/methods/set_my_description.py,sha256=ww9IAjtC4X6Ti9cFlnE3dleZ_FKE6byjblGUYn2EqwI,1489
aiogram/methods/set_my_name.py,sha256=xqSgEYS3Rgr2ETQlvBuD_VopBsuDX_DZY_MnbsOoJgs,1274
aiogram/methods/set_my_short_description.py,sha256=ONiD6HfZxxnHRjPstEmuBqedjQVjZ-lSJPY14sTRPyc,1639
aiogram/methods/set_passport_data_errors.py,sha256=Z4SjM_CHHzXw_SQ5TsIFXvsrI5GTrgx0xO0kKrtnE7c,2922
aiogram/methods/set_sticker_emoji_list.py,sha256=rgUpD35X_QHAJmIbdgRBsXtF4p-wQcuRFFYmNBjDPpo,1201
aiogram/methods/set_sticker_keywords.py,sha256=usS8uLY4YghFWwNyJnpG9C5X9eRQ1PzGWfIxSKhPTOg,1320
aiogram/methods/set_sticker_mask_position.py,sha256=eoT5D9VmWuRNsUqyzrHlYWd_bVaK583o3hP_KsoevaI,1450
aiogram/methods/set_sticker_position_in_set.py,sha256=QJI3x-tobyjpFoEThjcqGQLjXWdCZTd59ei49Gi2Mcg,1100
aiogram/methods/set_sticker_set_thumbnail.py,sha256=l6hozWYpPQI-Y-QI2YxyXopG8ZXzGme-q2vdl4SUJvk,2891
aiogram/methods/set_sticker_set_title.py,sha256=kf1H5K3capHR5wlu91DXmP6Q1G_TG_AEJeivppuM-58,1011
aiogram/methods/set_webhook.py,sha256=5mPLVBDfSDbw2BEsSThw6wfErFTta_55UtyisYA4o1k,4476
aiogram/methods/stop_message_live_location.py,sha256=ZvsRZ_qADXt3Oxxk8-6nvOAHT5b-yL2v4isAxNChE7M,2539
aiogram/methods/stop_poll.py,sha256=xs5Bhzdwrny9CueVr1qfe6lOWjPqKoS8te9PYvpTZs4,1933
aiogram/methods/unban_chat_member.py,sha256=kCOiIN03O3RZG4esxneAnt87-iC24TKqW4FeAOcBPCY,1919
aiogram/methods/unban_chat_sender_chat.py,sha256=JwiCTYpl797vXH1iKEmHdvngNgmN3N5MzTM6Bd5QI3o,1376
aiogram/methods/unhide_general_forum_topic.py,sha256=vDxVKNhnBifPmhBxDtIgEGq9DLw5U0E-HUPoIVOEL_I,1223
aiogram/methods/unpin_all_chat_messages.py,sha256=1eYhMh4IsLV4x94XEC7oJkkFeiwe1LSpr_sj2ywyvUY,1303
aiogram/methods/unpin_all_forum_topic_messages.py,sha256=RDUz0D8kSuayzY0DU0DVo6ez2dUH8VdqBmTSthCECCc,1489
aiogram/methods/unpin_all_general_forum_topic_messages.py,sha256=O_PhZuwarHW9I2iFIHggOqgc7QfXtF1GEqZYweOH5PA,1248
aiogram/methods/unpin_chat_message.py,sha256=9iiJcGt8sU1vYKKeMGpk7KgMvTXnLysywExpsjWckgs,1978
aiogram/methods/upload_sticker_file.py,sha256=TgGArcP8fVpAOM7GRmpbk7GO3sKn2PfBEV--WOo0NKo,1951
aiogram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/types/__init__.py,sha256=YUQNYA592qPfHdhV_Lv90St1aCXLaMYyzOm-QQhLcNw,18420
aiogram/types/__pycache__/__init__.cpython-311.pyc,,
aiogram/types/__pycache__/animation.cpython-311.pyc,,
aiogram/types/__pycache__/audio.cpython-311.pyc,,
aiogram/types/__pycache__/background_fill.cpython-311.pyc,,
aiogram/types/__pycache__/background_fill_freeform_gradient.cpython-311.pyc,,
aiogram/types/__pycache__/background_fill_gradient.cpython-311.pyc,,
aiogram/types/__pycache__/background_fill_solid.cpython-311.pyc,,
aiogram/types/__pycache__/background_type.cpython-311.pyc,,
aiogram/types/__pycache__/background_type_chat_theme.cpython-311.pyc,,
aiogram/types/__pycache__/background_type_fill.cpython-311.pyc,,
aiogram/types/__pycache__/background_type_pattern.cpython-311.pyc,,
aiogram/types/__pycache__/background_type_wallpaper.cpython-311.pyc,,
aiogram/types/__pycache__/base.cpython-311.pyc,,
aiogram/types/__pycache__/birthdate.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_all_chat_administrators.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_all_group_chats.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_all_private_chats.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_chat.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_chat_administrators.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_chat_member.cpython-311.pyc,,
aiogram/types/__pycache__/bot_command_scope_default.cpython-311.pyc,,
aiogram/types/__pycache__/bot_description.cpython-311.pyc,,
aiogram/types/__pycache__/bot_name.cpython-311.pyc,,
aiogram/types/__pycache__/bot_short_description.cpython-311.pyc,,
aiogram/types/__pycache__/business_connection.cpython-311.pyc,,
aiogram/types/__pycache__/business_intro.cpython-311.pyc,,
aiogram/types/__pycache__/business_location.cpython-311.pyc,,
aiogram/types/__pycache__/business_messages_deleted.cpython-311.pyc,,
aiogram/types/__pycache__/business_opening_hours.cpython-311.pyc,,
aiogram/types/__pycache__/business_opening_hours_interval.cpython-311.pyc,,
aiogram/types/__pycache__/callback_game.cpython-311.pyc,,
aiogram/types/__pycache__/callback_query.cpython-311.pyc,,
aiogram/types/__pycache__/chat.cpython-311.pyc,,
aiogram/types/__pycache__/chat_administrator_rights.cpython-311.pyc,,
aiogram/types/__pycache__/chat_background.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_added.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_removed.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_source.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_source_gift_code.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_source_giveaway.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_source_premium.cpython-311.pyc,,
aiogram/types/__pycache__/chat_boost_updated.cpython-311.pyc,,
aiogram/types/__pycache__/chat_full_info.cpython-311.pyc,,
aiogram/types/__pycache__/chat_invite_link.cpython-311.pyc,,
aiogram/types/__pycache__/chat_join_request.cpython-311.pyc,,
aiogram/types/__pycache__/chat_location.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_administrator.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_banned.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_left.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_member.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_owner.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_restricted.cpython-311.pyc,,
aiogram/types/__pycache__/chat_member_updated.cpython-311.pyc,,
aiogram/types/__pycache__/chat_permissions.cpython-311.pyc,,
aiogram/types/__pycache__/chat_photo.cpython-311.pyc,,
aiogram/types/__pycache__/chat_shared.cpython-311.pyc,,
aiogram/types/__pycache__/chosen_inline_result.cpython-311.pyc,,
aiogram/types/__pycache__/contact.cpython-311.pyc,,
aiogram/types/__pycache__/custom.cpython-311.pyc,,
aiogram/types/__pycache__/dice.cpython-311.pyc,,
aiogram/types/__pycache__/document.cpython-311.pyc,,
aiogram/types/__pycache__/downloadable.cpython-311.pyc,,
aiogram/types/__pycache__/encrypted_credentials.cpython-311.pyc,,
aiogram/types/__pycache__/encrypted_passport_element.cpython-311.pyc,,
aiogram/types/__pycache__/error_event.cpython-311.pyc,,
aiogram/types/__pycache__/external_reply_info.cpython-311.pyc,,
aiogram/types/__pycache__/file.cpython-311.pyc,,
aiogram/types/__pycache__/force_reply.cpython-311.pyc,,
aiogram/types/__pycache__/forum_topic.cpython-311.pyc,,
aiogram/types/__pycache__/forum_topic_closed.cpython-311.pyc,,
aiogram/types/__pycache__/forum_topic_created.cpython-311.pyc,,
aiogram/types/__pycache__/forum_topic_edited.cpython-311.pyc,,
aiogram/types/__pycache__/forum_topic_reopened.cpython-311.pyc,,
aiogram/types/__pycache__/game.cpython-311.pyc,,
aiogram/types/__pycache__/game_high_score.cpython-311.pyc,,
aiogram/types/__pycache__/general_forum_topic_hidden.cpython-311.pyc,,
aiogram/types/__pycache__/general_forum_topic_unhidden.cpython-311.pyc,,
aiogram/types/__pycache__/giveaway.cpython-311.pyc,,
aiogram/types/__pycache__/giveaway_completed.cpython-311.pyc,,
aiogram/types/__pycache__/giveaway_created.cpython-311.pyc,,
aiogram/types/__pycache__/giveaway_winners.cpython-311.pyc,,
aiogram/types/__pycache__/inaccessible_message.cpython-311.pyc,,
aiogram/types/__pycache__/inline_keyboard_button.cpython-311.pyc,,
aiogram/types/__pycache__/inline_keyboard_markup.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_article.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_audio.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_audio.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_document.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_gif.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_mpeg4_gif.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_photo.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_sticker.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_video.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_cached_voice.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_contact.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_document.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_game.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_gif.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_location.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_mpeg4_gif.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_photo.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_venue.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_video.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_result_voice.cpython-311.pyc,,
aiogram/types/__pycache__/inline_query_results_button.cpython-311.pyc,,
aiogram/types/__pycache__/input_contact_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/input_file.cpython-311.pyc,,
aiogram/types/__pycache__/input_invoice_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/input_location_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/input_media.cpython-311.pyc,,
aiogram/types/__pycache__/input_media_animation.cpython-311.pyc,,
aiogram/types/__pycache__/input_media_audio.cpython-311.pyc,,
aiogram/types/__pycache__/input_media_document.cpython-311.pyc,,
aiogram/types/__pycache__/input_media_photo.cpython-311.pyc,,
aiogram/types/__pycache__/input_media_video.cpython-311.pyc,,
aiogram/types/__pycache__/input_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/input_paid_media.cpython-311.pyc,,
aiogram/types/__pycache__/input_paid_media_photo.cpython-311.pyc,,
aiogram/types/__pycache__/input_paid_media_video.cpython-311.pyc,,
aiogram/types/__pycache__/input_poll_option.cpython-311.pyc,,
aiogram/types/__pycache__/input_sticker.cpython-311.pyc,,
aiogram/types/__pycache__/input_text_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/input_venue_message_content.cpython-311.pyc,,
aiogram/types/__pycache__/invoice.cpython-311.pyc,,
aiogram/types/__pycache__/keyboard_button.cpython-311.pyc,,
aiogram/types/__pycache__/keyboard_button_poll_type.cpython-311.pyc,,
aiogram/types/__pycache__/keyboard_button_request_chat.cpython-311.pyc,,
aiogram/types/__pycache__/keyboard_button_request_user.cpython-311.pyc,,
aiogram/types/__pycache__/keyboard_button_request_users.cpython-311.pyc,,
aiogram/types/__pycache__/labeled_price.cpython-311.pyc,,
aiogram/types/__pycache__/link_preview_options.cpython-311.pyc,,
aiogram/types/__pycache__/location.cpython-311.pyc,,
aiogram/types/__pycache__/login_url.cpython-311.pyc,,
aiogram/types/__pycache__/mask_position.cpython-311.pyc,,
aiogram/types/__pycache__/maybe_inaccessible_message.cpython-311.pyc,,
aiogram/types/__pycache__/menu_button.cpython-311.pyc,,
aiogram/types/__pycache__/menu_button_commands.cpython-311.pyc,,
aiogram/types/__pycache__/menu_button_default.cpython-311.pyc,,
aiogram/types/__pycache__/menu_button_web_app.cpython-311.pyc,,
aiogram/types/__pycache__/message.cpython-311.pyc,,
aiogram/types/__pycache__/message_auto_delete_timer_changed.cpython-311.pyc,,
aiogram/types/__pycache__/message_entity.cpython-311.pyc,,
aiogram/types/__pycache__/message_id.cpython-311.pyc,,
aiogram/types/__pycache__/message_origin.cpython-311.pyc,,
aiogram/types/__pycache__/message_origin_channel.cpython-311.pyc,,
aiogram/types/__pycache__/message_origin_chat.cpython-311.pyc,,
aiogram/types/__pycache__/message_origin_hidden_user.cpython-311.pyc,,
aiogram/types/__pycache__/message_origin_user.cpython-311.pyc,,
aiogram/types/__pycache__/message_reaction_count_updated.cpython-311.pyc,,
aiogram/types/__pycache__/message_reaction_updated.cpython-311.pyc,,
aiogram/types/__pycache__/order_info.cpython-311.pyc,,
aiogram/types/__pycache__/paid_media.cpython-311.pyc,,
aiogram/types/__pycache__/paid_media_info.cpython-311.pyc,,
aiogram/types/__pycache__/paid_media_photo.cpython-311.pyc,,
aiogram/types/__pycache__/paid_media_preview.cpython-311.pyc,,
aiogram/types/__pycache__/paid_media_video.cpython-311.pyc,,
aiogram/types/__pycache__/passport_data.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_data_field.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_file.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_files.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_front_side.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_reverse_side.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_selfie.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_translation_file.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_translation_files.cpython-311.pyc,,
aiogram/types/__pycache__/passport_element_error_unspecified.cpython-311.pyc,,
aiogram/types/__pycache__/passport_file.cpython-311.pyc,,
aiogram/types/__pycache__/photo_size.cpython-311.pyc,,
aiogram/types/__pycache__/poll.cpython-311.pyc,,
aiogram/types/__pycache__/poll_answer.cpython-311.pyc,,
aiogram/types/__pycache__/poll_option.cpython-311.pyc,,
aiogram/types/__pycache__/pre_checkout_query.cpython-311.pyc,,
aiogram/types/__pycache__/proximity_alert_triggered.cpython-311.pyc,,
aiogram/types/__pycache__/reaction_count.cpython-311.pyc,,
aiogram/types/__pycache__/reaction_type.cpython-311.pyc,,
aiogram/types/__pycache__/reaction_type_custom_emoji.cpython-311.pyc,,
aiogram/types/__pycache__/reaction_type_emoji.cpython-311.pyc,,
aiogram/types/__pycache__/reaction_type_paid.cpython-311.pyc,,
aiogram/types/__pycache__/refunded_payment.cpython-311.pyc,,
aiogram/types/__pycache__/reply_keyboard_markup.cpython-311.pyc,,
aiogram/types/__pycache__/reply_keyboard_remove.cpython-311.pyc,,
aiogram/types/__pycache__/reply_parameters.cpython-311.pyc,,
aiogram/types/__pycache__/response_parameters.cpython-311.pyc,,
aiogram/types/__pycache__/revenue_withdrawal_state.cpython-311.pyc,,
aiogram/types/__pycache__/revenue_withdrawal_state_failed.cpython-311.pyc,,
aiogram/types/__pycache__/revenue_withdrawal_state_pending.cpython-311.pyc,,
aiogram/types/__pycache__/revenue_withdrawal_state_succeeded.cpython-311.pyc,,
aiogram/types/__pycache__/sent_web_app_message.cpython-311.pyc,,
aiogram/types/__pycache__/shared_user.cpython-311.pyc,,
aiogram/types/__pycache__/shipping_address.cpython-311.pyc,,
aiogram/types/__pycache__/shipping_option.cpython-311.pyc,,
aiogram/types/__pycache__/shipping_query.cpython-311.pyc,,
aiogram/types/__pycache__/star_transaction.cpython-311.pyc,,
aiogram/types/__pycache__/star_transactions.cpython-311.pyc,,
aiogram/types/__pycache__/sticker.cpython-311.pyc,,
aiogram/types/__pycache__/sticker_set.cpython-311.pyc,,
aiogram/types/__pycache__/story.cpython-311.pyc,,
aiogram/types/__pycache__/successful_payment.cpython-311.pyc,,
aiogram/types/__pycache__/switch_inline_query_chosen_chat.cpython-311.pyc,,
aiogram/types/__pycache__/text_quote.cpython-311.pyc,,
aiogram/types/__pycache__/transaction_partner.cpython-311.pyc,,
aiogram/types/__pycache__/transaction_partner_fragment.cpython-311.pyc,,
aiogram/types/__pycache__/transaction_partner_other.cpython-311.pyc,,
aiogram/types/__pycache__/transaction_partner_telegram_ads.cpython-311.pyc,,
aiogram/types/__pycache__/transaction_partner_user.cpython-311.pyc,,
aiogram/types/__pycache__/update.cpython-311.pyc,,
aiogram/types/__pycache__/user.cpython-311.pyc,,
aiogram/types/__pycache__/user_chat_boosts.cpython-311.pyc,,
aiogram/types/__pycache__/user_profile_photos.cpython-311.pyc,,
aiogram/types/__pycache__/user_shared.cpython-311.pyc,,
aiogram/types/__pycache__/users_shared.cpython-311.pyc,,
aiogram/types/__pycache__/venue.cpython-311.pyc,,
aiogram/types/__pycache__/video.cpython-311.pyc,,
aiogram/types/__pycache__/video_chat_ended.cpython-311.pyc,,
aiogram/types/__pycache__/video_chat_participants_invited.cpython-311.pyc,,
aiogram/types/__pycache__/video_chat_scheduled.cpython-311.pyc,,
aiogram/types/__pycache__/video_chat_started.cpython-311.pyc,,
aiogram/types/__pycache__/video_note.cpython-311.pyc,,
aiogram/types/__pycache__/voice.cpython-311.pyc,,
aiogram/types/__pycache__/web_app_data.cpython-311.pyc,,
aiogram/types/__pycache__/web_app_info.cpython-311.pyc,,
aiogram/types/__pycache__/webhook_info.cpython-311.pyc,,
aiogram/types/__pycache__/write_access_allowed.cpython-311.pyc,,
aiogram/types/animation.py,sha256=W9LGC1-JeWGolCU3OI1a3dXjtD5pCnaOd_J7ulWhau8,2673
aiogram/types/audio.py,sha256=2WPtZmAQfW6ewCb6ozlcfXXZACQEX7c1MYTEVMAy9Lw,2823
aiogram/types/background_fill.py,sha256=sJj85JGxTXOJVd_dq0jpgH5TbBPlvRKFNjk2CNoM5Bw,513
aiogram/types/background_fill_freeform_gradient.py,sha256=R74cAjirD-pqisj3KiMKuQj5uALD7ZY5DagTNYZ18Xk,1207
aiogram/types/background_fill_gradient.py,sha256=bSkNQPDrdWCrSIoCSBE3iFI3NaOAk2cktmLOFUbX2qA,1434
aiogram/types/background_fill_solid.py,sha256=cL3N_tRhRdpM3rGYjHqh1c05Ys1_w5Sn5RVFX4Kzrhc,1022
aiogram/types/background_type.py,sha256=_UKdw_LQfpR4z7W8wdtEmKV38EUlsSCheh0l4O0d90Y,540
aiogram/types/background_type_chat_theme.py,sha256=1mylq_KCHfLYikVuv2FVNHTK-FivuOc3fIN16ThxGX0,1077
aiogram/types/background_type_fill.py,sha256=P3mjIBc_oZspRCYLZvep1Tjx2F2r3Gz8QnK3ZhBRXr0,1656
aiogram/types/background_type_pattern.py,sha256=7y5N7vxg4EauwCLqAf_7VjfYGcdDLWt5P2wieNZl9i4,2514
aiogram/types/background_type_wallpaper.py,sha256=6uYeiZ4xQBTmJY0jCTeUFAj65Q872NZL7D2-WMeSLac,1868
aiogram/types/base.py,sha256=ZAKfSk-DVyoBoYdyyZUTkoIKzuaj0kJS0ophsohsdI4,1762
aiogram/types/birthdate.py,sha256=ev957uyU2tG4cRqQ838h8LHW0uIPFUu0TdC1YfL0mnY,1056
aiogram/types/bot_command.py,sha256=rJuwZroECtHDZxhyv92K2vyTUlXdieXdCEhewEsIPk0,1017
aiogram/types/bot_command_scope.py,sha256=rs7YoyRACVLm4tMMEQ01LM6ckWbF7o81edYEAnWXoyY,951
aiogram/types/bot_command_scope_all_chat_administrators.py,sha256=3wvcWAh_yZADVbqPQD09kd1hyjmDL_KuoYR8us7A0jI,1311
aiogram/types/bot_command_scope_all_group_chats.py,sha256=BElN12t3RwjYAFgo__K4PSUA5Mf0Vgzx6lzrhO1_kOY,1225
aiogram/types/bot_command_scope_all_private_chats.py,sha256=1Ww3HUSSJINy4qNSqF5lybQJwWHpflhMM2So6EMplyg,1226
aiogram/types/bot_command_scope_chat.py,sha256=chjf7klLRhCM8AB1xwkfkPfUXcw-_vnQekRVkiIB1Rs,1327
aiogram/types/bot_command_scope_chat_administrators.py,sha256=ezkiv48UyMIlKyZXvmlmsLi9cop5pk6cZW6FLgFJr-E,1518
aiogram/types/bot_command_scope_chat_member.py,sha256=IvFP2cemuZtMFdIn7T7hfo4o4-35_1ZBTOHV5pARCQI,1513
aiogram/types/bot_command_scope_default.py,sha256=Aqa5eiFS2_2rd8S19i7qfBPIk8TNPVdOEOMR1oSPMuI,1270
aiogram/types/bot_description.py,sha256=daKHDJ4d2c9j7wCTKwDLgbXy1HNrjbYkZkwC9D7FiPQ,781
aiogram/types/bot_name.py,sha256=ut3sf9j5LYd2xki-_pZ1lnVvN7HOUr6v37llIi75j6w,717
aiogram/types/bot_short_description.py,sha256=UdHLoRvp1hdhEg-W1XYUoDwPeCxvuU2H430JrNDiY4U,849
aiogram/types/business_connection.py,sha256=B3LuYw0bZwli2E2d6L9CGE_Rm1IvnzpD0RyCmZWxljU,2056
aiogram/types/business_intro.py,sha256=TTTNSlPX-bvzbDqKd-YzwXaUjgznpZxnBDGtAKpmSBc,1303
aiogram/types/business_location.py,sha256=OHFm2V3jLoRWJdXS3ubflMjFGd2Wo6sMhMhvsHbJUUY,1103
aiogram/types/business_messages_deleted.py,sha256=AZvMF6tTIcq1pRoY2lHE8VPNJ26l5lgaeXLZ0rwZEq0,1478
aiogram/types/business_opening_hours.py,sha256=R0il4hXIel_WWaB0DZUR3lgd816IDxXZFwmEi04glSE,1282
aiogram/types/business_opening_hours_interval.py,sha256=NFi-_QWLEN_0D1fPpqqp2TlrdWBJ71Rz7c4P-lSWj9Y,1329
aiogram/types/callback_game.py,sha256=AF-WqkqFcC6nG_tKoNX1sRjRiKEstbEFJfLy4NPKtRQ,298
aiogram/types/callback_query.py,sha256=JBnbrz0j0C6zK1eMeCgQ7l28ytKVxxkExVbwDsc2u4Y,6017
aiogram/types/chat.py,sha256=LnnFHYcYdWkXZ3KNIedhnXpqbt_d_jDoan2fQdATNpA,64452
aiogram/types/chat_administrator_rights.py,sha256=xwIgM6y2daN5FSYNJagmhBtgEy88S9GTSQk_OWgrykU,4578
aiogram/types/chat_background.py,sha256=tGylRgxxa5pMDsuQFkG2XrY7mKQCsA9lc-BsaArwXEE,1400
aiogram/types/chat_boost.py,sha256=iAbDstYKPATDpf9C0UTaeeipi1kcFedXhiTC6INxEuQ,1879
aiogram/types/chat_boost_added.py,sha256=4WPPng6cqzhb0qpepGeu4mAoga2ieA2vmqIxWQR5n-A,811
aiogram/types/chat_boost_removed.py,sha256=phu1WXsR6noLlEuiwyF1S0HzlwDmFsk2vwc9TRJ00K0,1768
aiogram/types/chat_boost_source.py,sha256=-s9Um1lFg4ab2MiQpb1SpJlKM2hJHZkpM43TQE6GEMo,476
aiogram/types/chat_boost_source_gift_code.py,sha256=VkPQktCIZdyI7wvhR-c7hgDs8lI2XySv_tCX1IJoFDc,1378
aiogram/types/chat_boost_source_giveaway.py,sha256=ncM8YI0ra6Jb_cDeOFFfm1l0sDwaZT4TNVGbFbas6Zo,1976
aiogram/types/chat_boost_source_premium.py,sha256=nN3o9Kvt5JHXcp1RpYq1WDX8Szzn9so1-FgGR1Olf38,1278
aiogram/types/chat_boost_updated.py,sha256=L0LKL6jutsHYPbCDQoXHaZVjIS5y7uIDXlacKNIFvE0,1002
aiogram/types/chat_full_info.py,sha256=gYA2B-STpK5Iz3sGxlKYBdJ1tDJNNC_LgJbJGI47dlY,13713
aiogram/types/chat_invite_link.py,sha256=BBsofu3IJb7dpZvZHnZNStaaVWYhb8Bn9AhMq6jc_d4,2638
aiogram/types/chat_join_request.py,sha256=IeM2JRKIMVyVBXA1309TLoNuBo-ExjIbkNJL53YUYeU,171076
aiogram/types/chat_location.py,sha256=qZUA9NnQBDCHRLvKDP1Oo0wDX5T5tw-j14-NX8tlXSM,1062
aiogram/types/chat_member.py,sha256=sq0RhcwghiW4Gy9XJTskFA3dHxaol5EA5Oify1QJfz4,722
aiogram/types/chat_member_administrator.py,sha256=d7se9Lm1AWDuZRNYGbK3ZLC2NkZVkSzegziJ0Lx66Qc,5453
aiogram/types/chat_member_banned.py,sha256=bvvMSTPn4iNy6N5nGoPYoxR3pjqDZhFFqvGC_Jb1T3M,1500
aiogram/types/chat_member_left.py,sha256=YhW1LjLUG5TDTARmj44DaJ0OyX2Gm8CW9-K6EA7LYgI,1254
aiogram/types/chat_member_member.py,sha256=2AtZsJz3aICbn2eqCmG1p0UsBYSqlNLmN-wnqnC6uks,1482
aiogram/types/chat_member_owner.py,sha256=2gV3f1ubns_eORZjJocWSuwH8IW_cv2j2I0MuHbVa68,1676
aiogram/types/chat_member_restricted.py,sha256=7F40ERHf29ihfrB4tTc9JWL5w5xRBjqVLGoMWMgyWlg,4545
aiogram/types/chat_member_updated.py,sha256=AS5_q6EXSBL2Wuy6lQXzn7gaXUPGZJWOWgGK1GCvx2c,87547
aiogram/types/chat_permissions.py,sha256=A6I6DuCQGRWBqhQuVe8xMnRkd9i0iD7gOZm6Qg7m0LY,4382
aiogram/types/chat_photo.py,sha256=BouKO-6NIn5d17fB9acX9iAbv_gjYzbeKuTqN3BcFD4,1872
aiogram/types/chat_shared.py,sha256=O6taLjKlBX-z15XYZ6Hcp9SsUCYhBa9Sz7hKzAvi2as,2260
aiogram/types/chosen_inline_result.py,sha256=VFMo9FklvYjWrPbwrxeIyHrDwLlRvnFObUV5EhaannU,2399
aiogram/types/contact.py,sha256=jWvv9gc-4LyFyBLeAeucyr7A8yjBk7-sJQH10NKoydU,1848
aiogram/types/custom.py,sha256=3Xqsx2Llx47Hu1v4hGEFOjbMzkgkdQ9lmKW87Atulp4,819
aiogram/types/dice.py,sha256=QOFOqUx3jqVtqU_nwuWhhSthy5CBR_mNTMuIpwiD2KY,1165
aiogram/types/document.py,sha256=6tKzYSPyON6BoWLn3F3tiXHUxaQNG1YNl6kC6bO-0ZE,2425
aiogram/types/downloadable.py,sha256=FbRdIM3Cpw3tcDzZvwy__u98aSKqMMJn2kKh9mK62B0,77
aiogram/types/encrypted_credentials.py,sha256=1ZC-Q3c84mEVZGEK_cXTkqzX4FzBujn0_necxJ1uSPc,1521
aiogram/types/encrypted_passport_element.py,sha256=9RmD1xbkrWw-DFb8QCUCWENswXBKklGqy0G3SX_TB78,4733
aiogram/types/error_event.py,sha256=m0QrLksRJ0-x0q5xpb6iyI4rqPfiz3XJom_Gh75CJ-8,714
aiogram/types/external_reply_info.py,sha256=aYYuCYyyz5DL3zhDgdECSkdvf6HyiiHSTN61dyVMGmU,7185
aiogram/types/file.py,sha256=52bE-c7RjZmTdXk8ij8PJ5fsx2-1IfgedM763PmzGnQ,2166
aiogram/types/force_reply.py,sha256=YkTteaPMOUH544hl9h6VDypMxyiLIKFd9KXryouTmVM,3024
aiogram/types/forum_topic.py,sha256=CchPMME1NgB8WT9FWLgQ5mYZ7uXFG2yuTmDMaDZ6kcU,1422
aiogram/types/forum_topic_closed.py,sha256=aw1K6fIadwJtSTZnyTQq3xtEf7920vodFjK5lHeKVgs,309
aiogram/types/forum_topic_created.py,sha256=OPYpne_Zz5tdOpzjYOXGplCxLhF1aeKnHFzpn3qXIRg,1321
aiogram/types/forum_topic_edited.py,sha256=Fq8QDirNBsymOKbAxBYnFqhmXL52XuqKAQrLxePRyA8,1230
aiogram/types/forum_topic_reopened.py,sha256=MloV3nhDpHSLe5VoVgmC99u7ch3IYahIHH2EokGCWgY,315
aiogram/types/game.py,sha256=AUnwPfixbvWpzxfoHziedT7WJtoF02vxBNz791j0fro,2365
aiogram/types/game_high_score.py,sha256=rwCyO24y4BkcTJSmoLPA7pGEsgfA6-_3i40uvCgxp6k,1203
aiogram/types/general_forum_topic_hidden.py,sha256=QC3u0Qpt3nptdhl3dxqgNXVrptwSAdnEzI-OWP8QMMw,301
aiogram/types/general_forum_topic_unhidden.py,sha256=W8HRGyB81eyooaucgD0ojeAzywD8AjnMnUf2hf7r5Nk,307
aiogram/types/giveaway.py,sha256=N5k2AXEdBRKRaHfDbYl_YuRGARaIAiOP1S49cAkGgc4,3042
aiogram/types/giveaway_completed.py,sha256=m6QrBVrfT5s2W4mt-LoJwvHodkV7eIc112HOHLf9Z3k,1515
aiogram/types/giveaway_created.py,sha256=6HYs2dBo4V6OBZpfoOAB7CxlMZQB_jPb01rEAw3RLe8,275
aiogram/types/giveaway_winners.py,sha256=t2b4tX6twU0wlOEJLvrTbD_PB2pAcL3LDSycXhvQNw0,3321
aiogram/types/inaccessible_message.py,sha256=Wn3WocufH3a8g0BE0S0TIK1pUQrt3NQBPAm-_9HhjSs,1288
aiogram/types/inline_keyboard_button.py,sha256=1AwstgKnWwqrt0dI57_bMZNQWXAuEP74gxpYtHKN024,4769
aiogram/types/inline_keyboard_markup.py,sha256=b6dxsxzM93LZyG41mXHPX4JKyKlPr3bqc-8s4zuUCpk,1273
aiogram/types/inline_query.py,sha256=XCXCRESvVpbepiIYiJLcF48rc35K8sKrmeFw8iciLf4,7410
aiogram/types/inline_query_result.py,sha256=8Ve8Fe1Yf6O7NHWCYdTVIgnbawI6hIo5B0l2cV5ZN20,2189
aiogram/types/inline_query_result_article.py,sha256=Keq9BuANquPGxWDw9D8Yra7_vNDSvYSRfqK5Ml9e9yE,3759
aiogram/types/inline_query_result_audio.py,sha256=6r3mHQQ4tA0kouOznWvE4izEJ9NarZBP-40-BOdn0Mo,4367
aiogram/types/inline_query_result_cached_audio.py,sha256=7oYplK6rrWZrDAcXQqZvpnKOW_Kuj1vQ1oa3sqj-VcQ,4018
aiogram/types/inline_query_result_cached_document.py,sha256=qvNPpMWQfJ-i_SCLDIHWDvuuRqFqYLuxqdLuaVq0_Nk,4360
aiogram/types/inline_query_result_cached_gif.py,sha256=Mawa0gyeGd4-MSjVAJ1Pm62pBSakp9SpvOsGXOhpQ7Q,4601
aiogram/types/inline_query_result_cached_mpeg4_gif.py,sha256=UtOhg-YOQPO3H3JkJZeZcUloxXgDmoaHHOBOg6x-GO0,4699
aiogram/types/inline_query_result_cached_photo.py,sha256=LQPdR2UW9hvnz68YOziipLaajVqCPzVzK8yhjHJZSxc,4769
aiogram/types/inline_query_result_cached_sticker.py,sha256=hqZ8ZvEv0jA0rf7WDVa4SVkaX5khDncpdSPoH5LWEcU,3100
aiogram/types/inline_query_result_cached_video.py,sha256=Uyr7rlAZO4djHXnhfyoEItN_Mu30W8NkooZICLN8LKk,4739
aiogram/types/inline_query_result_cached_voice.py,sha256=kvsqjskDe_Aor7WZvrijUsfZnJdum-krGxMwYl4GEGQ,4144
aiogram/types/inline_query_result_contact.py,sha256=vAmYCE49k7pWHNA-1-L0p7pD2TljNdzitFgsE_hrYDI,4111
aiogram/types/inline_query_result_document.py,sha256=yYEqSbiWqW3zDl2xX7WNcf2oraOu8zp7hr1BIqLrUeo,5047
aiogram/types/inline_query_result_game.py,sha256=9t2HzFgVgHjPW_pQZ4YBTeGptSbn9KOHcGsbEPpUwzQ,1758
aiogram/types/inline_query_result_gif.py,sha256=MNmFu5R4Jz1MbiDoznpsI7GBdy7-BB83QhVnF16HyhM,5577
aiogram/types/inline_query_result_location.py,sha256=FX_eYlVfcRkcTTxubrTu1m3jGFWbgLEyg0R0TFp3ybY,4961
aiogram/types/inline_query_result_mpeg4_gif.py,sha256=uL9AGdWYTaUJf3mM1v4iR-An8ZtWt-8XVpZY03vmZRI,5645
aiogram/types/inline_query_result_photo.py,sha256=zWHeeIKMYQWHYzdIg9li93ziZ8acH9m-MSDmOLAiJA4,5245
aiogram/types/inline_query_result_venue.py,sha256=pln1TVUl5cLvgxTxR1PEYLA7K69L9ZGAGxR_YQ0eQyY,4904
aiogram/types/inline_query_result_video.py,sha256=9u6L-4nZVtUspl4nomPe3d0AuQHDv7EA3H1CmZQaJs8,5842
aiogram/types/inline_query_result_voice.py,sha256=LUGfZZgL66NH6wppO9kpVnBoiCbC_zV6SBV3PBIBQJQ,4310
aiogram/types/inline_query_results_button.py,sha256=mcDUu9wvU35tBvH1BhICorSlJ25XUVbpJlh9BWE3HNQ,1878
aiogram/types/input_contact_message_content.py,sha256=GR2RDpizrX7rlxjf05CKzRT3zmLEO1yJSpqbmxCLwQA,1599
aiogram/types/input_file.py,sha256=oCElYrCtJgfP5_ck0MQxvGppVZyXW5BnsHcmSg1Ds1o,4672
aiogram/types/input_invoice_message_content.py,sha256=L4QePd9Bw7Mqy9L6vFTLL6iRsyJDB-YfOGfKNfVs24k,6899
aiogram/types/input_location_message_content.py,sha256=UmmTHtSm-0MbIp2pISbl6FoPo9rjKeBK0pKzKg66GvE,2374
aiogram/types/input_media.py,sha256=2nTD1Wg9VX8x74KTAf2d6OjjGTwPTUXaQL5Ty5TxvYQ,619
aiogram/types/input_media_animation.py,sha256=BLpBBGSBzSRKpG-K7mQwguiof4cR58ElSNPwH9PdefQ,4373
aiogram/types/input_media_audio.py,sha256=615pBywXCgGPIoeiqGep4D8SiMwTa83kmhasp0qqgHE,3706
aiogram/types/input_media_document.py,sha256=2Z89Foqhnh3LviuiMcaU9rWg2kCVPQdNMvL_KrGckFM,3628
aiogram/types/input_media_photo.py,sha256=QGqJC6qCGyEzbBLHsX8vw6pbnsk3l7eYA8AKmKA6WY4,3127
aiogram/types/input_media_video.py,sha256=Yugn-j1NmMjMFP7ztI8XQMJVDZ_2KV_xJYdOCFSBk2I,4509
aiogram/types/input_message_content.py,sha256=wj0C4RyiLpVP4yz0LmmO4qMNNIwRMihjnoMrjBSxjDE,793
aiogram/types/input_paid_media.py,sha256=z-STAz_0G590-eFlOYNTv_HP1LOWbACXM0XMYbEBXrg,380
aiogram/types/input_paid_media_photo.py,sha256=AHnkA6yvhhxdt_ffpCplgOxtqeh0YiDZ0WjVYj0boSA,1498
aiogram/types/input_paid_media_video.py,sha256=nKQwP5BtYARot0LjkAr-EOa7UfbL8DwtFqexwoTNIY4,2977
aiogram/types/input_poll_option.py,sha256=ky4L3A9Z2PuNTJL-WxMJ3o2zysphXaV2OukDdhXrLM4,1791
aiogram/types/input_sticker.py,sha256=8smkhrtpZraqVrA_v87UuO4uNqzK_9bvPPVvDRrmCuY,2438
aiogram/types/input_text_message_content.py,sha256=Er1EsUzQKV_p-spafMGNKL1saWlvvOmu4IBqFk03BaA,2720
aiogram/types/input_venue_message_content.py,sha256=CZsCPYQrFdP_BrYBzNJ_Ik39PlJ1VLOsvI5q9vRS0Ns,2411
aiogram/types/invoice.py,sha256=gOiw5G9yXJ8ZkAVupt2ww-mcooYanTix6t7KarSni9Y,1932
aiogram/types/keyboard_button.py,sha256=L0cHsJEsKQziqK3zJN6laQL9drC36AhbhMOG20vhzcE,4352
aiogram/types/keyboard_button_poll_type.py,sha256=tPGlW_jRXaDxZML1_vK080sp6BO86DO5cbBP-TEOf4Q,1153
aiogram/types/keyboard_button_request_chat.py,sha256=N8UBPPlrQ07OSCO-33mfP5lKJ744sugaS86dYWpxMRQ,4448
aiogram/types/keyboard_button_request_user.py,sha256=89efkQPnTYrtpBozhTvXp00YE8uKqgJInVUafJV7nkI,1990
aiogram/types/keyboard_button_request_users.py,sha256=bhj4_scIdCcKxWeuC8f8guU_tcWTvwrbISe_PycG-XE,2747
aiogram/types/labeled_price.py,sha256=7kRZPTy8HgJG4FYrix21xGfhgT_u93fROUBOj1wB4Rk,1330
aiogram/types/link_preview_options.py,sha256=xv8Z-qE_NBfojELQHSlgegmsXso661AL8562z8i0dls,2747
aiogram/types/location.py,sha256=0X9SBlANNn_ODEByFE0oDiJxpKtGEQ6OI6fDXB_1loA,2115
aiogram/types/login_url.py,sha256=VxZTVG1LbmKeon_spDg17HJiPh1l1buOI5eFBNLu1Rk,2771
aiogram/types/mask_position.py,sha256=ZH0pNJ8u4Xlos2MwCtsnSzMNfhgGvacCGdJ42qFp9no,1627
aiogram/types/maybe_inaccessible_message.py,sha256=TbxUHEoW88w4nWer6zhQhWaAjTqr2Xi3H9-ZJRfvA9Q,388
aiogram/types/menu_button.py,sha256=4Q2I_AlbnRe2fQ0f1a-LNl0toGOHI73ehjhMQmLngV4,2103
aiogram/types/menu_button_commands.py,sha256=NMmH1S0jcEivjXmzRfMTLJAO4UBKVhFuo8wS4ONgZwc,1038
aiogram/types/menu_button_default.py,sha256=FnjUz1-aXR3-0oHPv0pNU5yi1M86wnzwCbNnzEMu094,1027
aiogram/types/menu_button_web_app.py,sha256=G-yWLPg91mgaMP672VRj6xmB8_UqDpMeH2iePvY0rw0,1715
aiogram/types/message.py,sha256=AlHRfaN9KyEJjT887Jv6P52WLaMZvOKx_SgBEMcP7eM,240867
aiogram/types/message_auto_delete_timer_changed.py,sha256=D9GoK5tOtxWTksB_yaIKthfiHWJhOI6SUBWWpW_PRTY,1020
aiogram/types/message_entity.py,sha256=q_dWKJhMNVg8zGzIUy40b0viRNnBaZSPT_7ySANbwDw,3287
aiogram/types/message_id.py,sha256=4I7m_laQsIwLiTOVG3B59BJLvlzGTkf0gai9aazqs0I,805
aiogram/types/message_origin.py,sha256=uSs6n9q5JhIzaV42ldMJJL_8nAx_aCQ3xNqrRVMJsWg,518
aiogram/types/message_origin_channel.py,sha256=tgCfiuS81A0oWD9EY90F0P3B9s-Avsm0FJlw5ra8umA,1795
aiogram/types/message_origin_chat.py,sha256=_EE8lVR8Kp745dHTlT1zHYXEDImbGhq_nuZgteu9lbc,1725
aiogram/types/message_origin_hidden_user.py,sha256=N8WXMNcBlWSuDMRYUxsUiZubnOxsDFOr7GyYQKRrij4,1377
aiogram/types/message_origin_user.py,sha256=FTu0wnkg8AElOQtMjy2Ee-ApL2eX57a5qMrudWMWf90,1349
aiogram/types/message_reaction_count_updated.py,sha256=TKCPGGl2hKGFg4hizjdclB8hMzLjDsVP_48-uk_pKmI,1521
aiogram/types/message_reaction_updated.py,sha256=_-QSyiZFNlEy9s-aZp61AFq8yRUT3Kp_T1x7SDbKv34,2616
aiogram/types/order_info.py,sha256=ECWERhAIl3kkclMOwnNN9NHGQLUtW0B6oElkLubPPr4,1516
aiogram/types/paid_media.py,sha256=gw3vvGNuZugsvlWpqxuZs1Q81ALL9MTZ6RVP5EFMbmk,399
aiogram/types/paid_media_info.py,sha256=vCXLSVj5f9BHeI5t60EWllCMZykOtWFaVOglXZQKzC0,1327
aiogram/types/paid_media_photo.py,sha256=uRakDZNVUOHpvLoxMPxI0eKdfp1_x-hs1KEMvDriSEc,1130
aiogram/types/paid_media_preview.py,sha256=9ZIG6wR-De8VPU2y5Rn77czZFOdLcW_JxKXQeYsiycw,1522
aiogram/types/paid_media_video.py,sha256=afHhTgBEXuyms9V1FaGqJutjveZeHjESmYvav3D3_ck,1095
aiogram/types/passport_data.py,sha256=PT4TKdMo9drK6LeK_FgGS98wE8c-kCwHkB7HcjthguQ,1318
aiogram/types/passport_element_error.py,sha256=0MooyVK2Yoz-6MTnBDqbyiR9o-cYM5GoM6HC-p6X9jQ,1214
aiogram/types/passport_element_error_data_field.py,sha256=NQXIJOOjXP56vbMTgKl2z9QqTs7FyHlxURO2xSOMQI0,1850
aiogram/types/passport_element_error_file.py,sha256=tlUpJBAJFPUzHnCgd07gIS1c_HvFXFTpQWlB6Kipo_w,1619
aiogram/types/passport_element_error_files.py,sha256=UKY3feWaWnV7E0gVs2nTys43bbYmB-C3flQ2j0DbAdg,1734
aiogram/types/passport_element_error_front_side.py,sha256=669dn7UWwY4GnNnmaUBipHj8U22PahkJFmzLVerAGXk,1721
aiogram/types/passport_element_error_reverse_side.py,sha256=ZVfTzKDmrZqzwcOBNuzsSwfEUip8hHCzeRk2jyiWDak,1704
aiogram/types/passport_element_error_selfie.py,sha256=KR-TG1DguG1w9Kv1rIJRf7qkI_L7euSwr9h5IC8DAJU,1623
aiogram/types/passport_element_error_translation_file.py,sha256=Zm4DzT7yQoHHdANCgq0uW6kmskULr56hwjv0GFPWTGI,1843
aiogram/types/passport_element_error_translation_files.py,sha256=I_i-u15lAHxpCzhzj7Iiu8aTdbwyhQJfGeYp9p3woIs,1952
aiogram/types/passport_element_error_unspecified.py,sha256=KqvSPstDlkcEJRDA-JkFX5JK97uO9R4Nqx_Sbp5iW4Q,1651
aiogram/types/passport_file.py,sha256=tN7IbA6M4Zk6WH4CpVeI0exfi_UKoKOUiz1iT1e1epo,1599
aiogram/types/photo_size.py,sha256=J1rOX1QxScCjA0LPm4KgdLZBpsAQfscAaDfuocE4cC0,1664
aiogram/types/poll.py,sha256=dgCODf8MlNQKh74LfWuwfdOXli-N55kqwRWS3wl1pcg,3737
aiogram/types/poll_answer.py,sha256=HZoZQ4SiytyywLPa3ACX617QJ4zy3REXG_puRmtJdww,1614
aiogram/types/poll_option.py,sha256=KhsgOD64wZu2RCD6F6gsuT9z-5RKnOWMOFs-Cjwdnh4,1445
aiogram/types/pre_checkout_query.py,sha256=CaYsF1zvPb1k5cgka1GC12VMS3eZc3RWVba7VmRr6L4,4410
aiogram/types/proximity_alert_triggered.py,sha256=b2zF9r0sjf-cp6Gj-pyTIJq9x5a_JBjdp-DseDGpM_0,1253
aiogram/types/reaction_count.py,sha256=wmMH5iR_tOJ3ieSezjBzRCPQyt7RhH3Lbw8emodaxqE,1332
aiogram/types/reaction_type.py,sha256=EBHvWnPblOe2T6ey0_V9m6vReAX8VcHX4wuzKLVMR0w,442
aiogram/types/reaction_type_custom_emoji.py,sha256=dzZSLhEtBke35GtTgfSxrijMu9jQzob6drdFkYReR7w,1150
aiogram/types/reaction_type_emoji.py,sha256=F5WoRrUm9tOV3YJVNh8quD4D2OfsU53Y-mbqggbnm-w,1682
aiogram/types/reaction_type_paid.py,sha256=zXzhLH6g8HeyIOO1dhsZwG4_Mh52Yw5sC5mucpffnTY,854
aiogram/types/refunded_payment.py,sha256=yaj69LD-j7ffwtTk69ozl0MXz3r2kUlBTgOuWEqvxto,2180
aiogram/types/reply_keyboard_markup.py,sha256=Ey04kT-CDRoFk4Ofqe-U6-SUi_SYaXtYQ72NqzNwgq4,3373
aiogram/types/reply_keyboard_remove.py,sha256=vt2LTPCyoNO1SzO7JLJAUTLxfcyVh5eVKTkFmjQVvag,2093
aiogram/types/reply_parameters.py,sha256=2DWrO4V2Vxdc42OnEuHjfLS60PaNO01rtcvlt-H4aCY,3502
aiogram/types/response_parameters.py,sha256=qPu3C079bJZRdUIQwr-r9WIcW6yYW7rdWJlraZQbw-M,1550
aiogram/types/revenue_withdrawal_state.py,sha256=rUzcoQ2Nbmm-2EwkoD-g_xWUp9o3mIsthyE2ZWrg0ZY,585
aiogram/types/revenue_withdrawal_state_failed.py,sha256=uhCBqAV8SpbCkL364ygkvGg7TzarISQ6NniBeHvn3HE,1133
aiogram/types/revenue_withdrawal_state_pending.py,sha256=rVieabsj2ayXpzN7yW8uGN-8p6Qy_lQyrKYFSKH5qmw,1115
aiogram/types/revenue_withdrawal_state_succeeded.py,sha256=d2cBJbxXEPhtSLWb-TzyDy-iumMWkG7G6LWNRBmH7oI,1409
aiogram/types/sent_web_app_message.py,sha256=1p2Xr_3czwPbZd8PpylTSo31ZgeAEBLnlnlRcBY31xc,1168
aiogram/types/shared_user.py,sha256=L_PyLNJ0I75E9OykdQA5Nk5j56QjmwEgD8jPIYxFGYA,2340
aiogram/types/shipping_address.py,sha256=9JTEnZoNaPa-T1p_YolL1ErIGWJol8lAU4F8ycsQ8ZY,1550
aiogram/types/shipping_option.py,sha256=5jI1LADtNbe2oZC0a2G3f7Fh6J8CZ0wfCBqVFOUlqIw,1098
aiogram/types/shipping_query.py,sha256=22pK3KfuxTTkZm-GFxrgphBmldqT4iIifVY-6vmF-qk,3458
aiogram/types/star_transaction.py,sha256=zGrNLgJeDuv4AWfr8tiCWLHM_KgNO-d9rYiiaiUe8A8,3087
aiogram/types/star_transactions.py,sha256=n4NDZK71RgvVbuiCAzdjKBc5p6PyezzYQFjJkiewunw,954
aiogram/types/sticker.py,sha256=Tcz8iqKzCbfvP7MdV3NVwUEt9u27EmB7_R-N_BxSd6M,5902
aiogram/types/sticker_set.py,sha256=OGKkpMzsQxRcuAGLt9ZJOaLwv9IKndmTaaKl5fyiNLo,2388
aiogram/types/story.py,sha256=2Bm9ZHpfr4_yeBPWFgwnqTs-y4xFgKqW8NLRVWzMdqM,884
aiogram/types/successful_payment.py,sha256=nNUteKAYhz_PI3EuoDkd8zX1dDal_NLMSy08fnwjC98,2574
aiogram/types/switch_inline_query_chosen_chat.py,sha256=KH9p_x5aY6XxQn71LRa92cVQMl8glZKdc2m2935i_Yo,2002
aiogram/types/text_quote.py,sha256=2bmMetBcRCIUu5GPlGUC8IpRLqPEAOmirvpsmzOPrrA,1863
aiogram/types/transaction_partner.py,sha256=WtOmiGbZhHF_1vidNsULzjypaypxdHfif3nGcOwNIjg,625
aiogram/types/transaction_partner_fragment.py,sha256=sHfiApYXz8E4Jr40pb0szs4b94aAp0UTE6UGQ1xFFdo,1962
aiogram/types/transaction_partner_other.py,sha256=iHViDYZ62dQS3z6k1YkMOqFELyBM4wpAkGzRlif-_xw,1104
aiogram/types/transaction_partner_telegram_ads.py,sha256=QmVjyRZUGNTpxRIFZF4F_pAPj9i4224E1PsnA9GS8YU,1185
aiogram/types/transaction_partner_user.py,sha256=rslWGfJ7C-ptPRXACLyB3vxrbDyu1yd9LJX0pTNiLV8,1979
aiogram/types/update.py,sha256=5FVm6IcFT8INyU3GPNVBxL0s3-g7cJpeO3vUUogzoo4,11481
aiogram/types/user.py,sha256=DW0Xg1Lld2oB5wwOZtBIJggt-WiNLKOY-4HHSpU_t1k,6001
aiogram/types/user_chat_boosts.py,sha256=Qpvrxc-BGYuyKbC8kLIrmQqNpfYi3jXXYY_234NWb0M,946
aiogram/types/user_profile_photos.py,sha256=VKpZMznwuIUQ4sWxjDgNv3tSr6AW2fwG4AIwgztwL-w,1124
aiogram/types/user_shared.py,sha256=1yGKAO67fshHSOCtVl3dO_oD1-VOyzPBC4Ak-hflMOQ,1534
aiogram/types/users_shared.py,sha256=Fdjww27YYlWMVzYOhpBp54RL_N_Zh7_meWgpqBxfkjQ,1986
aiogram/types/venue.py,sha256=wEmGfGAiqdhDhTskRoxOKiNVliUaPpPOxBmohfDlL5I,2147
aiogram/types/video.py,sha256=e-uI5iQSKAdhPK-vVz5kiQCIV22kaxmylzN8gzmtwnk,2575
aiogram/types/video_chat_ended.py,sha256=eL3ZSR0WfVcHEEpXrdLm1mvuogXS7RAoxLwX2AwMdeg,839
aiogram/types/video_chat_participants_invited.py,sha256=zV4sR4Mi_BmHeS60I4C-KzrAhOAh2weIFuEE8CmhmZI,943
aiogram/types/video_chat_scheduled.py,sha256=G-a24czeK7NVzJ88SKFNutPd_SGnRgTBLy85rHozNLo,990
aiogram/types/video_chat_started.py,sha256=FYHVcH-a5knoXIYMmCQThFt8hjjPwAiZ8QvGLNVWgl4,309
aiogram/types/video_note.py,sha256=Hwa8uTCnyb9yT9eGikFwyVfk6X779md3DNAPbav6VrM,2059
aiogram/types/voice.py,sha256=AMyEJovxyDl2TRVpEfpHLMSmsXNjXIrNDH73HxQUxqg,1932
aiogram/types/web_app_data.py,sha256=CzkuU2VwVYQ7WBkFA6Zh8BL-qUKQeB__mcmhmVZnT2A,1107
aiogram/types/web_app_info.py,sha256=aPH4uLFFLKNLEF3RUm3uYCkg9Hk545kMoUvrkg4TUds,931
aiogram/types/webhook_info.py,sha256=TAfcO66tpfH5XolOI90pg_sHowUkV4hHjzp3tWhpj_w,2992
aiogram/types/write_access_allowed.py,sha256=3GiPknn_fKHAJ53FROE4AK4MtpwluNlAuZvFuOP6diA,1912
aiogram/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/utils/__pycache__/__init__.cpython-311.pyc,,
aiogram/utils/__pycache__/auth_widget.cpython-311.pyc,,
aiogram/utils/__pycache__/backoff.cpython-311.pyc,,
aiogram/utils/__pycache__/callback_answer.cpython-311.pyc,,
aiogram/utils/__pycache__/chat_action.cpython-311.pyc,,
aiogram/utils/__pycache__/chat_member.cpython-311.pyc,,
aiogram/utils/__pycache__/deep_linking.cpython-311.pyc,,
aiogram/utils/__pycache__/formatting.cpython-311.pyc,,
aiogram/utils/__pycache__/keyboard.cpython-311.pyc,,
aiogram/utils/__pycache__/link.cpython-311.pyc,,
aiogram/utils/__pycache__/magic_filter.cpython-311.pyc,,
aiogram/utils/__pycache__/markdown.cpython-311.pyc,,
aiogram/utils/__pycache__/media_group.cpython-311.pyc,,
aiogram/utils/__pycache__/mixins.cpython-311.pyc,,
aiogram/utils/__pycache__/mypy_hacks.cpython-311.pyc,,
aiogram/utils/__pycache__/payload.cpython-311.pyc,,
aiogram/utils/__pycache__/serialization.cpython-311.pyc,,
aiogram/utils/__pycache__/text_decorations.cpython-311.pyc,,
aiogram/utils/__pycache__/token.cpython-311.pyc,,
aiogram/utils/__pycache__/warnings.cpython-311.pyc,,
aiogram/utils/__pycache__/web_app.cpython-311.pyc,,
aiogram/utils/auth_widget.py,sha256=kcNMXu7hA4kWHw_PeZsGFaeC0m0Sbtbd2-8Q9rWfkHg,981
aiogram/utils/backoff.py,sha256=D_d7z94PyR5USzeoIednnCgW07qQgwQNgVdPGkgrmJM,2123
aiogram/utils/callback_answer.py,sha256=_NHsLMjfZBKOXtyCSHBh4s9V3go-U8Wsk5JqpMh-O4c,6573
aiogram/utils/chat_action.py,sha256=3GW2mDqQQ5fv6LMpeqB0j-J1d1blml2aF4q7vqlnMBQ,12201
aiogram/utils/chat_member.py,sha256=WwMEi__6DYeF55TFuLxPS-OQaDdTa0I2f-yJkt3Dio0,942
aiogram/utils/deep_linking.py,sha256=D89nv29pnL63_N_E_ZfLjiarTQZhg0oq6RnRdWRDSTE,2980
aiogram/utils/formatting.py,sha256=7je7KplskUsRgo4DFVWwnN0g4C8JMBYC4tTVxw-3zr4,16902
aiogram/utils/i18n/__init__.py,sha256=mwTwSL1cuXYi3a3LBICqoH66y4kHVML24YNPbGlZ55M,440
aiogram/utils/i18n/__pycache__/__init__.cpython-311.pyc,,
aiogram/utils/i18n/__pycache__/context.cpython-311.pyc,,
aiogram/utils/i18n/__pycache__/core.cpython-311.pyc,,
aiogram/utils/i18n/__pycache__/lazy_proxy.cpython-311.pyc,,
aiogram/utils/i18n/__pycache__/middleware.cpython-311.pyc,,
aiogram/utils/i18n/context.py,sha256=fhLzDZvxqRMvPu2-lEUrH7n09oHl-H0qo2mLFyKzCJk,549
aiogram/utils/i18n/core.py,sha256=XX_iuwylDTfrfCrafnqiFq28LDr-bvoO4Qnkhy81d_M,3542
aiogram/utils/i18n/lazy_proxy.py,sha256=0yHtyrejG9wG4yzLl1cDEsFomww2nyR7KFSbFyp7_NA,472
aiogram/utils/i18n/middleware.py,sha256=lqeui9-x7ztMQPI0IeQeRawe6orMjpsg2EtvXTzAQj4,5874
aiogram/utils/keyboard.py,sha256=zxXdpmRr5x-4kaczAGWvlElMoWzRKF5PvDyxSJ9_4HY,13234
aiogram/utils/link.py,sha256=z7Zp5uk5z3iNO26-wZrhoCDNLt1N0KjbPYhthOq-50o,2261
aiogram/utils/magic_filter.py,sha256=WGHOC9k2acxrcpkFF-ViQv3LbzRAKtJj5MRv7IEi75c,666
aiogram/utils/markdown.py,sha256=3T1UVSzaAwnYnTNNq6pklq-TTs6Y6zINp-LIWgwrAyU,4481
aiogram/utils/media_group.py,sha256=E28oJhPoTQ4iKXr0QUx5W1nd7VPHAJf0PQz0MeqG46E,14804
aiogram/utils/mixins.py,sha256=ox0Q6BlxcyTfAtzLVMEY9eUfXXhnXtkkLBQlUQ6uL4o,2923
aiogram/utils/mypy_hacks.py,sha256=cm5_tBzfrkG5OOIs2m5U4JfQKohj1KkmCRXNLTJFDy0,433
aiogram/utils/payload.py,sha256=mGJdQryRHL07VbSjdzGbN1NbYzd_mN2MGY1RiY3_KX4,2942
aiogram/utils/serialization.py,sha256=SMiqv2TQed_GOhvhWoaABFM65jjIiXqBJTRRdMQ9nXY,2765
aiogram/utils/text_decorations.py,sha256=tJwFV-zefED_z70wQsGWXIhD85m8Ee12mk3VrWN8Koo,8248
aiogram/utils/token.py,sha256=iFfmK-pHGyPsF4ekWWcOlfH4OR9xGNAyCIavND8Ykrc,936
aiogram/utils/warnings.py,sha256=xGsQcxrMXtdZfLOGRCqKRIJbw80DA39COcctikBfYAE,89
aiogram/utils/web_app.py,sha256=pYFAohjk8OW3qRQkJebMtKaFJ7vOL4OJivUEh171kkI,7105
aiogram/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
aiogram/webhook/__pycache__/__init__.cpython-311.pyc,,
aiogram/webhook/__pycache__/aiohttp_server.cpython-311.pyc,,
aiogram/webhook/__pycache__/security.cpython-311.pyc,,
aiogram/webhook/aiohttp_server.py,sha256=3uto1_vwf6h73SXFNSoDxGt49gFHFYDI1wf4uRcxWUg,10454
aiogram/webhook/security.py,sha256=ifd2TrPSOlXfutYyAmRh0LT3hJkB4o79XmEV1lo6fv0,1350
+4
View File
@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.25.0
Root-Is-Purelib: true
Tag: py3-none-any
@@ -0,0 +1,18 @@
Copyright (c) 2017 - present Alex Root Junior
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
+41
View File
@@ -0,0 +1,41 @@
import asyncio as _asyncio
from contextlib import suppress
from aiogram.dispatcher.flags import FlagGenerator
from . import enums, methods, types
from .__meta__ import __api_version__, __version__
from .client import session
from .client.bot import Bot
from .dispatcher.dispatcher import Dispatcher
from .dispatcher.middlewares.base import BaseMiddleware
from .dispatcher.router import Router
from .utils.magic_filter import MagicFilter
from .utils.text_decorations import html_decoration as html
from .utils.text_decorations import markdown_decoration as md
with suppress(ImportError):
import uvloop as _uvloop
_asyncio.set_event_loop_policy(_uvloop.EventLoopPolicy())
F = MagicFilter()
flags = FlagGenerator()
__all__ = (
"__api_version__",
"__version__",
"types",
"methods",
"enums",
"Bot",
"session",
"Dispatcher",
"Router",
"BaseMiddleware",
"F",
"html",
"md",
"flags",
)
+2
View File
@@ -0,0 +1,2 @@
__version__ = "3.12.0"
__api_version__ = "7.9"
Binary file not shown.
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,33 @@
from typing import TYPE_CHECKING, Any, Optional
from pydantic import BaseModel, PrivateAttr
from typing_extensions import Self
if TYPE_CHECKING:
from aiogram.client.bot import Bot
class BotContextController(BaseModel):
_bot: Optional["Bot"] = PrivateAttr()
def model_post_init(self, __context: Any) -> None:
self._bot = __context.get("bot") if __context else None
def as_(self, bot: Optional["Bot"]) -> Self:
"""
Bind object to a bot instance.
:param bot: Bot instance
:return: self
"""
self._bot = bot
return self
@property
def bot(self) -> Optional["Bot"]:
"""
Get bot instance.
:return: Bot instance
"""
return self._bot
+85
View File
@@ -0,0 +1,85 @@
from __future__ import annotations
import sys
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional
if TYPE_CHECKING:
from aiogram.types import LinkPreviewOptions
# @dataclass ??
class Default:
# Is not a dataclass because of JSON serialization.
__slots__ = ("_name",)
def __init__(self, name: str) -> None:
self._name = name
@property
def name(self) -> str:
return self._name
def __str__(self) -> str:
return f"Default({self._name!r})"
def __repr__(self) -> str:
return f"<{self}>"
_dataclass_properties: Dict[str, Any] = {}
if sys.version_info >= (3, 10):
# Speedup attribute access for dataclasses in Python 3.10+
_dataclass_properties.update({"slots": True, "kw_only": True})
@dataclass(**_dataclass_properties)
class DefaultBotProperties:
"""
Default bot properties.
"""
parse_mode: Optional[str] = None
"""Default parse mode for messages."""
disable_notification: Optional[bool] = None
"""Sends the message silently. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None
"""Protects content from copying."""
allow_sending_without_reply: Optional[bool] = None
"""Allows to send messages without reply."""
link_preview: Optional[LinkPreviewOptions] = None
"""Link preview settings."""
link_preview_is_disabled: Optional[bool] = None
"""Disables link preview."""
link_preview_prefer_small_media: Optional[bool] = None
"""Prefer small media in link preview."""
link_preview_prefer_large_media: Optional[bool] = None
"""Prefer large media in link preview."""
link_preview_show_above_text: Optional[bool] = None
"""Show link preview above text."""
show_caption_above_media: Optional[bool] = None
"""Show caption above media."""
def __post_init__(self) -> None:
has_any_link_preview_option = any(
(
self.link_preview_is_disabled,
self.link_preview_prefer_small_media,
self.link_preview_prefer_large_media,
self.link_preview_show_above_text,
)
)
if has_any_link_preview_option and self.link_preview is None:
from ..types import LinkPreviewOptions
self.link_preview = LinkPreviewOptions(
is_disabled=self.link_preview_is_disabled,
prefer_small_media=self.link_preview_prefer_small_media,
prefer_large_media=self.link_preview_prefer_large_media,
show_above_text=self.link_preview_show_above_text,
)
def __getitem__(self, item: str) -> Any:
return getattr(self, item, None)
+215
View File
@@ -0,0 +1,215 @@
from __future__ import annotations
import asyncio
import ssl
from typing import (
TYPE_CHECKING,
Any,
AsyncGenerator,
Dict,
Iterable,
List,
Optional,
Tuple,
Type,
Union,
cast,
)
import certifi
from aiohttp import BasicAuth, ClientError, ClientSession, FormData, TCPConnector
from aiohttp.hdrs import USER_AGENT
from aiohttp.http import SERVER_SOFTWARE
from aiogram.__meta__ import __version__
from aiogram.methods import TelegramMethod
from ...exceptions import TelegramNetworkError
from ...methods.base import TelegramType
from ...types import InputFile
from .base import BaseSession
if TYPE_CHECKING:
from ..bot import Bot
_ProxyBasic = Union[str, Tuple[str, BasicAuth]]
_ProxyChain = Iterable[_ProxyBasic]
_ProxyType = Union[_ProxyChain, _ProxyBasic]
def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]:
from aiohttp_socks.utils import parse_proxy_url # type: ignore
proxy_auth: Optional[BasicAuth] = None
if isinstance(basic, str):
proxy_url = basic
else:
proxy_url, proxy_auth = basic
proxy_type, host, port, username, password = parse_proxy_url(proxy_url)
if isinstance(proxy_auth, BasicAuth):
username = proxy_auth.login
password = proxy_auth.password
return {
"proxy_type": proxy_type,
"host": host,
"port": port,
"username": username,
"password": password,
"rdns": True,
}
def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]:
from aiohttp_socks import ( # type: ignore
ChainProxyConnector,
ProxyConnector,
ProxyInfo,
)
# since tuple is Iterable(compatible with _ProxyChain) object, we assume that
# user wants chained proxies if tuple is a pair of string(url) and BasicAuth
if isinstance(chain_or_plain, str) or (
isinstance(chain_or_plain, tuple) and len(chain_or_plain) == 2
):
chain_or_plain = cast(_ProxyBasic, chain_or_plain)
return ProxyConnector, _retrieve_basic(chain_or_plain)
chain_or_plain = cast(_ProxyChain, chain_or_plain)
infos: List[ProxyInfo] = []
for basic in chain_or_plain:
infos.append(ProxyInfo(**_retrieve_basic(basic)))
return ChainProxyConnector, {"proxy_infos": infos}
class AiohttpSession(BaseSession):
def __init__(
self, proxy: Optional[_ProxyType] = None, limit: int = 100, **kwargs: Any
) -> None:
"""
Client session based on aiohttp.
:param proxy: The proxy to be used for requests. Default is None.
:param limit: The total number of simultaneous connections. Default is 100.
:param kwargs: Additional keyword arguments.
"""
super().__init__(**kwargs)
self._session: Optional[ClientSession] = None
self._connector_type: Type[TCPConnector] = TCPConnector
self._connector_init: Dict[str, Any] = {
"ssl": ssl.create_default_context(cafile=certifi.where()),
"limit": limit,
"ttl_dns_cache": 3600, # Workaround for https://github.com/aiogram/aiogram/issues/1500
}
self._should_reset_connector = True # flag determines connector state
self._proxy: Optional[_ProxyType] = None
if proxy is not None:
try:
self._setup_proxy_connector(proxy)
except ImportError as exc: # pragma: no cover
raise RuntimeError(
"In order to use aiohttp client for proxy requests, install "
"https://pypi.org/project/aiohttp-socks/"
) from exc
def _setup_proxy_connector(self, proxy: _ProxyType) -> None:
self._connector_type, self._connector_init = _prepare_connector(proxy)
self._proxy = proxy
@property
def proxy(self) -> Optional[_ProxyType]:
return self._proxy
@proxy.setter
def proxy(self, proxy: _ProxyType) -> None:
self._setup_proxy_connector(proxy)
self._should_reset_connector = True
async def create_session(self) -> ClientSession:
if self._should_reset_connector:
await self.close()
if self._session is None or self._session.closed:
self._session = ClientSession(
connector=self._connector_type(**self._connector_init),
headers={
USER_AGENT: f"{SERVER_SOFTWARE} aiogram/{__version__}",
},
)
self._should_reset_connector = False
return self._session
async def close(self) -> None:
if self._session is not None and not self._session.closed:
await self._session.close()
# Wait 250 ms for the underlying SSL connections to close
# https://docs.aiohttp.org/en/stable/client_advanced.html#graceful-shutdown
await asyncio.sleep(0.25)
def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData:
form = FormData(quote_fields=False)
files: Dict[str, InputFile] = {}
for key, value in method.model_dump(warnings=False).items():
value = self.prepare_value(value, bot=bot, files=files)
if not value:
continue
form.add_field(key, value)
for key, value in files.items():
form.add_field(
key,
value.read(bot),
filename=value.filename or key,
)
return form
async def make_request(
self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = None
) -> TelegramType:
session = await self.create_session()
url = self.api.api_url(token=bot.token, method=method.__api_method__)
form = self.build_form_data(bot=bot, method=method)
try:
async with session.post(
url, data=form, timeout=self.timeout if timeout is None else timeout
) as resp:
raw_result = await resp.text()
except asyncio.TimeoutError:
raise TelegramNetworkError(method=method, message="Request timeout error")
except ClientError as e:
raise TelegramNetworkError(method=method, message=f"{type(e).__name__}: {e}")
response = self.check_response(
bot=bot, method=method, status_code=resp.status, content=raw_result
)
return cast(TelegramType, response.result)
async def stream_content(
self,
url: str,
headers: Optional[Dict[str, Any]] = None,
timeout: int = 30,
chunk_size: int = 65536,
raise_for_status: bool = True,
) -> AsyncGenerator[bytes, None]:
if headers is None:
headers = {}
session = await self.create_session()
async with session.get(
url, timeout=timeout, headers=headers, raise_for_status=raise_for_status
) as resp:
async for chunk in resp.content.iter_chunked(chunk_size):
yield chunk
async def __aenter__(self) -> AiohttpSession:
await self.create_session()
return self
+265
View File
@@ -0,0 +1,265 @@
from __future__ import annotations
import abc
import datetime
import json
import secrets
from enum import Enum
from http import HTTPStatus
from types import TracebackType
from typing import (
TYPE_CHECKING,
Any,
AsyncGenerator,
Callable,
Dict,
Final,
Optional,
Type,
cast,
)
from pydantic import ValidationError
from aiogram.exceptions import (
ClientDecodeError,
RestartingTelegram,
TelegramAPIError,
TelegramBadRequest,
TelegramConflictError,
TelegramEntityTooLarge,
TelegramForbiddenError,
TelegramMigrateToChat,
TelegramNotFound,
TelegramRetryAfter,
TelegramServerError,
TelegramUnauthorizedError,
)
from ...methods import Response, TelegramMethod
from ...methods.base import TelegramType
from ...types import InputFile, TelegramObject
from ..default import Default
from ..telegram import PRODUCTION, TelegramAPIServer
from .middlewares.manager import RequestMiddlewareManager
if TYPE_CHECKING:
from ..bot import Bot
_JsonLoads = Callable[..., Any]
_JsonDumps = Callable[..., str]
DEFAULT_TIMEOUT: Final[float] = 60.0
class BaseSession(abc.ABC):
"""
This is base class for all HTTP sessions in aiogram.
If you want to create your own session, you must inherit from this class.
"""
def __init__(
self,
api: TelegramAPIServer = PRODUCTION,
json_loads: _JsonLoads = json.loads,
json_dumps: _JsonDumps = json.dumps,
timeout: float = DEFAULT_TIMEOUT,
) -> None:
"""
:param api: Telegram Bot API URL patterns
:param json_loads: JSON loader
:param json_dumps: JSON dumper
:param timeout: Session scope request timeout
"""
self.api = api
self.json_loads = json_loads
self.json_dumps = json_dumps
self.timeout = timeout
self.middleware = RequestMiddlewareManager()
def check_response(
self, bot: Bot, method: TelegramMethod[TelegramType], status_code: int, content: str
) -> Response[TelegramType]:
"""
Check response status
"""
try:
json_data = self.json_loads(content)
except Exception as e:
# Handled error type can't be classified as specific error
# in due to decoder can be customized and raise any exception
raise ClientDecodeError("Failed to decode object", e, content)
try:
response_type = Response[method.__returning__] # type: ignore
response = response_type.model_validate(json_data, context={"bot": bot})
except ValidationError as e:
raise ClientDecodeError("Failed to deserialize object", e, json_data)
if HTTPStatus.OK <= status_code <= HTTPStatus.IM_USED and response.ok:
return response
description = cast(str, response.description)
if parameters := response.parameters:
if parameters.retry_after:
raise TelegramRetryAfter(
method=method, message=description, retry_after=parameters.retry_after
)
if parameters.migrate_to_chat_id:
raise TelegramMigrateToChat(
method=method,
message=description,
migrate_to_chat_id=parameters.migrate_to_chat_id,
)
if status_code == HTTPStatus.BAD_REQUEST:
raise TelegramBadRequest(method=method, message=description)
if status_code == HTTPStatus.NOT_FOUND:
raise TelegramNotFound(method=method, message=description)
if status_code == HTTPStatus.CONFLICT:
raise TelegramConflictError(method=method, message=description)
if status_code == HTTPStatus.UNAUTHORIZED:
raise TelegramUnauthorizedError(method=method, message=description)
if status_code == HTTPStatus.FORBIDDEN:
raise TelegramForbiddenError(method=method, message=description)
if status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE:
raise TelegramEntityTooLarge(method=method, message=description)
if status_code >= HTTPStatus.INTERNAL_SERVER_ERROR:
if "restart" in description:
raise RestartingTelegram(method=method, message=description)
raise TelegramServerError(method=method, message=description)
raise TelegramAPIError(
method=method,
message=description,
)
@abc.abstractmethod
async def close(self) -> None: # pragma: no cover
"""
Close client session
"""
pass
@abc.abstractmethod
async def make_request(
self,
bot: Bot,
method: TelegramMethod[TelegramType],
timeout: Optional[int] = None,
) -> TelegramType: # pragma: no cover
"""
Make request to Telegram Bot API
:param bot: Bot instance
:param method: Method instance
:param timeout: Request timeout
:return:
:raise TelegramApiError:
"""
pass
@abc.abstractmethod
async def stream_content(
self,
url: str,
headers: Optional[Dict[str, Any]] = None,
timeout: int = 30,
chunk_size: int = 65536,
raise_for_status: bool = True,
) -> AsyncGenerator[bytes, None]: # pragma: no cover
"""
Stream reader
"""
yield b""
def prepare_value(
self,
value: Any,
bot: Bot,
files: Dict[str, Any],
_dumps_json: bool = True,
) -> Any:
"""
Prepare value before send
"""
if value is None:
return None
if isinstance(value, str):
return value
if isinstance(value, Default):
default_value = bot.default[value.name]
return self.prepare_value(default_value, bot=bot, files=files, _dumps_json=_dumps_json)
if isinstance(value, InputFile):
key = secrets.token_urlsafe(10)
files[key] = value
return f"attach://{key}"
if isinstance(value, dict):
value = {
key: prepared_item
for key, item in value.items()
if (
prepared_item := self.prepare_value(
item, bot=bot, files=files, _dumps_json=False
)
)
is not None
}
if _dumps_json:
return self.json_dumps(value)
return value
if isinstance(value, list):
value = [
prepared_item
for item in value
if (
prepared_item := self.prepare_value(
item, bot=bot, files=files, _dumps_json=False
)
)
is not None
]
if _dumps_json:
return self.json_dumps(value)
return value
if isinstance(value, datetime.timedelta):
now = datetime.datetime.now()
return str(round((now + value).timestamp()))
if isinstance(value, datetime.datetime):
return str(round(value.timestamp()))
if isinstance(value, Enum):
return self.prepare_value(value.value, bot=bot, files=files)
if isinstance(value, TelegramObject):
return self.prepare_value(
value.model_dump(warnings=False),
bot=bot,
files=files,
_dumps_json=_dumps_json,
)
if _dumps_json:
return self.json_dumps(value)
return value
async def __call__(
self,
bot: Bot,
method: TelegramMethod[TelegramType],
timeout: Optional[int] = None,
) -> TelegramType:
middleware = self.middleware.wrap_middlewares(self.make_request, timeout=timeout)
return cast(TelegramType, await middleware(bot, method))
async def __aenter__(self) -> BaseSession:
return self
async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_value: Optional[BaseException],
traceback: Optional[TracebackType],
) -> None:
await self.close()
@@ -0,0 +1,53 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Protocol
from aiogram.methods import Response, TelegramMethod
from aiogram.methods.base import TelegramType
if TYPE_CHECKING:
from ...bot import Bot
class NextRequestMiddlewareType(Protocol[TelegramType]): # pragma: no cover
async def __call__(
self,
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
pass
class RequestMiddlewareType(Protocol): # pragma: no cover
async def __call__(
self,
make_request: NextRequestMiddlewareType[TelegramType],
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
pass
class BaseRequestMiddleware(ABC):
"""
Generic middleware class
"""
@abstractmethod
async def __call__(
self,
make_request: NextRequestMiddlewareType[TelegramType],
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
"""
Execute middleware
:param make_request: Wrapped make_request in middlewares chain
:param bot: bot for request making
:param method: Request method (Subclass of :class:`aiogram.methods.base.TelegramMethod`)
:return: :class:`aiogram.methods.Response`
"""
pass
@@ -0,0 +1,62 @@
from __future__ import annotations
from functools import partial
from typing import Any, Callable, List, Optional, Sequence, Union, cast, overload
from aiogram.client.session.middlewares.base import (
NextRequestMiddlewareType,
RequestMiddlewareType,
)
from aiogram.methods.base import TelegramType
class RequestMiddlewareManager(Sequence[RequestMiddlewareType]):
def __init__(self) -> None:
self._middlewares: List[RequestMiddlewareType] = []
def register(
self,
middleware: RequestMiddlewareType,
) -> RequestMiddlewareType:
self._middlewares.append(middleware)
return middleware
def unregister(self, middleware: RequestMiddlewareType) -> None:
self._middlewares.remove(middleware)
def __call__(
self,
middleware: Optional[RequestMiddlewareType] = None,
) -> Union[
Callable[[RequestMiddlewareType], RequestMiddlewareType],
RequestMiddlewareType,
]:
if middleware is None:
return self.register
return self.register(middleware)
@overload
def __getitem__(self, item: int) -> RequestMiddlewareType:
pass
@overload
def __getitem__(self, item: slice) -> Sequence[RequestMiddlewareType]:
pass
def __getitem__(
self, item: Union[int, slice]
) -> Union[RequestMiddlewareType, Sequence[RequestMiddlewareType]]:
return self._middlewares[item]
def __len__(self) -> int:
return len(self._middlewares)
def wrap_middlewares(
self,
callback: NextRequestMiddlewareType[TelegramType],
**kwargs: Any,
) -> NextRequestMiddlewareType[TelegramType]:
middleware = partial(callback, **kwargs)
for m in reversed(self._middlewares):
middleware = partial(m, middleware)
return cast(NextRequestMiddlewareType[TelegramType], middleware)
@@ -0,0 +1,37 @@
import logging
from typing import TYPE_CHECKING, Any, List, Optional, Type
from aiogram import loggers
from aiogram.methods import TelegramMethod
from aiogram.methods.base import Response, TelegramType
from .base import BaseRequestMiddleware, NextRequestMiddlewareType
if TYPE_CHECKING:
from ...bot import Bot
logger = logging.getLogger(__name__)
class RequestLogging(BaseRequestMiddleware):
def __init__(self, ignore_methods: Optional[List[Type[TelegramMethod[Any]]]] = None):
"""
Middleware for logging outgoing requests
:param ignore_methods: methods to ignore in logging middleware
"""
self.ignore_methods = ignore_methods if ignore_methods else []
async def __call__(
self,
make_request: NextRequestMiddlewareType[TelegramType],
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
if type(method) not in self.ignore_methods:
loggers.middlewares.info(
"Make request with method=%r by bot id=%d",
type(method).__name__,
bot.id,
)
return await make_request(bot, method)
+103
View File
@@ -0,0 +1,103 @@
from abc import ABC, abstractmethod
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Union
class FilesPathWrapper(ABC):
@abstractmethod
def to_local(self, path: Union[Path, str]) -> Union[Path, str]:
pass
@abstractmethod
def to_server(self, path: Union[Path, str]) -> Union[Path, str]:
pass
class BareFilesPathWrapper(FilesPathWrapper):
def to_local(self, path: Union[Path, str]) -> Union[Path, str]:
return path
def to_server(self, path: Union[Path, str]) -> Union[Path, str]:
return path
class SimpleFilesPathWrapper(FilesPathWrapper):
def __init__(self, server_path: Path, local_path: Path) -> None:
self.server_path = server_path
self.local_path = local_path
@classmethod
def _resolve(
cls, base1: Union[Path, str], base2: Union[Path, str], value: Union[Path, str]
) -> Path:
relative = Path(value).relative_to(base1)
return base2 / relative
def to_local(self, path: Union[Path, str]) -> Union[Path, str]:
return self._resolve(base1=self.server_path, base2=self.local_path, value=path)
def to_server(self, path: Union[Path, str]) -> Union[Path, str]:
return self._resolve(base1=self.local_path, base2=self.server_path, value=path)
@dataclass(frozen=True)
class TelegramAPIServer:
"""
Base config for API Endpoints
"""
base: str
"""Base URL"""
file: str
"""Files URL"""
is_local: bool = False
"""Mark this server is
in `local mode <https://core.telegram.org/bots/api#using-a-local-bot-api-server>`_."""
wrap_local_file: FilesPathWrapper = BareFilesPathWrapper()
"""Callback to wrap files path in local mode"""
def api_url(self, token: str, method: str) -> str:
"""
Generate URL for API methods
:param token: Bot token
:param method: API method name (case insensitive)
:return: URL
"""
return self.base.format(token=token, method=method)
def file_url(self, token: str, path: str) -> str:
"""
Generate URL for downloading files
:param token: Bot token
:param path: file path
:return: URL
"""
return self.file.format(token=token, path=path)
@classmethod
def from_base(cls, base: str, **kwargs: Any) -> "TelegramAPIServer":
"""
Use this method to auto-generate TelegramAPIServer instance from base URL
:param base: Base URL
:return: instance of :class:`TelegramAPIServer`
"""
base = base.rstrip("/")
return cls(
base=f"{base}/bot{{token}}/{{method}}",
file=f"{base}/file/bot{{token}}/{{path}}",
**kwargs,
)
PRODUCTION = TelegramAPIServer(
base="https://api.telegram.org/bot{token}/{method}",
file="https://api.telegram.org/file/bot{token}/{path}",
)
TEST = TelegramAPIServer(
base="https://api.telegram.org/bot{token}/test/{method}",
file="https://api.telegram.org/file/bot{token}/test/{path}",
)
+598
View File
@@ -0,0 +1,598 @@
from __future__ import annotations
import asyncio
import contextvars
import signal
import warnings
from asyncio import CancelledError, Event, Future, Lock
from contextlib import suppress
from typing import Any, AsyncGenerator, Dict, List, Optional, Set, Union
from .. import loggers
from ..client.bot import Bot
from ..exceptions import TelegramAPIError
from ..fsm.middleware import FSMContextMiddleware
from ..fsm.storage.base import BaseEventIsolation, BaseStorage
from ..fsm.storage.memory import DisabledEventIsolation, MemoryStorage
from ..fsm.strategy import FSMStrategy
from ..methods import GetUpdates, TelegramMethod
from ..methods.base import TelegramType
from ..types import Update, User
from ..types.base import UNSET, UNSET_TYPE
from ..types.update import UpdateTypeLookupError
from ..utils.backoff import Backoff, BackoffConfig
from .event.bases import UNHANDLED, SkipHandler
from .event.telegram import TelegramEventObserver
from .middlewares.error import ErrorsMiddleware
from .middlewares.user_context import UserContextMiddleware
from .router import Router
DEFAULT_BACKOFF_CONFIG = BackoffConfig(min_delay=1.0, max_delay=5.0, factor=1.3, jitter=0.1)
class Dispatcher(Router):
"""
Root router
"""
def __init__(
self,
*, # * - Preventing to pass instance of Bot to the FSM storage
storage: Optional[BaseStorage] = None,
fsm_strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT,
events_isolation: Optional[BaseEventIsolation] = None,
disable_fsm: bool = False,
name: Optional[str] = None,
**kwargs: Any,
) -> None:
"""
Root router
:param storage: Storage for FSM
:param fsm_strategy: FSM strategy
:param events_isolation: Events isolation
:param disable_fsm: Disable FSM, note that if you disable FSM
then you should not use storage and events isolation
:param kwargs: Other arguments, will be passed as keyword arguments to handlers
"""
super(Dispatcher, self).__init__(name=name)
if storage and not isinstance(storage, BaseStorage):
raise TypeError(
f"FSM storage should be instance of 'BaseStorage' not {type(storage).__name__}"
)
# Telegram API provides originally only one event type - Update
# For making easily interactions with events here is registered handler which helps
# to separate Update to different event types like Message, CallbackQuery etc.
self.update = self.observers["update"] = TelegramEventObserver(
router=self, event_name="update"
)
self.update.register(self._listen_update)
# Error handlers should work is out of all other functions
# and should be registered before all others middlewares
self.update.outer_middleware(ErrorsMiddleware(self))
# User context middleware makes small optimization for all other builtin
# middlewares via caching the user and chat instances in the event context
self.update.outer_middleware(UserContextMiddleware())
# FSM middleware should always be registered after User context middleware
# because here is used context from previous step
self.fsm = FSMContextMiddleware(
storage=storage or MemoryStorage(),
strategy=fsm_strategy,
events_isolation=events_isolation or DisabledEventIsolation(),
)
if not disable_fsm:
# Note that when FSM middleware is disabled, the event isolation is also disabled
# Because the isolation mechanism is a part of the FSM
self.update.outer_middleware(self.fsm)
self.shutdown.register(self.fsm.close)
self.workflow_data: Dict[str, Any] = kwargs
self._running_lock = Lock()
self._stop_signal: Optional[Event] = None
self._stopped_signal: Optional[Event] = None
self._handle_update_tasks: Set[asyncio.Task[Any]] = set()
def __getitem__(self, item: str) -> Any:
return self.workflow_data[item]
def __setitem__(self, key: str, value: Any) -> None:
self.workflow_data[key] = value
def __delitem__(self, key: str) -> None:
del self.workflow_data[key]
def get(self, key: str, /, default: Optional[Any] = None) -> Optional[Any]:
return self.workflow_data.get(key, default)
@property
def storage(self) -> BaseStorage:
return self.fsm.storage
@property
def parent_router(self) -> Optional[Router]:
"""
Dispatcher has no parent router and can't be included to any other routers or dispatchers
:return:
"""
return None # noqa: RET501
@parent_router.setter
def parent_router(self, value: Router) -> None:
"""
Dispatcher is root Router then configuring parent router is not allowed
:param value:
:return:
"""
raise RuntimeError("Dispatcher can not be attached to another Router.")
async def feed_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any:
"""
Main entry point for incoming updates
Response of this method can be used as Webhook response
:param bot:
:param update:
"""
loop = asyncio.get_running_loop()
handled = False
start_time = loop.time()
if update.bot != bot:
# Re-mounting update to the current bot instance for making possible to
# use it in shortcuts.
# Here is update is re-created because we need to propagate context to
# all nested objects and attributes of the Update, but it
# is impossible without roundtrip to JSON :(
# The preferred way is that pass already mounted Bot instance to this update
# before call feed_update method
update = Update.model_validate(update.model_dump(), context={"bot": bot})
try:
response = await self.update.wrap_outer_middleware(
self.update.trigger,
update,
{
**self.workflow_data,
**kwargs,
"bot": bot,
},
)
handled = response is not UNHANDLED
return response
finally:
finish_time = loop.time()
duration = (finish_time - start_time) * 1000
loggers.event.info(
"Update id=%s is %s. Duration %d ms by bot id=%d",
update.update_id,
"handled" if handled else "not handled",
duration,
bot.id,
)
async def feed_raw_update(self, bot: Bot, update: Dict[str, Any], **kwargs: Any) -> Any:
"""
Main entry point for incoming updates with automatic Dict->Update serializer
:param bot:
:param update:
:param kwargs:
"""
parsed_update = Update.model_validate(update, context={"bot": bot})
return await self._feed_webhook_update(bot=bot, update=parsed_update, **kwargs)
@classmethod
async def _listen_updates(
cls,
bot: Bot,
polling_timeout: int = 30,
backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG,
allowed_updates: Optional[List[str]] = None,
) -> AsyncGenerator[Update, None]:
"""
Endless updates reader with correctly handling any server-side or connection errors.
So you may not worry that the polling will stop working.
"""
backoff = Backoff(config=backoff_config)
get_updates = GetUpdates(timeout=polling_timeout, allowed_updates=allowed_updates)
kwargs = {}
if bot.session.timeout:
# Request timeout can be lower than session timeout and that's OK.
# To prevent false-positive TimeoutError we should wait longer than polling timeout
kwargs["request_timeout"] = int(bot.session.timeout + polling_timeout)
failed = False
while True:
try:
updates = await bot(get_updates, **kwargs)
except Exception as e:
failed = True
# In cases when Telegram Bot API was inaccessible don't need to stop polling
# process because some developers can't make auto-restarting of the script
loggers.dispatcher.error("Failed to fetch updates - %s: %s", type(e).__name__, e)
# And also backoff timeout is best practice to retry any network activity
loggers.dispatcher.warning(
"Sleep for %f seconds and try again... (tryings = %d, bot id = %d)",
backoff.next_delay,
backoff.counter,
bot.id,
)
await backoff.asleep()
continue
# In case when network connection was fixed let's reset the backoff
# to initial value and then process updates
if failed:
loggers.dispatcher.info(
"Connection established (tryings = %d, bot id = %d)",
backoff.counter,
bot.id,
)
backoff.reset()
failed = False
for update in updates:
yield update
# The getUpdates method returns the earliest 100 unconfirmed updates.
# To confirm an update, use the offset parameter when calling getUpdates
# All updates with update_id less than or equal to offset will be marked
# as confirmed on the server and will no longer be returned.
get_updates.offset = update.update_id + 1
async def _listen_update(self, update: Update, **kwargs: Any) -> Any:
"""
Main updates listener
Workflow:
- Detect content type and propagate to observers in current router
- If no one filter is pass - propagate update to child routers as Update
:param update:
:param kwargs:
:return:
"""
try:
update_type = update.event_type
event = update.event
except UpdateTypeLookupError as e:
warnings.warn(
"Detected unknown update type.\n"
"Seems like Telegram Bot API was updated and you have "
"installed not latest version of aiogram framework"
f"\nUpdate: {update.model_dump_json(exclude_unset=True)}",
RuntimeWarning,
)
raise SkipHandler() from e
kwargs.update(event_update=update)
return await self.propagate_event(update_type=update_type, event=event, **kwargs)
@classmethod
async def silent_call_request(cls, bot: Bot, result: TelegramMethod[Any]) -> None:
"""
Simulate answer into WebHook
:param bot:
:param result:
:return:
"""
try:
await bot(result)
except TelegramAPIError as e:
# In due to WebHook mechanism doesn't allow getting response for
# requests called in answer to WebHook request.
# Need to skip unsuccessful responses.
# For debugging here is added logging.
loggers.event.error("Failed to make answer: %s: %s", e.__class__.__name__, e)
async def _process_update(
self, bot: Bot, update: Update, call_answer: bool = True, **kwargs: Any
) -> bool:
"""
Propagate update to event listeners
:param bot: instance of Bot
:param update: instance of Update
:param call_answer: need to execute response as Telegram method (like answer into webhook)
:param kwargs: contextual data for middlewares, filters and handlers
:return: status
"""
try:
response = await self.feed_update(bot, update, **kwargs)
if call_answer and isinstance(response, TelegramMethod):
await self.silent_call_request(bot=bot, result=response)
return response is not UNHANDLED
except Exception as e:
loggers.event.exception(
"Cause exception while process update id=%d by bot id=%d\n%s: %s",
update.update_id,
bot.id,
e.__class__.__name__,
e,
)
return True # because update was processed but unsuccessful
async def _polling(
self,
bot: Bot,
polling_timeout: int = 30,
handle_as_tasks: bool = True,
backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG,
allowed_updates: Optional[List[str]] = None,
**kwargs: Any,
) -> None:
"""
Internal polling process
:param bot:
:param kwargs:
:return:
"""
user: User = await bot.me()
loggers.dispatcher.info(
"Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name
)
try:
async for update in self._listen_updates(
bot,
polling_timeout=polling_timeout,
backoff_config=backoff_config,
allowed_updates=allowed_updates,
):
handle_update = self._process_update(bot=bot, update=update, **kwargs)
if handle_as_tasks:
handle_update_task = asyncio.create_task(handle_update)
self._handle_update_tasks.add(handle_update_task)
handle_update_task.add_done_callback(self._handle_update_tasks.discard)
else:
await handle_update
finally:
loggers.dispatcher.info(
"Polling stopped for bot @%s id=%d - %r", user.username, bot.id, user.full_name
)
async def _feed_webhook_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any:
"""
The same with `Dispatcher.process_update()` but returns real response instead of bool
"""
try:
return await self.feed_update(bot, update, **kwargs)
except Exception as e:
loggers.event.exception(
"Cause exception while process update id=%d by bot id=%d\n%s: %s",
update.update_id,
bot.id,
e.__class__.__name__,
e,
)
raise
async def feed_webhook_update(
self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any
) -> Optional[TelegramMethod[TelegramType]]:
if not isinstance(update, Update): # Allow to use raw updates
update = Update.model_validate(update, context={"bot": bot})
ctx = contextvars.copy_context()
loop = asyncio.get_running_loop()
waiter = loop.create_future()
def release_waiter(*_: Any) -> None:
if not waiter.done():
waiter.set_result(None)
timeout_handle = loop.call_later(_timeout, release_waiter)
process_updates: Future[Any] = asyncio.ensure_future(
self._feed_webhook_update(bot=bot, update=update, **kwargs)
)
process_updates.add_done_callback(release_waiter, context=ctx)
def process_response(task: Future[Any]) -> None:
warnings.warn(
"Detected slow response into webhook.\n"
"Telegram is waiting for response only first 60 seconds and then re-send update.\n"
"For preventing this situation response into webhook returned immediately "
"and handler is moved to background and still processing update.",
RuntimeWarning,
)
try:
result = task.result()
except Exception as e:
raise e
if isinstance(result, TelegramMethod):
asyncio.ensure_future(self.silent_call_request(bot=bot, result=result))
try:
try:
await waiter
except CancelledError: # pragma: no cover
process_updates.remove_done_callback(release_waiter)
process_updates.cancel()
raise
if process_updates.done():
# TODO: handle exceptions
response: Any = process_updates.result()
if isinstance(response, TelegramMethod):
return response
else:
process_updates.remove_done_callback(release_waiter)
process_updates.add_done_callback(process_response, context=ctx)
finally:
timeout_handle.cancel()
return None
async def stop_polling(self) -> None:
"""
Execute this method if you want to stop polling programmatically
:return:
"""
if not self._running_lock.locked():
raise RuntimeError("Polling is not started")
if not self._stop_signal or not self._stopped_signal:
return
self._stop_signal.set()
await self._stopped_signal.wait()
def _signal_stop_polling(self, sig: signal.Signals) -> None:
if not self._running_lock.locked():
return
loggers.dispatcher.warning("Received %s signal", sig.name)
if not self._stop_signal:
return
self._stop_signal.set()
async def start_polling(
self,
*bots: Bot,
polling_timeout: int = 10,
handle_as_tasks: bool = True,
backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG,
allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET,
handle_signals: bool = True,
close_bot_session: bool = True,
**kwargs: Any,
) -> None:
"""
Polling runner
:param bots: Bot instances (one or more)
:param polling_timeout: Long-polling wait time
:param handle_as_tasks: Run task for each event and no wait result
:param backoff_config: backoff-retry config
:param allowed_updates: List of the update types you want your bot to receive
By default, all used update types are enabled (resolved from handlers)
:param handle_signals: handle signals (SIGINT/SIGTERM)
:param close_bot_session: close bot sessions on shutdown
:param kwargs: contextual data
:return:
"""
if not bots:
raise ValueError("At least one bot instance is required to start polling")
if "bot" in kwargs:
raise ValueError(
"Keyword argument 'bot' is not acceptable, "
"the bot instance should be passed as positional argument"
)
async with self._running_lock: # Prevent to run this method twice at a once
if self._stop_signal is None:
self._stop_signal = Event()
if self._stopped_signal is None:
self._stopped_signal = Event()
if allowed_updates is UNSET:
allowed_updates = self.resolve_used_update_types()
self._stop_signal.clear()
self._stopped_signal.clear()
if handle_signals:
loop = asyncio.get_running_loop()
with suppress(NotImplementedError): # pragma: no cover
# Signals handling is not supported on Windows
# It also can't be covered on Windows
loop.add_signal_handler(
signal.SIGTERM, self._signal_stop_polling, signal.SIGTERM
)
loop.add_signal_handler(
signal.SIGINT, self._signal_stop_polling, signal.SIGINT
)
workflow_data = {
"dispatcher": self,
"bots": bots,
**self.workflow_data,
**kwargs,
}
if "bot" in workflow_data:
workflow_data.pop("bot")
await self.emit_startup(bot=bots[-1], **workflow_data)
loggers.dispatcher.info("Start polling")
try:
tasks: List[asyncio.Task[Any]] = [
asyncio.create_task(
self._polling(
bot=bot,
handle_as_tasks=handle_as_tasks,
polling_timeout=polling_timeout,
backoff_config=backoff_config,
allowed_updates=allowed_updates,
**workflow_data,
)
)
for bot in bots
]
tasks.append(asyncio.create_task(self._stop_signal.wait()))
done, pending = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)
for task in pending:
# (mostly) Graceful shutdown unfinished tasks
task.cancel()
with suppress(CancelledError):
await task
# Wait finished tasks to propagate unhandled exceptions
await asyncio.gather(*done)
finally:
loggers.dispatcher.info("Polling stopped")
try:
await self.emit_shutdown(bot=bots[-1], **workflow_data)
finally:
if close_bot_session:
await asyncio.gather(*(bot.session.close() for bot in bots))
self._stopped_signal.set()
def run_polling(
self,
*bots: Bot,
polling_timeout: int = 10,
handle_as_tasks: bool = True,
backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG,
allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET,
handle_signals: bool = True,
close_bot_session: bool = True,
**kwargs: Any,
) -> None:
"""
Run many bots with polling
:param bots: Bot instances (one or more)
:param polling_timeout: Long-polling wait time
:param handle_as_tasks: Run task for each event and no wait result
:param backoff_config: backoff-retry config
:param allowed_updates: List of the update types you want your bot to receive
:param handle_signals: handle signals (SIGINT/SIGTERM)
:param close_bot_session: close bot sessions on shutdown
:param kwargs: contextual data
:return:
"""
with suppress(KeyboardInterrupt):
return asyncio.run(
self.start_polling(
*bots,
**kwargs,
polling_timeout=polling_timeout,
handle_as_tasks=handle_as_tasks,
backoff_config=backoff_config,
allowed_updates=allowed_updates,
handle_signals=handle_signals,
close_bot_session=close_bot_session,
)
)
+35
View File
@@ -0,0 +1,35 @@
from __future__ import annotations
from typing import Any, Awaitable, Callable, Dict, NoReturn, Optional, TypeVar, Union
from unittest.mock import sentinel
from ...types import TelegramObject
from ..middlewares.base import BaseMiddleware
MiddlewareEventType = TypeVar("MiddlewareEventType", bound=TelegramObject)
NextMiddlewareType = Callable[[MiddlewareEventType, Dict[str, Any]], Awaitable[Any]]
MiddlewareType = Union[
BaseMiddleware,
Callable[
[NextMiddlewareType[MiddlewareEventType], MiddlewareEventType, Dict[str, Any]],
Awaitable[Any],
],
]
UNHANDLED = sentinel.UNHANDLED
REJECTED = sentinel.REJECTED
class SkipHandler(Exception):
pass
class CancelHandler(Exception):
pass
def skip(message: Optional[str] = None) -> NoReturn:
"""
Raise an SkipHandler
"""
raise SkipHandler(message or "Event skipped")
+53
View File
@@ -0,0 +1,53 @@
from __future__ import annotations
from typing import Any, Callable, List
from .handler import CallbackType, HandlerObject
class EventObserver:
"""
Simple events observer
Is used for managing events is not related with Telegram
(For example startup/shutdown processes)
Handlers can be registered via decorator or method
.. code-block:: python
<observer>.register(my_handler)
.. code-block:: python
@<observer>()
async def my_handler(*args, **kwargs): ...
"""
def __init__(self) -> None:
self.handlers: List[HandlerObject] = []
def register(self, callback: CallbackType) -> None:
"""
Register callback with filters
"""
self.handlers.append(HandlerObject(callback=callback))
async def trigger(self, *args: Any, **kwargs: Any) -> None:
"""
Propagate event to handlers.
Handler will be called when all its filters is pass.
"""
for handler in self.handlers:
await handler.call(*args, **kwargs)
def __call__(self) -> Callable[[CallbackType], CallbackType]:
"""
Decorator for registering event handlers
"""
def wrapper(callback: CallbackType) -> CallbackType:
self.register(callback)
return callback
return wrapper
@@ -0,0 +1,99 @@
import asyncio
import contextvars
import inspect
import warnings
from dataclasses import dataclass, field
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from magic_filter.magic import MagicFilter as OriginalMagicFilter
from aiogram.dispatcher.flags import extract_flags_from_object
from aiogram.filters.base import Filter
from aiogram.handlers import BaseHandler
from aiogram.utils.magic_filter import MagicFilter
from aiogram.utils.warnings import Recommendation
CallbackType = Callable[..., Any]
@dataclass
class CallableObject:
callback: CallbackType
awaitable: bool = field(init=False)
params: Set[str] = field(init=False)
varkw: bool = field(init=False)
def __post_init__(self) -> None:
callback = inspect.unwrap(self.callback)
self.awaitable = inspect.isawaitable(callback) or inspect.iscoroutinefunction(callback)
spec = inspect.getfullargspec(callback)
self.params = {*spec.args, *spec.kwonlyargs}
self.varkw = spec.varkw is not None
def _prepare_kwargs(self, kwargs: Dict[str, Any]) -> Dict[str, Any]:
if self.varkw:
return kwargs
return {k: kwargs[k] for k in self.params if k in kwargs}
async def call(self, *args: Any, **kwargs: Any) -> Any:
wrapped = partial(self.callback, *args, **self._prepare_kwargs(kwargs))
if self.awaitable:
return await wrapped()
loop = asyncio.get_event_loop()
context = contextvars.copy_context()
wrapped = partial(context.run, wrapped)
return await loop.run_in_executor(None, wrapped)
@dataclass
class FilterObject(CallableObject):
magic: Optional[MagicFilter] = None
def __post_init__(self) -> None:
if isinstance(self.callback, OriginalMagicFilter):
# MagicFilter instance is callable but generates
# only "CallOperation" instead of applying the filter
self.magic = self.callback
self.callback = self.callback.resolve
if not isinstance(self.magic, MagicFilter):
# Issue: https://github.com/aiogram/aiogram/issues/990
warnings.warn(
category=Recommendation,
message="You are using F provided by magic_filter package directly, "
"but it lacks `.as_()` extension."
"\n Please change the import statement: from `from magic_filter import F` "
"to `from aiogram import F` to silence this warning.",
stacklevel=6,
)
super(FilterObject, self).__post_init__()
if isinstance(self.callback, Filter):
self.awaitable = True
@dataclass
class HandlerObject(CallableObject):
filters: Optional[List[FilterObject]] = None
flags: Dict[str, Any] = field(default_factory=dict)
def __post_init__(self) -> None:
super(HandlerObject, self).__post_init__()
callback = inspect.unwrap(self.callback)
if inspect.isclass(callback) and issubclass(callback, BaseHandler):
self.awaitable = True
self.flags.update(extract_flags_from_object(callback))
async def check(self, *args: Any, **kwargs: Any) -> Tuple[bool, Dict[str, Any]]:
if not self.filters:
return True, kwargs
for event_filter in self.filters:
check = await event_filter.call(*args, **kwargs)
if not check:
return False, kwargs
if isinstance(check, dict):
kwargs.update(check)
return True, kwargs
@@ -0,0 +1,141 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional
from aiogram.dispatcher.middlewares.manager import MiddlewareManager
from ...exceptions import UnsupportedKeywordArgument
from ...filters.base import Filter
from ...types import TelegramObject
from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler
from .handler import CallbackType, FilterObject, HandlerObject
if TYPE_CHECKING:
from aiogram.dispatcher.router import Router
class TelegramEventObserver:
"""
Event observer for Telegram events
Here you can register handler with filter.
This observer will stop event propagation when first handler is pass.
"""
def __init__(self, router: Router, event_name: str) -> None:
self.router: Router = router
self.event_name: str = event_name
self.handlers: List[HandlerObject] = []
self.middleware = MiddlewareManager()
self.outer_middleware = MiddlewareManager()
# Re-used filters check method from already implemented handler object
# with dummy callback which never will be used
self._handler = HandlerObject(callback=lambda: True, filters=[])
def filter(self, *filters: CallbackType) -> None:
"""
Register filter for all handlers of this event observer
:param filters: positional filters
"""
if self._handler.filters is None:
self._handler.filters = []
self._handler.filters.extend([FilterObject(filter_) for filter_ in filters])
def _resolve_middlewares(self) -> List[MiddlewareType[TelegramObject]]:
middlewares: List[MiddlewareType[TelegramObject]] = []
for router in reversed(tuple(self.router.chain_head)):
observer = router.observers.get(self.event_name)
if observer:
middlewares.extend(observer.middleware)
return middlewares
def register(
self,
callback: CallbackType,
*filters: CallbackType,
flags: Optional[Dict[str, Any]] = None,
**kwargs: Any,
) -> CallbackType:
"""
Register event handler
"""
if kwargs:
raise UnsupportedKeywordArgument(
"Passing any additional keyword arguments to the registrar method "
"is not supported.\n"
"This error may be caused when you are trying to register filters like in 2.x "
"version of this framework, if it's true just look at correspoding "
"documentation pages.\n"
f"Please remove the {set(kwargs.keys())} arguments from this call.\n"
)
if flags is None:
flags = {}
for item in filters:
if isinstance(item, Filter):
item.update_handler_flags(flags=flags)
self.handlers.append(
HandlerObject(
callback=callback,
filters=[FilterObject(filter_) for filter_ in filters],
flags=flags,
)
)
return callback
def wrap_outer_middleware(
self, callback: Any, event: TelegramObject, data: Dict[str, Any]
) -> Any:
wrapped_outer = self.middleware.wrap_middlewares(
self.outer_middleware,
callback,
)
return wrapped_outer(event, data)
def check_root_filters(self, event: TelegramObject, **kwargs: Any) -> Any:
return self._handler.check(event, **kwargs)
async def trigger(self, event: TelegramObject, **kwargs: Any) -> Any:
"""
Propagate event to handlers and stops propagation on first match.
Handler will be called when all its filters are pass.
"""
for handler in self.handlers:
kwargs["handler"] = handler
result, data = await handler.check(event, **kwargs)
if result:
kwargs.update(data)
try:
wrapped_inner = self.outer_middleware.wrap_middlewares(
self._resolve_middlewares(),
handler.call,
)
return await wrapped_inner(event, kwargs)
except SkipHandler:
continue
return UNHANDLED
def __call__(
self,
*filters: CallbackType,
flags: Optional[Dict[str, Any]] = None,
**kwargs: Any,
) -> Callable[[CallbackType], CallbackType]:
"""
Decorator for registering event handlers
"""
def wrapper(callback: CallbackType) -> CallbackType:
self.register(callback, *filters, flags=flags, **kwargs)
return callback
return wrapper
+127
View File
@@ -0,0 +1,127 @@
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, cast, overload
from magic_filter import AttrDict, MagicFilter
if TYPE_CHECKING:
from aiogram.dispatcher.event.handler import HandlerObject
@dataclass(frozen=True)
class Flag:
name: str
value: Any
@dataclass(frozen=True)
class FlagDecorator:
flag: Flag
@classmethod
def _with_flag(cls, flag: Flag) -> "FlagDecorator":
return cls(flag)
def _with_value(self, value: Any) -> "FlagDecorator":
new_flag = Flag(self.flag.name, value)
return self._with_flag(new_flag)
@overload
def __call__(self, value: Callable[..., Any], /) -> Callable[..., Any]: # type: ignore
pass
@overload
def __call__(self, value: Any, /) -> "FlagDecorator":
pass
@overload
def __call__(self, **kwargs: Any) -> "FlagDecorator":
pass
def __call__(
self,
value: Optional[Any] = None,
**kwargs: Any,
) -> Union[Callable[..., Any], "FlagDecorator"]:
if value and kwargs:
raise ValueError("The arguments `value` and **kwargs can not be used together")
if value is not None and callable(value):
value.aiogram_flag = {
**extract_flags_from_object(value),
self.flag.name: self.flag.value,
}
return cast(Callable[..., Any], value)
return self._with_value(AttrDict(kwargs) if value is None else value)
if TYPE_CHECKING:
class _ChatActionFlagProtocol(FlagDecorator):
def __call__( # type: ignore[override]
self,
action: str = ...,
interval: float = ...,
initial_sleep: float = ...,
**kwargs: Any,
) -> FlagDecorator:
pass
class FlagGenerator:
def __getattr__(self, name: str) -> FlagDecorator:
if name[0] == "_":
raise AttributeError("Flag name must NOT start with underscore")
return FlagDecorator(Flag(name, True))
if TYPE_CHECKING:
chat_action: _ChatActionFlagProtocol
def extract_flags_from_object(obj: Any) -> Dict[str, Any]:
if not hasattr(obj, "aiogram_flag"):
return {}
return cast(Dict[str, Any], obj.aiogram_flag)
def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, Any]:
"""
Extract flags from handler or middleware context data
:param handler: handler object or data
:return: dictionary with all handler flags
"""
if isinstance(handler, dict) and "handler" in handler:
handler = handler["handler"]
if hasattr(handler, "flags"):
return handler.flags
return {}
def get_flag(
handler: Union["HandlerObject", Dict[str, Any]],
name: str,
*,
default: Optional[Any] = None,
) -> Any:
"""
Get flag by name
:param handler: handler object or data
:param name: name of the flag
:param default: default value (None)
:return: value of the flag or default
"""
flags = extract_flags(handler)
return flags.get(name, default)
def check_flags(handler: Union["HandlerObject", Dict[str, Any]], magic: MagicFilter) -> Any:
"""
Check flags via magic filter
:param handler: handler object or data
:param magic: instance of the magic
:return: the result of magic filter check
"""
flags = extract_flags(handler)
return magic.resolve(AttrDict(flags))
@@ -0,0 +1,29 @@
from abc import ABC, abstractmethod
from typing import Any, Awaitable, Callable, Dict, TypeVar
from aiogram.types import TelegramObject
T = TypeVar("T")
class BaseMiddleware(ABC):
"""
Generic middleware class
"""
@abstractmethod
async def __call__(
self,
handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]],
event: TelegramObject,
data: Dict[str, Any],
) -> Any: # pragma: no cover
"""
Execute middleware
:param handler: Wrapped handler in middlewares chain
:param event: Incoming event (Subclass of :class:`aiogram.types.base.TelegramObject`)
:param data: Contextual data. Will be mapped to handler arguments
:return: :class:`Any`
"""
pass
@@ -0,0 +1,36 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, cast
from ...types import TelegramObject, Update
from ...types.error_event import ErrorEvent
from ..event.bases import UNHANDLED, CancelHandler, SkipHandler
from .base import BaseMiddleware
if TYPE_CHECKING:
from ..router import Router
class ErrorsMiddleware(BaseMiddleware):
def __init__(self, router: Router):
self.router = router
async def __call__(
self,
handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]],
event: TelegramObject,
data: Dict[str, Any],
) -> Any:
try:
return await handler(event, data)
except (SkipHandler, CancelHandler): # pragma: no cover
raise
except Exception as e:
response = await self.router.propagate_event(
update_type="error",
event=ErrorEvent(update=cast(Update, event), exception=e),
**data,
)
if response is not UNHANDLED:
return response
raise
@@ -0,0 +1,65 @@
import functools
from typing import Any, Callable, Dict, List, Optional, Sequence, Union, overload
from aiogram.dispatcher.event.bases import (
MiddlewareEventType,
MiddlewareType,
NextMiddlewareType,
)
from aiogram.dispatcher.event.handler import CallbackType
from aiogram.types import TelegramObject
class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]):
def __init__(self) -> None:
self._middlewares: List[MiddlewareType[TelegramObject]] = []
def register(
self,
middleware: MiddlewareType[TelegramObject],
) -> MiddlewareType[TelegramObject]:
self._middlewares.append(middleware)
return middleware
def unregister(self, middleware: MiddlewareType[TelegramObject]) -> None:
self._middlewares.remove(middleware)
def __call__(
self,
middleware: Optional[MiddlewareType[TelegramObject]] = None,
) -> Union[
Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]],
MiddlewareType[TelegramObject],
]:
if middleware is None:
return self.register
return self.register(middleware)
@overload
def __getitem__(self, item: int) -> MiddlewareType[TelegramObject]:
pass
@overload
def __getitem__(self, item: slice) -> Sequence[MiddlewareType[TelegramObject]]:
pass
def __getitem__(
self, item: Union[int, slice]
) -> Union[MiddlewareType[TelegramObject], Sequence[MiddlewareType[TelegramObject]]]:
return self._middlewares[item]
def __len__(self) -> int:
return len(self._middlewares)
@staticmethod
def wrap_middlewares(
middlewares: Sequence[MiddlewareType[MiddlewareEventType]], handler: CallbackType
) -> NextMiddlewareType[MiddlewareEventType]:
@functools.wraps(handler)
def handler_wrapper(event: TelegramObject, kwargs: Dict[str, Any]) -> Any:
return handler(event, **kwargs)
middleware = handler_wrapper
for m in reversed(middlewares):
middleware = functools.partial(m, middleware) # type: ignore[assignment]
return middleware
@@ -0,0 +1,178 @@
from dataclasses import dataclass
from typing import Any, Awaitable, Callable, Dict, Optional
from aiogram.dispatcher.middlewares.base import BaseMiddleware
from aiogram.types import (
Chat,
ChatBoostSourcePremium,
InaccessibleMessage,
TelegramObject,
Update,
User,
)
EVENT_CONTEXT_KEY = "event_context"
EVENT_FROM_USER_KEY = "event_from_user"
EVENT_CHAT_KEY = "event_chat"
EVENT_THREAD_ID_KEY = "event_thread_id"
@dataclass(frozen=True)
class EventContext:
chat: Optional[Chat] = None
user: Optional[User] = None
thread_id: Optional[int] = None
business_connection_id: Optional[str] = None
@property
def user_id(self) -> Optional[int]:
return self.user.id if self.user else None
@property
def chat_id(self) -> Optional[int]:
return self.chat.id if self.chat else None
class UserContextMiddleware(BaseMiddleware):
async def __call__(
self,
handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]],
event: TelegramObject,
data: Dict[str, Any],
) -> Any:
if not isinstance(event, Update):
raise RuntimeError("UserContextMiddleware got an unexpected event type!")
event_context = data[EVENT_CONTEXT_KEY] = self.resolve_event_context(event=event)
# Backward compatibility
if event_context.user is not None:
data[EVENT_FROM_USER_KEY] = event_context.user
if event_context.chat is not None:
data[EVENT_CHAT_KEY] = event_context.chat
if event_context.thread_id is not None:
data[EVENT_THREAD_ID_KEY] = event_context.thread_id
return await handler(event, data)
@classmethod
def resolve_event_context(cls, event: Update) -> EventContext:
"""
Resolve chat and user instance from Update object
"""
if event.message:
return EventContext(
chat=event.message.chat,
user=event.message.from_user,
thread_id=(
event.message.message_thread_id if event.message.is_topic_message else None
),
)
if event.edited_message:
return EventContext(
chat=event.edited_message.chat,
user=event.edited_message.from_user,
thread_id=(
event.edited_message.message_thread_id
if event.edited_message.is_topic_message
else None
),
)
if event.channel_post:
return EventContext(chat=event.channel_post.chat)
if event.edited_channel_post:
return EventContext(chat=event.edited_channel_post.chat)
if event.inline_query:
return EventContext(user=event.inline_query.from_user)
if event.chosen_inline_result:
return EventContext(user=event.chosen_inline_result.from_user)
if event.callback_query:
callback_query_message = event.callback_query.message
if callback_query_message:
return EventContext(
chat=callback_query_message.chat,
user=event.callback_query.from_user,
thread_id=(
callback_query_message.message_thread_id
if not isinstance(callback_query_message, InaccessibleMessage)
and callback_query_message.is_topic_message
else None
),
business_connection_id=(
callback_query_message.business_connection_id
if not isinstance(callback_query_message, InaccessibleMessage)
else None
),
)
return EventContext(user=event.callback_query.from_user)
if event.shipping_query:
return EventContext(user=event.shipping_query.from_user)
if event.pre_checkout_query:
return EventContext(user=event.pre_checkout_query.from_user)
if event.poll_answer:
return EventContext(
chat=event.poll_answer.voter_chat,
user=event.poll_answer.user,
)
if event.my_chat_member:
return EventContext(
chat=event.my_chat_member.chat, user=event.my_chat_member.from_user
)
if event.chat_member:
return EventContext(chat=event.chat_member.chat, user=event.chat_member.from_user)
if event.chat_join_request:
return EventContext(
chat=event.chat_join_request.chat, user=event.chat_join_request.from_user
)
if event.message_reaction:
return EventContext(
chat=event.message_reaction.chat,
user=event.message_reaction.user,
)
if event.message_reaction_count:
return EventContext(chat=event.message_reaction_count.chat)
if event.chat_boost:
# We only check the premium source, because only it has a sender user,
# other sources have a user, but it is not the sender, but the recipient
if isinstance(event.chat_boost.boost.source, ChatBoostSourcePremium):
return EventContext(
chat=event.chat_boost.chat,
user=event.chat_boost.boost.source.user,
)
return EventContext(chat=event.chat_boost.chat)
if event.removed_chat_boost:
return EventContext(chat=event.removed_chat_boost.chat)
if event.deleted_business_messages:
return EventContext(
chat=event.deleted_business_messages.chat,
business_connection_id=event.deleted_business_messages.business_connection_id,
)
if event.business_connection:
return EventContext(
user=event.business_connection.user,
business_connection_id=event.business_connection.id,
)
if event.business_message:
return EventContext(
chat=event.business_message.chat,
user=event.business_message.from_user,
thread_id=(
event.business_message.message_thread_id
if event.business_message.is_topic_message
else None
),
business_connection_id=event.business_message.business_connection_id,
)
if event.edited_business_message:
return EventContext(
chat=event.edited_business_message.chat,
user=event.edited_business_message.from_user,
thread_id=(
event.edited_business_message.message_thread_id
if event.edited_business_message.is_topic_message
else None
),
business_connection_id=event.edited_business_message.business_connection_id,
)
return EventContext()
+271
View File
@@ -0,0 +1,271 @@
from __future__ import annotations
from typing import Any, Dict, Final, Generator, List, Optional, Set
from ..types import TelegramObject
from .event.bases import REJECTED, UNHANDLED
from .event.event import EventObserver
from .event.telegram import TelegramEventObserver
INTERNAL_UPDATE_TYPES: Final[frozenset[str]] = frozenset({"update", "error"})
class Router:
"""
Router can route update, and it nested update types like messages, callback query,
polls and all other event types.
Event handlers can be registered in observer by two ways:
- By observer method - :obj:`router.<event_type>.register(handler, <filters, ...>)`
- By decorator - :obj:`@router.<event_type>(<filters, ...>)`
"""
def __init__(self, *, name: Optional[str] = None) -> None:
"""
:param name: Optional router name, can be useful for debugging
"""
self.name = name or hex(id(self))
self._parent_router: Optional[Router] = None
self.sub_routers: List[Router] = []
# Observers
self.message = TelegramEventObserver(router=self, event_name="message")
self.edited_message = TelegramEventObserver(router=self, event_name="edited_message")
self.channel_post = TelegramEventObserver(router=self, event_name="channel_post")
self.edited_channel_post = TelegramEventObserver(
router=self, event_name="edited_channel_post"
)
self.inline_query = TelegramEventObserver(router=self, event_name="inline_query")
self.chosen_inline_result = TelegramEventObserver(
router=self, event_name="chosen_inline_result"
)
self.callback_query = TelegramEventObserver(router=self, event_name="callback_query")
self.shipping_query = TelegramEventObserver(router=self, event_name="shipping_query")
self.pre_checkout_query = TelegramEventObserver(
router=self, event_name="pre_checkout_query"
)
self.poll = TelegramEventObserver(router=self, event_name="poll")
self.poll_answer = TelegramEventObserver(router=self, event_name="poll_answer")
self.my_chat_member = TelegramEventObserver(router=self, event_name="my_chat_member")
self.chat_member = TelegramEventObserver(router=self, event_name="chat_member")
self.chat_join_request = TelegramEventObserver(router=self, event_name="chat_join_request")
self.message_reaction = TelegramEventObserver(router=self, event_name="message_reaction")
self.message_reaction_count = TelegramEventObserver(
router=self, event_name="message_reaction_count"
)
self.chat_boost = TelegramEventObserver(router=self, event_name="chat_boost")
self.removed_chat_boost = TelegramEventObserver(
router=self, event_name="removed_chat_boost"
)
self.deleted_business_messages = TelegramEventObserver(
router=self, event_name="deleted_business_messages"
)
self.business_connection = TelegramEventObserver(
router=self, event_name="business_connection"
)
self.edited_business_message = TelegramEventObserver(
router=self, event_name="edited_business_message"
)
self.business_message = TelegramEventObserver(router=self, event_name="business_message")
self.errors = self.error = TelegramEventObserver(router=self, event_name="error")
self.startup = EventObserver()
self.shutdown = EventObserver()
self.observers: Dict[str, TelegramEventObserver] = {
"message": self.message,
"edited_message": self.edited_message,
"channel_post": self.channel_post,
"edited_channel_post": self.edited_channel_post,
"inline_query": self.inline_query,
"chosen_inline_result": self.chosen_inline_result,
"callback_query": self.callback_query,
"shipping_query": self.shipping_query,
"pre_checkout_query": self.pre_checkout_query,
"poll": self.poll,
"poll_answer": self.poll_answer,
"my_chat_member": self.my_chat_member,
"chat_member": self.chat_member,
"chat_join_request": self.chat_join_request,
"message_reaction": self.message_reaction,
"message_reaction_count": self.message_reaction_count,
"chat_boost": self.chat_boost,
"removed_chat_boost": self.removed_chat_boost,
"deleted_business_messages": self.deleted_business_messages,
"business_connection": self.business_connection,
"edited_business_message": self.edited_business_message,
"business_message": self.business_message,
"error": self.errors,
}
def __str__(self) -> str:
return f"{type(self).__name__} {self.name!r}"
def __repr__(self) -> str:
return f"<{self}>"
def resolve_used_update_types(self, skip_events: Optional[Set[str]] = None) -> List[str]:
"""
Resolve registered event names
Is useful for getting updates only for registered event types.
:param skip_events: skip specified event names
:return: set of registered names
"""
handlers_in_use: Set[str] = set()
if skip_events is None:
skip_events = set()
skip_events = {*skip_events, *INTERNAL_UPDATE_TYPES}
for router in self.chain_tail:
for update_name, observer in router.observers.items():
if observer.handlers and update_name not in skip_events:
handlers_in_use.add(update_name)
return list(sorted(handlers_in_use)) # NOQA: C413
async def propagate_event(self, update_type: str, event: TelegramObject, **kwargs: Any) -> Any:
kwargs.update(event_router=self)
observer = self.observers.get(update_type)
async def _wrapped(telegram_event: TelegramObject, **data: Any) -> Any:
return await self._propagate_event(
observer=observer, update_type=update_type, event=telegram_event, **data
)
if observer:
return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
return await _wrapped(event, **kwargs)
async def _propagate_event(
self,
observer: Optional[TelegramEventObserver],
update_type: str,
event: TelegramObject,
**kwargs: Any,
) -> Any:
response = UNHANDLED
if observer:
# Check globally defined filters before any other handler will be checked.
# This check is placed here instead of `trigger` method to add possibility
# to pass context to handlers from global filters.
result, data = await observer.check_root_filters(event, **kwargs)
if not result:
return UNHANDLED
kwargs.update(data)
response = await observer.trigger(event, **kwargs)
if response is REJECTED: # pragma: no cover
# Possible only if some handler returns REJECTED
return UNHANDLED
if response is not UNHANDLED:
return response
for router in self.sub_routers:
response = await router.propagate_event(update_type=update_type, event=event, **kwargs)
if response is not UNHANDLED:
break
return response
@property
def chain_head(self) -> Generator[Router, None, None]:
router: Optional[Router] = self
while router:
yield router
router = router.parent_router
@property
def chain_tail(self) -> Generator[Router, None, None]:
yield self
for router in self.sub_routers:
yield from router.chain_tail
@property
def parent_router(self) -> Optional[Router]:
return self._parent_router
@parent_router.setter
def parent_router(self, router: Router) -> None:
"""
Internal property setter of parent router fot this router.
Do not use this method in own code.
All routers should be included via `include_router` method.
Self- and circular- referencing are not allowed here
:param router:
"""
if not isinstance(router, Router):
raise ValueError(f"router should be instance of Router not {type(router).__name__!r}")
if self._parent_router:
raise RuntimeError(f"Router is already attached to {self._parent_router!r}")
if self == router:
raise RuntimeError("Self-referencing routers is not allowed")
parent: Optional[Router] = router
while parent is not None:
if parent == self:
raise RuntimeError("Circular referencing of Router is not allowed")
parent = parent.parent_router
self._parent_router = router
router.sub_routers.append(self)
def include_routers(self, *routers: Router) -> None:
"""
Attach multiple routers.
:param routers:
:return:
"""
if not routers:
raise ValueError("At least one router must be provided")
for router in routers:
self.include_router(router)
def include_router(self, router: Router) -> Router:
"""
Attach another router.
:param router:
:return:
"""
if not isinstance(router, Router):
raise ValueError(
f"router should be instance of Router not {type(router).__class__.__name__}"
)
router.parent_router = self
return router
async def emit_startup(self, *args: Any, **kwargs: Any) -> None:
"""
Recursively call startup callbacks
:param args:
:param kwargs:
:return:
"""
kwargs.update(router=self)
await self.startup.trigger(*args, **kwargs)
for router in self.sub_routers:
await router.emit_startup(*args, **kwargs)
async def emit_shutdown(self, *args: Any, **kwargs: Any) -> None:
"""
Recursively call shutdown callbacks to graceful shutdown
:param args:
:param kwargs:
:return:
"""
kwargs.update(router=self)
await self.shutdown.trigger(*args, **kwargs)
for router in self.sub_routers:
await router.emit_shutdown(*args, **kwargs)
+59
View File
@@ -0,0 +1,59 @@
from .bot_command_scope_type import BotCommandScopeType
from .chat_action import ChatAction
from .chat_boost_source_type import ChatBoostSourceType
from .chat_member_status import ChatMemberStatus
from .chat_type import ChatType
from .content_type import ContentType
from .currency import Currency
from .dice_emoji import DiceEmoji
from .encrypted_passport_element import EncryptedPassportElement
from .inline_query_result_type import InlineQueryResultType
from .input_media_type import InputMediaType
from .input_paid_media_type import InputPaidMediaType
from .keyboard_button_poll_type_type import KeyboardButtonPollTypeType
from .mask_position_point import MaskPositionPoint
from .menu_button_type import MenuButtonType
from .message_entity_type import MessageEntityType
from .message_origin_type import MessageOriginType
from .paid_media_type import PaidMediaType
from .parse_mode import ParseMode
from .passport_element_error_type import PassportElementErrorType
from .poll_type import PollType
from .reaction_type_type import ReactionTypeType
from .revenue_withdrawal_state_type import RevenueWithdrawalStateType
from .sticker_format import StickerFormat
from .sticker_type import StickerType
from .topic_icon_color import TopicIconColor
from .transaction_partner_type import TransactionPartnerType
from .update_type import UpdateType
__all__ = (
"BotCommandScopeType",
"ChatAction",
"ChatBoostSourceType",
"ChatMemberStatus",
"ChatType",
"ContentType",
"Currency",
"DiceEmoji",
"EncryptedPassportElement",
"InlineQueryResultType",
"InputMediaType",
"InputPaidMediaType",
"KeyboardButtonPollTypeType",
"MaskPositionPoint",
"MenuButtonType",
"MessageEntityType",
"MessageOriginType",
"PaidMediaType",
"ParseMode",
"PassportElementErrorType",
"PollType",
"ReactionTypeType",
"RevenueWithdrawalStateType",
"StickerFormat",
"StickerType",
"TopicIconColor",
"TransactionPartnerType",
"UpdateType",
)

Some files were not shown because too many files have changed in this diff Show More