Python bindings for the Valise single-file AI/retrieval archive format.
Project description
valise
Retrieval in one file. Text search, vector search, and your documents
packed into a single portable .vls file — no server, no sidecar index
directory, no external vector database.
pip install valise
import numpy as np
from valise import Store, Schema, Record, Search, Vector
store = Store.open("kb.vls") # open-or-create
store.collection("notes", Schema()
.text("body") # English BM25 by default
.vector("dense", Vector(dim=768))) # cosine, auto-calibrated codec
with store.writer() as w:
w.put("notes", "doc-1",
Record().text("body", "portable retrieval capsules")
.vector("dense", embedding)) # float32 ndarray
w.commit() # the durability point
hits = store.search("notes", Search()
.text("body", "retrieval capsule")
.vector("dense", query)
.top_k(10))
print(hits.keys) # ['doc-1']
print(hits.scores) # float32 ndarray
The schema lives in the file. A later run, another process, or another
machine calls Store.open("kb.vls") and searches immediately — nothing to
re-declare, nothing to migrate.
Note that leaving the with block releases the writer lock; it does not
commit. commit() is explicit, and it is the only durability point.
Why
Valise is for corpora that need to move: between agents, devices, eval runs, customer environments, air-gapped deployments. What you ship is a complete, queryable artifact rather than a service to stand up.
It is not a hosted vector database or a distributed search cluster, and it does not generate embeddings — bring your own model. For live, multi-tenant, continuously-updated corpora, reach for Qdrant, LanceDB, Milvus, or an SQLite extension instead.
What you get
- Hybrid search. Lexical and vector channels fused at query time, with reciprocal-rank fusion as the default. Text scorers include BM25, TF-IDF cosine, count cosine, approximate cosine variants, and Dice / overlap / containment.
- Compact vectors. QAM Lloyd-Max and UPQ polar codecs at ~5.5 bits per dimension, with NEON and AVX2 kernels. There is no persisted HNSW graph or IVF index — nothing to rebuild, and nothing on disk but the capsule.
- Crash safety. Commits are footer-rooted and atomic: after a crash a reader sees the previous committed state or the new one, never a mixture. Segment payloads carry BLAKE3 checksums.
- Time partitions, tombstones with explicit compaction, and recency as either a ranking signal or a hard filter.
- A typed surface. Full type hints, checked under
mypy --strict, with strict enums rather than magic strings. Vectors cross the FFI boundary zero-copy.
Batch ingest
put_many takes a C-contiguous float32 [N, dim] array and ingests the
whole batch in one native call, rather than a per-row Python loop:
vectors = np.ascontiguousarray(model.encode(bodies), dtype=np.float32)
with store.writer() as w:
w.put_many("notes", keys, vectors, texts=bodies)
w.commit()
Reading everything back
Your data is never locked in. keys() plus get() walks a whole
collection:
r = store.reader()
for key in r.keys("notes"):
print(r.get("notes", key).text)
The valise command-line tool (cargo install valise) does the same from a
shell, including valise export kb.vls > kb.jsonl.
Requirements
Python 3.9 or newer, and NumPy. Wheels are published for Linux and macOS on x86-64 and aarch64.
Windows is not supported yet — the commit protocol relies on positional file IO and fcntl advisory locks, and the Windows equivalents are not implemented.
Status
Pre-1.0 and under active development. Below 1.0, minor versions may break both the API and the on-disk format.
Links
- Documentation — quickstart, concepts, full API reference
- Source — the Rust engine, the on-disk format specification, and the benchmark methodology
- Rust crate
Licensed under MPL-2.0.
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file valise-0.1.1.tar.gz.
File metadata
- Download URL: valise-0.1.1.tar.gz
- Upload date:
- Size: 553.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a2703b84c313558f11b2488fed722c89f692303c126fa112d441105153083a
|
|
| MD5 |
b8218e98f12ded191a0a2c011916c867
|
|
| BLAKE2b-256 |
0b7b31dff77936d006624722a0629e95f1ac598d59776b92134342bb8db4e633
|
Provenance
The following attestation bundles were made for valise-0.1.1.tar.gz:
Publisher:
wheels.yml on white07S/valise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valise-0.1.1.tar.gz -
Subject digest:
38a2703b84c313558f11b2488fed722c89f692303c126fa112d441105153083a - Sigstore transparency entry: 2258855774
- Sigstore integration time:
-
Permalink:
white07S/valise@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/white07S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Trigger Event:
push
-
Statement type:
File details
Details for the file valise-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: valise-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a065b9e0ca105ebe511f294c9032848ccb55fd4c7f0e6c064dfae36766b4a1
|
|
| MD5 |
e258d98c8ab884eaf1260a8aaf123e56
|
|
| BLAKE2b-256 |
f71bcac214b0b97b47d7b14ed687c71a501c587e73f5f681620d764c160b47f9
|
Provenance
The following attestation bundles were made for valise-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
wheels.yml on white07S/valise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valise-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
34a065b9e0ca105ebe511f294c9032848ccb55fd4c7f0e6c064dfae36766b4a1 - Sigstore transparency entry: 2258856141
- Sigstore integration time:
-
Permalink:
white07S/valise@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/white07S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Trigger Event:
push
-
Statement type:
File details
Details for the file valise-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: valise-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4498b20f22866b934a7a7c255b721b89fd1cffbd50cdc6d3c54f3a2bf528690
|
|
| MD5 |
3dccc9f47ef4218adf52a53eee159ddf
|
|
| BLAKE2b-256 |
09e89aa21a67f6b101cac6b6b3376d097f6d23eef518bb25ec43e59c8ee5883b
|
Provenance
The following attestation bundles were made for valise-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
wheels.yml on white07S/valise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valise-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
a4498b20f22866b934a7a7c255b721b89fd1cffbd50cdc6d3c54f3a2bf528690 - Sigstore transparency entry: 2258855884
- Sigstore integration time:
-
Permalink:
white07S/valise@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/white07S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Trigger Event:
push
-
Statement type:
File details
Details for the file valise-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: valise-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
679286052133c0f164b48765ca0c03b0cef743f73b470975611b749bacff094b
|
|
| MD5 |
b7691a530b2adb67e7c158f300e14963
|
|
| BLAKE2b-256 |
7c32790751f17faafb4c9e7f5a9edc22a0c0cf92a8c5670db555d25d645dfb2a
|
Provenance
The following attestation bundles were made for valise-0.1.1-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on white07S/valise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valise-0.1.1-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
679286052133c0f164b48765ca0c03b0cef743f73b470975611b749bacff094b - Sigstore transparency entry: 2258856288
- Sigstore integration time:
-
Permalink:
white07S/valise@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/white07S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Trigger Event:
push
-
Statement type:
File details
Details for the file valise-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: valise-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7f50d9d26d980f7805fc6f7278a29fce06b9f38bf7df13886b0e4019d300bd
|
|
| MD5 |
3feed744c04173f96418d535cfed7040
|
|
| BLAKE2b-256 |
111a681c5f65089adc9db5eb56f4f7d173c8a788261cc52d13178dfde5df8d5c
|
Provenance
The following attestation bundles were made for valise-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
wheels.yml on white07S/valise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valise-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
3d7f50d9d26d980f7805fc6f7278a29fce06b9f38bf7df13886b0e4019d300bd - Sigstore transparency entry: 2258856019
- Sigstore integration time:
-
Permalink:
white07S/valise@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/white07S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@78f54525c196c6edf788a73a64f211fc1b5b9baa -
Trigger Event:
push
-
Statement type: