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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3109edbce641f0fd51741ae256d42856e74ed987b4ead8ecdcd564b08bcb19f8
|
|
| MD5 |
3b2030abc54cc51c4be4e355d1e3a2b3
|
|
| BLAKE2b-256 |
c2278abc6e64678088358bc48acbf37392f393cb9cc08052954f13c332ea4e1c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebbe8e8e780009f18cfa4673091fab71e04f60b0196358725d0573bdcf4f6811
|
|
| MD5 |
576a1827d9eec0a0a71e4396be85ce21
|
|
| BLAKE2b-256 |
a7e9af5af55ef5b720dc622098fa424a3e48a7d4ce601f00579d6f1ba323f38a
|