Pyrogram Patch API Reference
Complete API reference for pyrogram_patch classes, methods, and types.
Core
| Symbol | Module | Description |
|---|---|---|
patch(client) | pyrogram_patch | Patch a Pyrogram Client, returns PatchManager |
PatchManager | pyrogram_patch | Configure storage, routers, middleware |
Router | pyrogram_patch.router | Hierarchical handler router |
PatchHelper | pyrogram_patch.patch_helper | Per-update FSM state/data helper |
FSM
| Symbol | Description |
|---|---|
State | Single FSM state descriptor |
StatesGroup | Base class for state groups |
StateFilter | Filter for a specific state |
AnyStateFilter | Filter for any active state |
NoStateFilter | Filter for no state |
MemoryStorage | In-memory storage backend |
RedisStorage | Redis storage with circuit breaker |
BaseStorage | Abstract base for custom backends |
Errors
| Error | Description |
|---|---|
PatchError | Base error class |
StorageError | Storage operation failure |
CircuitBreakerOpenError | Circuit breaker is open |
InvalidStateTransition | Transition guard violation |
MiddlewareError | Middleware execution failure |