A python library for integrating webhook support with multiple web frameworks in aiogram. Organizes bot operation via webhooks for both single and multi-bot setups.
Project description
aiogram-webhook
aiogram-webhook is a modular Python library for webhook integration in aiogram.
It supports single-bot and token-based multi-bot setups, with route building, optional request checks, and adapters for FastAPI and aiohttp.
Install
pip install aiogram-webhook
pip install "aiogram-webhook[fastapi]"
pip install "aiogram-webhook[aiohttp]"
Quick Start
from aiogram import Bot, Dispatcher
from fastapi import FastAPI
from aiogram_webhook import FastAPIAdapter, SingleBotEngine
from aiogram_webhook.route import Route
dispatcher = Dispatcher()
bot = Bot("BOT_TOKEN")
engine = SingleBotEngine(
dispatcher,
bot,
web=FastAPIAdapter(),
route=Route(base_url="https://example.com", path="/webhook"),
)
app = FastAPI()
engine.register(app)
Call await engine.set_webhook() during your application startup to register the public webhook URL in Telegram.
For production, pass security=Security(...) to verify Telegram requests.
Documentation
The full documentation is in docs. It covers installation, FastAPI and aiohttp setup, routing, security, lifecycle behavior, and the public API.
Contributing
See CONTRIBUTING.md for development setup, branch naming, commit conventions, and PR guidelines.
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
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 aiogram_webhook-3.0.1.tar.gz.
File metadata
- Download URL: aiogram_webhook-3.0.1.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8019c4c8e3d1c53a5829df064b8c460bee54a26614264d3dcaf67e727e1cf644
|
|
| MD5 |
7dd44db40af7444b51cf1801d62db88a
|
|
| BLAKE2b-256 |
a59731a500d656a630c1a4c1bb5566af02d55af734cc999bcdc4c13e4e1c6c3d
|
File details
Details for the file aiogram_webhook-3.0.1-py3-none-any.whl.
File metadata
- Download URL: aiogram_webhook-3.0.1-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b70c51f6ff9d95b20ce28b58d5252bcb79971f447222ffeec514820550c58f6
|
|
| MD5 |
203185febcd624a1fb9f88cf4a9fedcc
|
|
| BLAKE2b-256 |
404a0d29f441d16ac459c370a52e0f970ef5646fc5c9620c130c68732b1d46dc
|