About this project
Vellum The Precision ODM for Asynchronous MongoDB & Pydantic. Vellum is a type-safe, async Python ODM for MongoDB built on Pydantic v2 and Motor. It provides a clean repository pattern, fluent aggregation builder, lifecycle hooks, optimistic concurrency, soft deletes, and transactions — all with full type hints. Installation Quick Start Features Feature Description --- --- Type-safe queries Expression classes for all MongoDB operators (Eq, Gt, In, Regex, ElemMatch, ...) Fluent aggregation AggregationPipeline with match, group, project, sort, unwind, lookup, etc. Lifecycle hooks beforeinsert, afterinsert, beforeupdate, ... on your model OCC OptimisticConcurrencyMixin — automatic version-based conflict detection Soft delete SoftDeleteMixin — automatic filtering, softdelete() / restore() Transactions async with repo.transaction() as session: FastAPI integration repositoryfactory for Depends injection Aggregation output models Pass a Pydantic model to project() / group() for validated results Documentation Learning Guide — explains bugs found and concepts introduced Roadmap — planned features and improvements Requirements Python >= 3.12
From the project README on
GitHub
Add this badge to your README
Show that your project is listed on Made in Algeria.
[](https://www.madeinalgeria.dev/projects/vellum)