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
Release history Release notifications | RSS feed
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.1.1.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file asgi_aiogram-0.1.1.tar.gz
.
File metadata
- Download URL: asgi_aiogram-0.1.1.tar.gz
- Upload date:
- Size: 3.8 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 | 7c62ffd8f881bb8c922dcaaa1be934b59969cf80c61db46e7270176955134e8e |
|
MD5 | 81f54246f2741c8dc9145dc8d8b1fb20 |
|
BLAKE2b-256 | cb744ede7165e27c7f153a3e06626cd75e5d449fbce1b0d89d37c9ba0b12f2c4 |
File details
Details for the file asgi_aiogram-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: asgi_aiogram-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.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 | 766697a1060fa4b275c68824a08f852ca8f46fea614353229193f33710f36348 |
|
MD5 | d8e837d02225a044ede747ebde686d59 |
|
BLAKE2b-256 | 37517dbf53f76514598bce43d1a7b9bf1cfdbd1c974485f428e2cbdc96426074 |