Skip to main content

Asynchronous api of the Flyer service

Project description

FlyerAPI

PyPI PyPI

Usage

With flyerapi you can use FlyerAPI together with Telegram

Installation

pip install flyerapi

Requirements

  • Python 3.7+
  • aiohttp

Features

  • Asynchronous
  • Exception handling

Basic example 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 messages

message = {
    'text': '<b>Custom text</b> for $name',  # HTML
    'button_bot': 'Start',
    'button_channel': 'Subscribe',
}
await flyer.check(user_id, language_code=language_code, message=message)

Developed by Eli (c) 2023

Project details


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.1.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file flyerapi-1.1.0.tar.gz.

File metadata

  • Download URL: flyerapi-1.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for flyerapi-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e5dac5adad73372dc76b854ef49dc8e72de57d10df3bcf17957eb9c6d698bca7
MD5 42dba73f895df23b9c50b0d515a1c5d3
BLAKE2b-256 de5d297479949af9dd14964660c4842331f66cc21b22e39132bf7dde413d65e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page