How kazaryanarmen/teleasync works
TeleAsync is an asynchronous Python client library for the Telegram Bot API. Its documented workflow is that an application creates a TelegramBot and EventRouter, registers event handlers, then starts polling; handlers can process messages and call bot methods to send replies. Internally, BaseBot provides HTTP requests and polling support, while EventRouter dispatches updates to handlers. The object package supplies API request and response types across messaging, chats, inline queries, payments, business features, and other Telegram domains. Some polling-to-router wiring is not visible in the excerpts, so that relationship is marked unverified.
Main entry points: bot.py TelegramBot · base_bot.py HTTP and Polling · router.py EventRouter · update.py Update Envelope
Components 15
Application Entry
- TelegramBot
teleasync/bot.py
Update Dispatch
- EventRouter
teleasync/router.py - Message Handlers
teleasync/router.py
Bot API Client
- HTTP and Polling
teleasync/base_bot.py - API Errors
teleasync/exceptions.py
Telegram Data Models
- Update Envelope
teleasync/objects/update.py - Message Data
teleasync/objects/message.py - User Data
teleasync/objects/user.py - Chat and Member Types
teleasync/objects - Message and Media Types
teleasync/objects - Inline Query Types
teleasync/objects - Business and Payment Types
teleasync/objects - Input File
teleasync/objects/input_file.py
Other components
- Bot Application
- Telegram Bot API
Connections 18
- Bot Application → TelegramBot: creates and calls
- Bot Application → EventRouter: registers handlers
- TelegramBot → HTTP and Polling: inherits
teleasync/bot.py - TelegramBot → HTTP and Polling: starts polling
teleasync/bot.py - HTTP and Polling → Telegram Bot API: sends HTTP requests
teleasync/base_bot.py - Telegram Bot API → HTTP and Polling: returns API data
teleasync/base_bot.py - HTTP and Polling → API Errors: raises
teleasync/base_bot.py - HTTP and Polling → Input File: prepares uploads
teleasync/base_bot.py - HTTP and Polling → EventRouter: feeds polled updates
- EventRouter → Update Envelope: parses updates
teleasync/router.py - EventRouter → Message Handlers: dispatches events
teleasync/router.py - Message Handlers → TelegramBot: calls bot methods
- TelegramBot → Message and Media Types: serializes request data
teleasync/bot.py - TelegramBot → Chat and Member Types: uses API types
teleasync/bot.py - TelegramBot → Business and Payment Types: uses API types
teleasync/bot.py - TelegramBot → Inline Query Types: uses API types
teleasync/bot.py - Update Envelope → Message Data: contains message data
- Message Data → User Data: references sender