Developer Releases etchdb: A Lightweight Pydantic Wrapper for asyncpg
A software developer has published etchdb, a new open-source library available on PyPI in alpha version 0.5. The tool serves as a minimal integration layer between the asyncpg PostgreSQL driver and Pydantic models, addressing a common pain point in Python development. The author created the library after repeatedly writing similar boilerplate code across multiple projects to bridge raw SQL query results with typed Pydantic objects. Unlike heavy Object-Relational Mappers (ORMs) such as SQLAlchemy, Tortoise, or SQLModel, etchdb avoids complex session lifecycles and opinionated structures. It allows developers to retain the speed and directness of raw SQL while providing convenient helpers for transactions, inserts, and partial updates. The library features two primary user-facing types, DB and Row, enabling seamless data mapping without sacrificing control over database interactions. This release offers an alternative for developers who find existing ORMs too cumbersome or incompatible with specific Postgres extensions like pgvector, yet desire more structure than using raw asyncpg alone.
Wire timeline
Developer Releases etchdb: A Lightweight Pydantic Wrapper for asyncpg
A software developer has published etchdb, a new open-source library available on PyPI in alpha version 0.5. The tool serves as a minimal integration layer between the asyncpg PostgreSQL driver and Pydantic models, addressing a common pain point in Python development. The author created the library after repeatedly writing similar boilerplate code across multiple projects to bridge raw SQL query results with typed Pydantic objects. Unlike heavy Object-Relational Mappers (ORMs) such as SQLAlchemy, Tortoise, or SQLModel, etchdb avoids complex session lifecycles and opinionated structures. It allows developers to retain the speed and directness of raw SQL while providing convenient helpers for transactions, inserts, and partial updates. The library features two primary user-facing types, DB and Row, enabling seamless data mapping without sacrificing control over database interactions. This release offers an alternative for developers who find existing ORMs too cumbersome or incompatible with specific Postgres extensions like pgvector, yet desire more structure than using raw asyncpg alone.
DEV Community