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.1

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.1.tar.gz (211.1 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.1-cp39-abi3-win_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9+Windows ARM64

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

Uploaded CPython 3.9+Windows x86-64

modelvault-0.15.1-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.1-cp39-abi3-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

modelvault-0.15.1-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.1-cp39-abi3-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

modelvault-0.15.1-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.1.tar.gz.

File metadata

  • Download URL: modelvault-0.15.1.tar.gz
  • Upload date:
  • Size: 211.1 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.1.tar.gz
Algorithm Hash digest
SHA256 8c6f5ba108df357a1b1057693303822e10098c3ae1578a54ec347de8e73b35f9
MD5 8c417ea37f2e9f7c3656b87b47dd12e5
BLAKE2b-256 1ed8d564ca5cc4de5ac6fe7f405b258f8152cf0286037e38d4569a883c2f20c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: modelvault-0.15.1-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.1-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 66d7e6b28892bb54c56c204abb4f25784ad64933acfdfb1349f2fb2bce9c857b
MD5 f2adfddf2e7ddae9e761f00b49db523d
BLAKE2b-256 fbb02daa44c7114a5d9f6394c736dc9845562e76e73068ea8a48d69e7d47e831

See more details on using hashes here.

File details

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

File metadata

  • Download URL: modelvault-0.15.1-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.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3d24bc40deee6b72e6f26d19cdaacf3b33aa68810443c0ac59ce4e58b27d7d86
MD5 253407e6d25fd43a726cfa0b9d03c7d6
BLAKE2b-256 2e85f0fceb9277713cc84ca73ccde055108bdf23ce86a661d0b37c42677af739

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9268bb935148ed62d64af7d4342707ecad06becbcc59cc64c520f55ca4ea16c9
MD5 7116e4de4d62ee18b2996f996c9cf9e8
BLAKE2b-256 b67516a7761ac42f1aed27c361d6883cd841ff58b5540e43c85bc6175a28db93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2977fd05ae3110002d470b7f795b7be7b47b887d9a056b6f71558ff91fea4d71
MD5 6390278c60a718cdeefb56a31c756536
BLAKE2b-256 0ab9f851fad372a2ef68ef64188a5d9ff5722d4b0948d1e4eb1e93ce0ab2911b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e57adee2a10e5256d5b85db49219c34ce18b31895cbfb10059ed1c0263fda044
MD5 4de4ba309cd54089b34cf7c14f9af560
BLAKE2b-256 debab5370996fb7250bc3fb7cc5748e8cef66d4357e0ac972906db9b3d1053db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32cae5c1dd1c78bc0feb257857d63ec7324117bb253164b9eaeeab6d131fb66f
MD5 d59724aef7675ec52fed7728f742b560
BLAKE2b-256 95f87708ed5c34c431cf7fee18756c3c051e4a3c0b1cc37649672b7942a09959

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89b58a0e83825fd55505e16fb313de81204a79df9ef4d6d37927c9c3ba6aae7a
MD5 85ac5bb05e93986a40ef83e2ef02b9f0
BLAKE2b-256 463a779f58db36268cfa833668b0f55fa844a8338b93136edfd303d904397cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modelvault-0.15.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6686a8dbae09d51338e48e1f1326be0b6f86c6aed1601c7bd643f285d5fba158
MD5 12e363d837277331f975de8f88e03c24
BLAKE2b-256 81df60274c8fae0a14ed02c0651c25d8f7c5dbb8b750a4f2c72ffdd1221259c9

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