A simple, local-first, and embedded database for modern data, built on SQLite.
Everything you need for modern AI and data applications.
Store documents with vector embeddings. Perform fast vector search, full-text search (FTS), and typo-tolerant fuzzy search.
Use persistent data structures that feel just like native Python: Dictionaries (`db.dict`), Lists (`db.list`), and Priority Queues (`db.queue`).
Create directed, labeled relationships between documents. Traverse your data with `.neighbors()` or multi-hop `.walk()` queries.
Use `db.channel` for high-efficiency, multi-process messaging. Publish events and subscribe to them in real-time from other processes.
Safely coordinate multiple processes. Use `db.lock()` to prevent race conditions or `with db.list(...)` for atomic batch operations.
Pass a `model=...` parameter to any data structure for automatic, recursive data validation and (de)serialization with Pydantic.
BeaverDB shines where simplicity and local performance matter most.
Designed for a great developer experience.
The default mode is a single SQLite file. It's fast, portable, and requires zero configuration.
The `.db` file is 100% compatible with any standard SQLite tool. No magic, no proprietary formats.
The core library is small. Advanced features like the REST server are optional extras, so you only install what you need.
Thread-safe and multi-process-safe by default, with robust inter-process locking for complex operations.
Run BeaverDB where you need it most.
The default mode. Your data lives in a single `.db` file in your project directory. Perfect for local apps, utilities, and prototypes.
Instantly expose your database over HTTP. Run `beaver serve` to start a FastAPI server for remote access from any client.
Pull the official Docker image for a stable, containerized deployment. Mount a volume to persist your data and run as a service.
Check out the Quickstart guide or browse the full documentation.
Have questions? We have answers.
`sqlite3` is a low-level driver. BeaverDB is a high-level, "Pythonic" API on top of it. It provides out-of-the-box solutions for modern data (vectors, graphs, full-text search, pub/sub), robust multi-process and thread-safe access (including `db.lock`), and a `pydantic` integration for type-safe (de)serialization.
BeaverDB is extremely fast for local, embedded use cases (zero network latency). It's designed for projects in the "small to medium" range (e.g., thousands to tens-of-thousands of documents). It is *not* designed to replace web-scale databases like PostgreSQL or distributed systems for handling millions of simultaneous users.
This keeps the core library minimal. The core `beaver-db` package has minimal dependencies (like `numpy` and `pydantic`). Features that require heavy libraries are "opt-in." For example, to run the REST API server (`beaver serve`), you must install `fastapi` by running `pip install "beaver-db[remote]"`.