telethon.tl package

telethon.tl.gzip_packed module

class telethon.tl.gzip_packed.GzipPacked(data)

Bases: telethon.tl.tlobject.TLObject

CONSTRUCTOR_ID = 812830625
static gzip_if_smaller(request)

Calls bytes(request), and based on a certain threshold, optionally gzips the resulting data. If the gzipped data is smaller than the original byte array, this is returned instead.

Note that this only applies to content related requests.

static read(reader)

telethon.tl.message_container module

class telethon.tl.message_container.MessageContainer(messages)

Bases: telethon.tl.tlobject.TLObject

CONSTRUCTOR_ID = 1945237724
static iter_read(reader)
stringify()
to_dict(recursive=True)

telethon.tl.tl_message module

class telethon.tl.tl_message.TLMessage(session, request)

Bases: telethon.tl.tlobject.TLObject

https://core.telegram.org/mtproto/service_messages#simple-container

stringify()
to_dict(recursive=True)

telethon.tl.tlobject module

class telethon.tl.tlobject.TLObject

Bases: object

static from_reader(reader)
on_response(reader)
static pretty_format(obj, indent=None)

Pretty formats the given object as a string which is returned. If indent is None, a single line will be returned.

resolve(client, utils)
static serialize_bytes(data)

Write bytes by using Telegram guidelines

static serialize_datetime(dt)
stringify()
to_dict()