
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.
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