How pylakey/pylogram works
Project type and purpose
• Pylogram is primarily a Python SDK/library offering an asynchronous MTProto API client for Telegram (users and bots).
• It embeds a “compiler” subproject that, at build time, consumes TL schema files (source templates, API definitions, error codes) and generates Python modules (raw objects, methods, types, errors, docs).
File structure
• Top-level directories:
• compiler/ – code‐generation engine (reads .tl and .tsv sources, applies templates, emits Python and docs)
• pylogram/ – runtime library (modules for connection, crypto, session, parsing, dispatching, methods, types, storage, handlers, utilities)
• tests/ – unit tests for filters, parser, file IDs, etc.
• Config and build scripts: hatch.toml, hatch_build.py, dev-requirements.txt, CI workflow .github/workflows/build_and_publish.yml.
README for additional insights
• Confirms async design, high-performance crypto (TgCrypto), type hints, event‐driven handlers, support for both user accounts and bot tokens.
Detail without overcomplication
• Interfaces/interactions, not internal method details.
• Build-time vs. runtime are visually separated (e.g., top vs. bottom or left vs. right).