Skip to content

Technology Stack

AreaValueEvidence
Public implementationPython package with a src/ layoutpyproject.toml, src/miniproto/__init__.py
Python runtimeCPython 3.13+; CI covers 3.13, 3.14 and GIL-disabled 3.14tpyproject.toml, .github/workflows/ci.yml
Native runtimeRust 2024 edition, minimum Rust 1.98, compiled as the miniproto_native cdylibrust/miniproto/Cargo.toml
Python build systemMaturin/PyO3 mixed Python-Rust packagepyproject.toml, rust/miniproto/Cargo.toml
Package managersuv for Python, Cargo for Rust, the current pnpm 11 release for the siteuv.lock, Cargo.lock, docs-site/package.json
Documentation frontendAstro 7.2.2 and Starlight 0.41.7, statically prerendered with Pagefind 1.5.2docs-site/package.json, docs-site/astro.config.ts
Documentation Node runtimeThe current Node.js 26 release with strict Astro TypeScript configurationdocs-site/.node-version, docs-site/tsconfig.json
Documentation containerNode.js 26.7.0 on Alpine 3.24 for the optional source build; unprivileged NGINX 1.31.3 on Alpine 3.24 for the static runtimedocs-site/Dockerfile, docs-site/nginx.conf

The Python API is the supported product surface. The Rust crate is packaged primarily as the private miniproto._native acceleration module; its 0.1.x public Rust API is not separately stability-promised. Nightly Rust is used only to generate rustdoc JSON and does not replace stable Rust for builds, tests, wheels or releases.

DependencyVersion policyRoleEvidence
cryptographyExactly 50.0.0, except Windows ARM64 until an upstream wheel is availableSupported crypto/session fallback and CFFI dependencypyproject.toml
uvloopExactly 0.22.1 on Linux/macOSOptional optimized asyncio loop selected lazilypyproject.toml, src/miniproto/event_loop.py
winloopExactly 0.6.3 on WindowsOptional optimized asyncio loop selected lazilypyproject.toml, src/miniproto/event_loop.py
PyO3~0.29.2 with experimental async supportPython extension bindings and free-threaded compatibilityrust/miniproto/Cargo.toml
RustCrypto AES/GCM/cipher/hash/Scrypt cratesExact or compatible versions in Cargo metadata and lockfileNative MTProto, hashing and protected-session operationsrust/miniproto/Cargo.toml, Cargo.lock
SQLitePython standard-library sqlite3Per-domain encrypted durable session storagesrc/miniproto/session/storage.py

There is no application web framework, ORM, remote database client, telemetry exporter or message-queue dependency in the runtime package. Telegram MTProto is the external service protocol; asyncio streams own network I/O.

ToolPurposeEvidence
Ruff 0.16.3Python formatting, imports, linting, security/style rulespyproject.toml, uv.lock
ty 0.0.72Python static type checking against Python 3.13 semanticspyproject.toml, uv.lock
pytest 9.1.1Unit, fake-server, integration, stress, workflow and documentation testspyproject.toml, tests/
Maturin 1.15.0Editable native builds, wheels and source distributionspyproject.toml, .github/workflows/build-wheels.yml
Griffe 2.2.0 + griffe2md 1.5.0Static Python API extraction and Markdown rendering without importing the packagepyproject.toml, tools/docs/generate_python.py
Nightly Rust + cargo-docs-mdRustdoc JSON extraction and Markdown fragments for committed Rust reference pagestools/docs/generate_rust.py
Astro/Starlight/Pagefind/Playwright/SharpStatic docs, search, browser acceptance and deterministic brand derivativesdocs-site/package.json, docs-site/playwright.config.ts
Oxfmt 0.63.0 + Oxlint 1.78.0Formatting for supported docs-site files and type-aware linting for maintained TypeScriptdocs-site/package.json, docs-site/oxfmt.config.ts, docs-site/oxlint.config.ts
Jiti 2.7.0 + @types/node 26.2.0Direct execution and Node.js typing for the docs-site TypeScript helper CLIsdocs-site/package.json, docs-site/scripts/
GitHub ActionsPython/Rust quality, benchmarks, schema freshness, docs, live opt-ins, attested dispatch-only release artifacts and protected OIDC publication.github/workflows/
uv sync --extra dev,docs --frozen
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest
pnpm --dir docs-site format:check
pnpm --dir docs-site lint
pnpm --dir docs-site check
cargo fmt --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-features
uv run miniproto-docs --check --build --skip-install
uv run miniproto-release-artifacts --help
uv run miniproto-release-check --offline --artifacts-dir .tmp/release-offline

Every executable Python tool is registered under [project.scripts] and must expose side-effect-free --help. Use the focused commands in the development guide when an aggregate stage fails.

  • Public client configuration is immutable ClientConfig/TransportConfig data. Credentials, session storage, timeouts, queue bounds, retry limits, datacenter selection and media budgets enter through those objects; see src/miniproto/config.py.
  • Durable default storage obtains its key from constructor material or MINIPROTO_SESSION_KEY. Live/integration/benchmark environment names are documented in .env.example; the real .env is ignored and must not be inspected, committed or copied into artifacts.
  • Normal operation is a Python process with network access to Telegram and filesystem access only when durable sessions or path downloads are selected. The documentation artifact is static and has no runtime Node/Python/Rust/search service dependency.
  • The checked-in documentation container serves the prepared root-base artifact as unprivileged UID 101 on port 6743. Its default target packages docs-site/dist/; the optional source-runtime target builds the same artifact with Node.js and pnpm inside Alpine before copying only the static files into NGINX. It is a documentation deployment image, not a container contract for the Python SDK or its wheel matrix.
  • No Kubernetes, Compose or other orchestration configuration is checked in. Wheel automation uses GitHub-hosted runners and official manylinux/musllinux build environments independently of the documentation image.
  • pyproject.toml
  • uv.lock
  • Cargo.toml
  • rust/miniproto/Cargo.toml
  • docs-site/package.json
  • docs-site/Dockerfile
  • docs-site/nginx.conf
  • .github/workflows/ci.yml
  • .github/workflows/build-wheels.yml
  • .github/workflows/publish-release.yml
  • .env.example