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.1.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.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asgi_aiogram-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f4dd2114d00ccfeebaca37bc7de4caa37216a2cbf694c76716b588473b7040ad
MD5 2833ab9c3034a1c590ae0dd3c659672f
BLAKE2b-256 142499d8c6920cc08a080cbc8690d900a2028aac9205ee6a2ee799c2df4567f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asgi_aiogram-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6776ac30beb212fe70b6dc8d72e24f0193fa4b7641a82312c779ade928ebd78d
MD5 02e5b9800cafc3671889f3b6988b07e7
BLAKE2b-256 d757395b20fb2e5540a0edc18ff89d03454df2a937a82de30ce0da3f95b4e71d

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