# 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 as `Union[DefaultValue, type]`.

  alias of `Union`[`DefaultValue[DVType]`, `telegram.utils.types.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 as `bytes`.

  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 as `Optional[Union[DefaultValue, type]]`.

  alias of `Optional`[`Union`[`DefaultValue[DVType]`, `telegram.utils.types.DVType`]]

telegram.utils.types.SLT

  Single instance or list/tuple of instances.

  alias of `Union`[`telegram.utils.types.RT`, `List`[`telegram.utils.types.RT`], `Tuple`[`telegram.utils.types.RT`, …]]