How much code and how many transitive packages does each ORM pull into a clean PostgreSQL application environment?
Note
Honest accounting:pgdorm bundles its entire compiled Rust PostgreSQL wire protocol, TLS (rustls), SQL compiler, Arrow C Stream bridge, and migration engine inside one wheel (0.00 MiB external PG driver), and declares a single runtime dependency (pydantic, kept lazy-loaded at import time via PEP 810). Every peer ORM is measured with its full PostgreSQL driver and active transitive closure from uv.lock — no optional extras beyond what PostgreSQL execution requires (sqlalchemy[asyncio], psycopg[binary]).
Smallest overall install:Tortoise ORM + asyncpg stays tiny (1.19 MiB wheel / 4.37 MiB unpacked) because both Tortoise and asyncpg avoid pydantic and libpq.
Single-wheel Rust core vs pydantic:pgdorm's own stripped wheel (2.58 MiB) includes the entire PostgreSQL binary wire client and compiler (0.00 MiB external driver), while the remaining 2.56 MiB (5 packages) comes from pydantic + pydantic-core for zero-friction FastAPI / TypeAdapter integration.
Unpacked parity with SQLAlchemy 2: On disk, pgdorm (13.10 MiB, 6 packages) sits within 0.04 MiB of SQLAlchemy 2 + asyncpg (13.06 MiB, 4 packages), and is substantially smaller than SQLModel (19.82 MiB), SQLDataclass (27.20 MiB), and Django ORM (33.40 MiB).
Method: Compressed wheel sizes come from uv.lock (matching active platform tags and PEP 508 markers) plus a freshly built stripped release wheel (maturin build --release --strip) for pgdorm; unpacked sizes sum installed package files excluding __pycache__/.pyc.
Environment: Darwin 25.6.0 (arm64) · Python 3.15.2 · wheel tag cp315-cp315-macosx_26_0_arm64