Использование
С помощью flyerapi вы можете использовать FlyerAPI вместе с Telegram
Документация: https://api.flyerservice.io/redoc
Установка
pip install flyerapi
Требования
Python 3.7+aiohttp
Возможности
AsynchronousException handling
Пример обязательной подписки с использованием aiogram
from flyerapi import Flyer
from aiogram import types
flyer = Flyer(KEY)
async def message_handler(message: types.Message):
# Применяйте везде, где требуется проверка
if not await flyer.check(message.from_user.id, language_code=message.from_user.language_code):
return
async def callback_handler(call: types.CallbackQuery):
# Применяйте везде, где требуется проверка
if not await flyer.check(call.from_user.id, language_code=call.from_user.language_code):
return
Использование пользовательского сообщения
message = {
'rows': 2,
'text': '<b>Пользовательский текст</b> для $name', # HTML
'button_bot': 'Запустить',
'button_channel': 'Подписаться',
'button_url': 'Перейти',
'button_boost': 'Голосовать',
'button_fp': 'Выполнить',
'button_view': 'Смотреть',
}
await flyer.check(user_id, language_code=language_code, message=message)
Пример для заданий
# Получение заданий для пользователя
tasks = await flyer.get_tasks(user_id=user_id, language_code=language_code, limit=5)
# Получиение статуса задания
signature = tasks[0]['signature'] # пример
status = await flyer.check_task(signature)
Пример для использования заданий в обязательной подписки с использованием aiogram
Код вынесен в файл: examples/check_with_tasks.py
Пример вебхуков
Код вынесен в файл: examples/webhook.py
Developed by Eli (c) 2023-2025
Metadata
Release files for flyerapi 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flyerapi-1.3.3.tar.gz | 5.6 kB | Without provenance | Details for flyerapi-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flyerapi-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for flyerapi-1.3.3-py3-none-any.whl |
Total release size: 11.2 kB
Release files / flyerapi-1.3.3.tar.gz
| Download URL | flyerapi-1.3.3.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d8282243f1e5d621e4ba6bd32c341dbbecd1b3466c8c5490af45507383980d5
|
|
BLAKE2b-256 checksum How to use checksums |
ff3b94f55a1de263cad252668d1d1f035f51072c552a70d334374efd6621bf82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / flyerapi-1.3.3-py3-none-any.whl
| Download URL | flyerapi-1.3.3-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7fda9840021c33ca8304d6147d1b0079881727e6d0bfea4708fbda801965205
|
|
BLAKE2b-256 checksum How to use checksums |
a982b595b1eaeea4c4a44c3463f2cd8db39ea70a6424f85033ca94f8280e478d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for flyerapi 1.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.