Vellum

Python MongoDB Pydantic

Vellum

Overview

A type-safe async MongoDB ODM for Python built as a precision alternative to Beanie. Designed around Pydantic v2 and Python async/await for FastAPI-native usage with full type inference throughout the query layer.


Key Features

  • Q-Object Queries — Django-inspired query composition with full type safety
  • Optimistic Concurrency Control — Version-based conflict detection for concurrent writes
  • Lifecycle Hooks — Before/after hooks for insert, update, and delete operations
  • Soft Deletes — First-class support for logical deletion without data loss
  • Pydantic v2 Native — Built on Pydantic v2 models with full type inference
  • AsyncIO First — Designed for async/await from the ground up; FastAPI-native

Tech Stack

  • Language: Python
  • Database: MongoDB
  • Validation: Pydantic v2
  • Runtime: AsyncIO