telegram package¶
Submodules¶
telegram.client module¶
telegram.tdjson module¶
telegram.utils module¶
-
class
telegram.utils.
AsyncResult
(client: Telegram, result_id: Optional[str] = None)¶ Bases:
object
tdlib is asynchronous, and this class helps you get results back. After each API call, you receive AsyncResult object, which you can use to get results back.
-
parse_update
(update: Dict[Any, Any]) → bool¶
-
wait
(timeout: Optional[int] = None, raise_exc: bool = False) → None¶ Blocking method to wait for the result
-
telegram.worker module¶
-
class
telegram.worker.
BaseWorker
(queue: queue.Queue)¶ Bases:
object
Base worker class. Each worker must implement the run method to start listening to the queue and calling handler functions
-
run
() → None¶
-
stop
() → None¶
-
-
class
telegram.worker.
SimpleWorker
(queue: queue.Queue)¶ Bases:
telegram.worker.BaseWorker
Simple one-thread worker
-
run
() → None¶
-
stop
() → None¶
-