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)
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4dd2114d00ccfeebaca37bc7de4caa37216a2cbf694c76716b588473b7040ad
|
|
| MD5 |
2833ab9c3034a1c590ae0dd3c659672f
|
|
| BLAKE2b-256 |
142499d8c6920cc08a080cbc8690d900a2028aac9205ee6a2ee799c2df4567f9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6776ac30beb212fe70b6dc8d72e24f0193fa4b7641a82312c779ade928ebd78d
|
|
| MD5 |
02e5b9800cafc3671889f3b6988b07e7
|
|
| BLAKE2b-256 |
d757395b20fb2e5540a0edc18ff89d03454df2a937a82de30ce0da3f95b4e71d
|