kurigram-addons
kurigram-addons
Documentation
v0.4.x
v0.5.0 (final)v0.4.xv0.3.x
HomeGetting Started
kurigram-addons
OverviewKurigramClientLifecycle Hooks
Keyboards
Inline KeyboardReply KeyboardPaginationLanguage SelectionBuilder APIFactory PresetsValidation & HooksUtilities
Routing & FSM
RouterStates & TransitionsFiltersConversation Handler
Middleware
OverviewWriting MiddlewareRate Limiting (middleware)FSM Injection
Storage
OverviewMemory StorageRedis StorageCustom Backends
Utilities
Menu SystemDependency InjectionCommand ParserRate LimitingAuto FloodWaitCircuit Breaker
ConfigurationError Handling
Migration from v0.3.x
API Reference
PyKeyboardPyrogram Patch
ChangelogView on GitHub
kurigram-addons
kurigram-addons

kurigram-addons

A production-grade toolkit for building Telegram bots with Kurigram/Pyrogram. All-in-one client, declarative keyboards, conversations, lifecycle hooks, FSM, middleware pipelines, and circuit breaker resilience.

Get StartedGitHub →
🤖

KurigramClient

Drop-in Client subclass with built-in middleware, FSM, routing, FloodWait handling, and lifecycle hooks — replaces the legacy patch() API.

⌨️

Keyboards

Type-safe, declarative UI keyboard framework. Inline and reply keyboards with automatic layout, pagination, language selection, and a fluent builder API.

💬

Conversations

Class-based multi-step conversations with declarative state definitions, auto-registered handlers, and type-safe context passing.

🔧

Routing & FSM

Hierarchical routers, finite state machines, tri-phase middleware, and circuit breaker resilience — all built into the client.

📦

Storage Backends

Pluggable FSM storage with MemoryStorage for development and RedisStorage with circuit breaker protection for production.

🛡️

Error Handling

Rich structured error hierarchy with TraceInfo, JSON serialization, error IDs for log correlation, and wrap decorators for automatic handling.

Quick Install

# Using pip
pip install kurigram-addons

# Using Poetry
poetry add kurigram-addons

Requirements

Python
≥ 3.10
Kurigram
≥ 2.1.35
Redis
≥ 6.0.0
Pydantic
≥ 2.11.7