Architecture¶
tdata ──opentele──┐
telethon .session─┤
telethon string───┼──► StringSession (memory) ──► seshforge.Client (Telethon)
pyrogram file─────┤
pyrogram string───┘
│
├── export → telethon / pyrogram / tdata
└── open_pyrogram → pyrogram.Client (MemoryStorage)
Layers¶
- convert — Telethon auth parts, string/file, format detection
- pyro_session — Pyrogram pack/unpack +
open_pyrogram - desktop / api — opentele
TDesktop,API, login flags - client — Telethon subclass; session I/O only (no Pyrogram method merge)
- CLI — convert + connect + optional exports
Why not keep .session open?¶
SQLite session files serialize writers. Multi-process bots collide (database is locked). A string is immutable auth material.
Trust boundary¶
UseCurrentSession reuses Desktop auth keys on the machine you control. Treat exported strings like passwords.