How thelovii/maxo works
maxo is an asynchronous Python framework and client library for building MAX bots. The main workflow is to receive platform updates through polling or a webhook, dispatch them through routers and filters to application handlers, and use the bot API client to send results. FSM and dialogs add stateful, multi-step interactions; generated API methods and types support the client. The graph includes documented capabilities whose implementations were not sampled; those links cite the README, and source-level evidence is limited to the supplied excerpts and SOURCE INDEX.
Main entry points: api_client.py API client · dispatcher.py Dispatcher · handlers Bot handlers · manager.py Dialog manager
Components 21
Bot runtime
- Bot client
src/maxo/bot/bot.py - API client
src/maxo/bot/api_client.py - Long polling
src/maxo/transport/long_polling.py - Webhook transport
src/maxo/transport/webhook
Update routing
- Dispatcher
src/maxo/routing/dispatcher.py - Routers and filters
src/maxo/routing/routers - Routing middleware
src/maxo/routing/middlewares - Bot handlers
src/maxo/routing/handlers
Stateful interactions
- FSM state
src/maxo/fsm/state.py - FSM storage
src/maxo/fsm/storages - Dialog manager
src/maxo/dialogs/manager/manager.py - Dialog widgets
src/maxo/dialogs/widgets - Dialog storage
src/maxo/dialogs/context/storage.py
MAX API platform
- API methods
src/maxo/bot/methods - API types
src/maxo/types - API errors
src/maxo/errors/api.py
API generation
- MAX API profile
butcher/profile.py - Generation overrides
butcher/overrides.py - Code emitter
butcher/emit.py
Other components
- Bot developer
- MAX platform
Connections 22
- Bot developer → Bot client: configures
README.md - Bot developer → Dispatcher: registers handlers
README.md - MAX platform → Long polling: sends updates
README.md - MAX platform → Webhook transport: sends updates
README.md - Long polling → Dispatcher: dispatches updates
README.md - Webhook transport → Dispatcher: dispatches updates
README.md - Dispatcher → Routers and filters: routes updates
README.md - Routers and filters → Bot handlers: invokes handlers
README.md - Bot handlers → Bot client: calls bot
README.md - Bot client → API client: uses client
src/maxo/bot/api_client.py - API client → API methods: uses methods
src/maxo/bot/api_client.py - API client → API types: uses types
src/maxo/bot/api_client.py - API client → API errors: raises errors
src/maxo/bot/api_client.py - API client → MAX platform: calls API
README.md - Dispatcher → Routing middleware: runs middleware
- Routing middleware → FSM state: provides state
- Bot handlers → Dialog manager: controls dialogs
README.md - Dialog manager → Dialog widgets: renders windows
README.md - Dialog manager → Dialog storage: loads and saves
src/maxo/dialogs/manager/manager.py - Dialog storage → FSM storage: uses storage interface
src/maxo/dialogs/context/storage.py - MAX API profile → Generation overrides: applies rules
butcher/profile.py - Code emitter → MAX API profile: renders profile
butcher/emit.py