Skip to main content

Store Pydantic and dataclass models in a typed embedded database — validation, indexes, migrations, single-file deployment.

Project description

ModelVault

CI PyPI Docs

Store Pydantic models directly

Schema-first typed storage for application models. Official CPython bindings for ModelVault (PyO3).

Store dataclasses and Pydantic v2 models with validation, indexes, migrations, and single-file deployment — no low-level schema JSON required for the recommended path.

Asyncio: AsyncDatabase runs engine work on a thread pool and supports concurrent reads on one handle (await asyncio.gather(...) for many get / query calls). Writes and transactions remain exclusive. See Async policy.

Read the docs: modelvault.readthedocs.io

Why ModelVault Positioning and tradeoffs
Pydantic guide Model-first schemas
FastAPI guide Async API services with AsyncDatabase
Async policy AsyncDatabase, concurrent reads
Quickstart First insert in minutes
Why ModelVault Positioning and design goals

Install

CPython 3.9+ · stable ABI wheels (cp39-abi3)

pip install "modelvault>=0.15.0,<0.16"

Quick start (Pydantic)

from pydantic import BaseModel
import modelvault

class Book(BaseModel):
    __modelvault_primary_key__ = "title"
    title: str
    year: int

db = modelvault.Database.open_in_memory()
books = modelvault.models.collection(db, Book)
books.insert(Book(title="ModelVault", year=2020))
print(books.get("ModelVault"))
print(modelvault.__version__)

Output:

title='ModelVault' year=2020
0.15.2

Dataclass example and indexed queries: Quickstart · Python guide

FastAPI: open with await AsyncDatabase.open(...), use modelvault.models.async_collection, and async def route handlers — FastAPI guide · runnable examples/fastapi_app.

Build from source

Requires Rust, Python 3.9+, and maturin.

cd python/modelvault && maturin develop --release && pytest -q

Contributor layout: python/README.md · full pipeline: make check-full from repo root

License

MIT — LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modelvault-0.15.2.tar.gz (212.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

modelvault-0.15.2-cp39-abi3-win_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9+Windows ARM64

modelvault-0.15.2-cp39-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

modelvault-0.15.2-cp39-abi3-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

modelvault-0.15.2-cp39-abi3-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

modelvault-0.15.2-cp39-abi3-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

modelvault-0.15.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

modelvault-0.15.2-cp39-abi3-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

modelvault-0.15.2-cp39-abi3-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file modelvault-0.15.2.tar.gz.

File metadata

  • Download URL: modelvault-0.15.2.tar.gz
  • Upload date:
  • Size: 212.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for modelvault-0.15.2.tar.gz
Algorithm Hash digest
SHA256 49560c5bb69575b860262c553326fb65ff8b002c566e1a4f0b884d8e9baa1315
MD5 085e933434a008eb9c8c33e429f34f2d
BLAKE2b-256 4296a7b56e3552a40de8c67c52d2124581d55421efe2e17cdfce2741de3650ac

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-win_arm64.whl.

File metadata

  • Download URL: modelvault-0.15.2-cp39-abi3-win_arm64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.9+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 1bfa2d5b6e6978079a7a1104e31727e1f9fadf2b26e271862ef46fc9c347e0c5
MD5 b0e978e714d86ffa428f173597a183f9
BLAKE2b-256 7d206a74838cfa5baf216d2da9c4fb22d515a02c51efac16f86fdbc642171dd0

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: modelvault-0.15.2-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.13

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a234025d546fba1108722e3f34b86fa3b643fa479f9b6dac2274d5130fd8d0b4
MD5 d5dc2800519f94a7eb0712d875ad17f1
BLAKE2b-256 16ed8bdb35ffc867b114cfa58386b3bbd32b8fcfd63c0019bf0f429ccef531f8

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a28ae81adff5004f84ced6aa71603041d2a9368e754eb62a40e236cc686617ca
MD5 21861812b68a439525befe77f92213de
BLAKE2b-256 eecfff134cd917c2c556d0d92f8ff715f540c18b45abb4d44bf4c6c56d6b5dfb

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e01b7dc474d21315c62690d09c2ad14d7dfdb5e43bbde8237fd34c38c4041a0a
MD5 7eb82206c1a8343d5c6e9b7d2be51d8e
BLAKE2b-256 c7704d161873dce23a9e6b2716fec5d203c1fa7faeec59b17875e186e00dec1f

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 84679be441a4395d8c572762be8bbff5b4f22d43869b83047c5194edf4fc3c62
MD5 1a0b4ab944c266c95c984f857869cde2
BLAKE2b-256 92c6886bfb94c29734423a1db8d430e94ca9d6017fc12ce8a75cb2f976ff2b08

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6eb8d8f31f040eb6c65b38338934fd0003605ec7c8f836e1cb76e69bd98ed2d
MD5 64092e47f1d188c9eac1382c9dd7bfb2
BLAKE2b-256 19c36cfd27a60a2488d0b0b1230501d91c021fbef6ab7ed7d4d92513e17d01b1

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8997513466b9a8b52c2ba35ac50506d9abdca436b300b5e014917669396bdfca
MD5 674fc9bcc817d542f4202a7e59fb23f9
BLAKE2b-256 17e34bf4a91572bfa8edf1b077e914c9fe5ac952a6307cef54625bcb08e5f85f

See more details on using hashes here.

File details

Details for the file modelvault-0.15.2-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for modelvault-0.15.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5d24e3f9fe8de7bad5e1ff24930d93045d0cfedcc676e43d577d34069f394a1a
MD5 b1d835e5e3c25c2808d748a2b9e66373
BLAKE2b-256 5264cf4f60699baf757e42b1c5897bd4bcd4be2885d4c87f266a704f2ea8c7d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page