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)
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e753fc7dcbe3df6b6e4fb6451718892c0ad0ffbed40cad7c19b26da9fddadfc
|
|
| MD5 |
9a73ba19e41c9f0d156867eaab56216e
|
|
| BLAKE2b-256 |
36800866a0f77450d67a43f6cf48d9d3d895a4d42cd6b45ead098e099df907c4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac8ef3590a8a2b7e645fea94a213258776679a18fdbab8574db700454d5978f4
|
|
| MD5 |
222f11dbd367e73c54c9efbeb17df75f
|
|
| BLAKE2b-256 |
d2a05f3c1b399f490611740a50c683210be14ae8a4aef6011be68f976d3ac1cb
|