Skip to main content

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

PyPI version

aiogram-webhook

PyPI version codecov Tests Status License Ask DeepWiki Ruff ty

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiogram_webhook-3.0.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiogram_webhook-3.0.1-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

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

Hashes for aiogram_webhook-3.0.1.tar.gz
Algorithm Hash digest
SHA256 8019c4c8e3d1c53a5829df064b8c460bee54a26614264d3dcaf67e727e1cf644
MD5 7dd44db40af7444b51cf1801d62db88a
BLAKE2b-256 a59731a500d656a630c1a4c1bb5566af02d55af734cc999bcdc4c13e4e1c6c3d

See more details on using hashes here.

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

Hashes for aiogram_webhook-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b70c51f6ff9d95b20ce28b58d5252bcb79971f447222ffeec514820550c58f6
MD5 203185febcd624a1fb9f88cf4a9fedcc
BLAKE2b-256 404a0d29f441d16ac459c370a52e0f970ef5646fc5c9620c130c68732b1d46dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page