telegram.utils.types Module¶
This module contains custom typing aliases.
-
telegram.utils.types.
DVInput
¶ Generic type for bot method parameters which can have defaults.
DVInput[type]
is the same asUnion[DefaultValue, type]
.alias of Union[DefaultValue[DVType], DVType]
-
telegram.utils.types.
FileInput
¶ Valid input for passing files to Telegram. Either a file id as string, a file like object, a local file path as string,
pathlib.Path
or the file contents asbytes
.alias of Union[str, bytes, IO, InputFile, pathlib.Path]
-
telegram.utils.types.
FileLike
¶ Either an open file handler or a
telegram.InputFile
.alias of Union[IO, InputFile]
-
telegram.utils.types.
JSONDict
¶ Dictionary containing response from Telegram or data to send to the API.
alias of Dict[str, Any]
-
telegram.utils.types.
ODVInput
¶ Generic type for bot method parameters which can have defaults.
ODVInput[type]
is the same asOptional[Union[DefaultValue, type]]
.alias of Optional[Union[DefaultValue[DVType], DVType]]
-
telegram.utils.types.
SLT
¶ Single instance or list/tuple of instances.
alias of Union[RT, List[RT], Tuple[RT, …]]