botodesu package¶
Submodules¶
botodesu.body module¶
Request Body Generation.
-
class
botodesu.body.BotoFairu(filename: str, content: bytes) → None¶ Bases:
objectHelper class for file uploading.
The content type will be guessd by mimetypes depending on the file name. The default content transfer encoding is binary.
These options can be overriden by using the methods below.
-
set_content_transfer_encoding(new_cte: str) → None¶ Override the default content transfer encoding.
-
set_content_type(content_type: str) → None¶ Override the content type guessd by mimetypes.
-
botodesu.dikuto module¶
-
class
botodesu.dikuto.BotoDikuto¶ Bases:
typing.DictDictionary with Attribute access.
Note
from is a keyword in Python, you can use _from to access them.
botodesu.exceptions module¶
botodesu.methods module¶
Auto expanding API methods.
-
botodesu.methods.get_url_name(attr_name: str) → str¶
Module contents¶
-
class
botodesu.Boto(token: str, *, base_url: str='https://api.telegram.org/bot{token}/{method}', loop: typing.Union=None) → None¶ Bases:
objectBo-to Desu!
This is an automatically expand class.
This class will expand its methods automatically.
After using, the caller of this class should await its _close method or wrap it under an async with statement to perform automatic clean up when leaving the context.
The long pulling method of getting updates is support through async for.
See the example in the documentation.
-
class
botodesu.BotoDikuto¶ Bases:
typing.DictDictionary with Attribute access.
Note
from is a keyword in Python, you can use _from to access them.
-
exception
botodesu.BotoEra(*args: typing.Any, status_code: typing.Union=None, content: typing.Union=None, **kwargs: typing.Any) → None¶ Bases:
ExceptionEra(Error) occurred inside the Botodesu. This gives you the ability to retrieve the response information from the server if available.
-
class
botodesu.BotoFairu(filename: str, content: bytes) → None¶ Bases:
objectHelper class for file uploading.
The content type will be guessd by mimetypes depending on the file name. The default content transfer encoding is binary.
These options can be overriden by using the methods below.
-
set_content_transfer_encoding(new_cte: str) → None¶ Override the default content transfer encoding.
-
set_content_type(content_type: str) → None¶ Override the content type guessd by mimetypes.
-