Base TelegramObject

MetaTelegramObject

class aiogram.types.base.MetaTelegramObject[source]

Bases: type

Metaclass for telegram objects

TelegramObject

class aiogram.types.base.TelegramObject(conf=None, **kwargs)[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)[source]

Deserialize object

Parameters

data

Returns

to_python() → Dict[source]

Get object as JSON serializable

Returns

clean()[source]

Remove empty values

as_json() → str[source]

Get object as JSON string

Returns

JSON

Return type

str

iter_keys()[source]

Iterate over keys

Returns

iter_values()[source]

Iterate over values

Returns