Skip to main content

fast ASGI wraper for aiogram

Project description

base usage

from aiogram import Dispatcher, Bot
from asgi_aiogram import ASGIAiogram
from asgi_aiogram.strategy import SingleStrategy

dp = Dispatcher()

@dp.startup()
async def startup(dispatcher: Dispatcher, bot: Bot):
    await bot.close()
    await bot.set_webhook(
        url='https://example.com/bot',
        allowed_updates=dispatcher.resolve_used_update_types()
    )

bot = Bot(token="<token>")
app = ASGIAiogram(
    dispatcher=dp,
    strategy=SingleStrategy(bot=bot, path="/bot")
)
uvicorn main:app

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

asgi_aiogram-0.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asgi_aiogram-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file asgi_aiogram-0.2.0.tar.gz.

File metadata

  • Download URL: asgi_aiogram-0.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.9 Windows/10

File hashes

Hashes for asgi_aiogram-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9e753fc7dcbe3df6b6e4fb6451718892c0ad0ffbed40cad7c19b26da9fddadfc
MD5 9a73ba19e41c9f0d156867eaab56216e
BLAKE2b-256 36800866a0f77450d67a43f6cf48d9d3d895a4d42cd6b45ead098e099df907c4

See more details on using hashes here.

File details

Details for the file asgi_aiogram-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: asgi_aiogram-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.9 Windows/10

File hashes

Hashes for asgi_aiogram-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac8ef3590a8a2b7e645fea94a213258776679a18fdbab8574db700454d5978f4
MD5 222f11dbd367e73c54c9efbeb17df75f
BLAKE2b-256 d2a05f3c1b399f490611740a50c683210be14ae8a4aef6011be68f976d3ac1cb

See more details on using hashes here.

Supported by

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