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.2.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file asgi_aiogram-0.1.2.tar.gz
.
File metadata
- Download URL: asgi_aiogram-0.1.2.tar.gz
- Upload date:
- Size: 4.1 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 | f994e53e0fb79d8d79833d3b23d92a29365daeefe155ec7ef432113e59baa1b6 |
|
MD5 | fcab65af5ee2d17be7002d63ea514ff5 |
|
BLAKE2b-256 | ed25b1e71ccdffe31bb880cab24d996b63355019525572c73b1a5c374f062b17 |
File details
Details for the file asgi_aiogram-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: asgi_aiogram-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.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 | f3e1ce31b56795cebb844ca7127fa605aaf6d01e33c48cb4a4c865814efd8e51 |
|
MD5 | 931612b8ef937f6ecbcf91bccdafc03e |
|
BLAKE2b-256 | 88b1fa60272bf63335ffd26f369ff810498a5af44844873a3dc8b0c8d4c9d66c |