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.3.0.tar.gz (6.4 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.3.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asgi_aiogram-0.3.0.tar.gz
  • Upload date:
  • Size: 6.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 3109edbce641f0fd51741ae256d42856e74ed987b4ead8ecdcd564b08bcb19f8
MD5 3b2030abc54cc51c4be4e355d1e3a2b3
BLAKE2b-256 c2278abc6e64678088358bc48acbf37392f393cb9cc08052954f13c332ea4e1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asgi_aiogram-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebbe8e8e780009f18cfa4673091fab71e04f60b0196358725d0573bdcf4f6811
MD5 576a1827d9eec0a0a71e4396be85ce21
BLAKE2b-256 a7e9af5af55ef5b720dc622098fa424a3e48a7d4ce601f00579d6f1ba323f38a

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