Base TelegramObject

MetaTelegramObject

class aiogram.types.base.MetaTelegramObject(name: str, bases: Tuple[Type], namespace: Dict[str, Any], **kwargs: Any)[source]

Bases: type

Metaclass for telegram objects

TelegramObject

class aiogram.types.base.TelegramObject(conf: Optional[Dict[str, Any]] = None, **kwargs: Any)[source]

Bases: aiogram.utils.mixins.ContextInstanceMixin

Abstract class for telegram objects

Deserialize object

Parameters
  • conf

  • kwargs

property props

Get props

Returns

dict with props

property props_aliases

Get aliases for props

Returns

property values

Get values

Returns

classmethod to_object(data: Dict[str, Any]) → T[source]

Deserialize object

Parameters

data

Returns

to_python() → Dict[str, Any][source]

Get object as JSON serializable

Returns

clean() → None[source]

Remove empty values

as_json() → str[source]

Get object as JSON string

Returns

JSON

Return type

str

iter_keys() → Generator[Any, None, None][source]

Iterate over keys

Returns

iter_values() → Generator[Any, None, None][source]

Iterate over values

Returns