Asynchronous api of the Flyer service
Project description
<h1>FlyerAPI<img src="https://telegra.ph/file/e2a2f0526d2937973a70b.png" width=50 height=50></h1>
<p align="left" >
<a href="https://pypi.org/project/flyerapi/">
<img src="https://img.shields.io/pypi/v/flyerapi?style=flat-square" alt="PyPI">
</a>
<a href="https://pypi.org/project/flyerapi/">
<img src="https://img.shields.io/pypi/dm/flyerapi?style=flat-square" alt="PyPI">
</a>
</p>
Usage
With flyerapi you can use FlyerAPI together with Telegram
Documentation: https://api.flyerservice.io/redoc
Installation
pip install flyerapi
Requirements
-
Python 3.7+ -
aiohttp
Features
-
Asynchronous -
Exception handling
Basic example for a mandatory subscription with aiogram
from flyerapi import Flyer
from aiogram import types
flyer = Flyer(KEY)
async def message_handler(message: types.Message):
# Use it wherever verification is necessary
if not await flyer.check(message.from_user.id, language_code=message.from_user.language_code):
return
async def callback_handler(call: types.CallbackQuery):
# Use it wherever verification is necessary
if not await flyer.check(call.from_user.id, language_code=call.from_user.language_code):
return
Using custom message
message = {
'text': '<b>Custom text</b> for $name', # HTML
'button_bot': 'Start',
'button_channel': 'Subscribe',
'button_url': 'Follow',
'button_boost': 'Boost',
'button_fp': 'Perform',
}
await flyer.check(user_id, language_code=language_code, message=message)
Example for tasks
# Getting tasks for the user
tasks = await flyer.get_tasks(
user_id=user_id,
language_code=language_code, # used only for new pinning
limit=5, # used only for new pinning
)
...
# Checking for completed task
status = await flyer.check_task(
user_id=user_id,
signature=tasks[0]['signature'],
)
Developed by Eli (c) 2023-2025
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flyerapi-1.2.2.tar.gz
(5.0 kB
view details)
File details
Details for the file flyerapi-1.2.2.tar.gz.
File metadata
- Download URL: flyerapi-1.2.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f4f2a6e6baa58b55513f05d7215c027f8c4ccb6cbace18d88aa8195fdb8970d
|
|
| MD5 |
7c8774d4d7f43bc219d62a369541cf33
|
|
| BLAKE2b-256 |
e608c15b34b97906a5f7101d0ffd7792d1820e18f2342824e8c86df91bff9bc1
|