Skip to main content

recern-vector (Python)

Python bindings for Recern Vector, a single-file, embedded, inspectable vector database.

Version 0.5.0. Incremental encoding, paged format 3, automatic WAL checkpoints and explicit storage upgrades. Readers retain formats 1/2; HTTP/profile/export contracts remain v1. Workspace 1.0.0 cannot open format 3.

pip install recern-vector

Wheels cover CPython 3.11+ on Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows (x86_64).

import numpy as np
import recern_vector as rv

with rv.Database.open_or_create("docs.rvec") as db:          # saves on clean exit
    chunks = db.create_collection("chunks", dim=384, metric="cosine")
    chunks.upsert_many(ids, np.asarray(embeddings, dtype=np.float32), metadatas)

    hits = chunks.search(query, k=5, filter={"lang": "en", "year": {"$gte": 2020}})
    report = chunks.explain(query, k=5)          # strategy, visited nodes, elapsed_ms
    recall = chunks.estimate_recall(ef_values=[16, 64, 256])
    print(chunks.stats())

float32 NumPy arrays are read through the buffer protocol without per-element conversion; plain lists and other dtypes also work. upsert_many builds index links on all cores (threads= to change it) and is atomic: if any vector is invalid, nothing is written.

Benchmarks against faiss, LanceDB and sqlite-vec: recern.net/vector/benchmarks.

Persistence in 0.5.0

Automatic checkpoints, set_checkpoint_policy, checkpoint_policy and persistence_stats, paged format 3, format_version and explicit upgrade_storage are described in the persistence guide. Existing format-2 files remain at format 2 until an explicit upgrade with a backup.

Remote backend (0.4.0)

Client.remote(url, api_key=key, timeout=10.0, ca_file=None) is available in 0.4.0 wheels and the source distribution. It uses verified TLS, bounded deadlines and generation-bound handles, and supports the same Python snapshot export/resumable import workflow against the Recern HTTP server. Use context managers to release snapshot leases. See portable clients for all three language APIs.

Portable client (0.3.0)

from recern_vector.portable import Client, Record

client = Client.embedded("prototype.rvec")
# client = Client.qdrant("https://vectors.example.com", api_key=key)
docs = client.create_collection("docs", dim=3)
docs.upsert_many([Record("document:1", [1, 0, 0], {"lang": "en"})])
print(docs.search([1, 0, 0], filter={"lang": "en"}))

Portable embedded writes save before returning; the native Database API retains explicit saves. export_snapshot, inspect_export and import_snapshot support consistent embedded exports, dry-run, interrupted import recovery and record verification on embedded/Qdrant destinations. Qdrant 1.19.2 is tested; remote batches are not declared atomic, and remote snapshot export is unsupported. See the portable contract and migration guide.

Development

uv venv && uv pip install maturin pytest numpy
source .venv/bin/activate
maturin develop --release
pytest

0.2.0 adds int8 (create_collection(..., quantization="int8")), logical $or/$not filters, durable WAL commits, checkpoint() and Database.open_read_only(). Checkpoint before copying a standalone .rvec file. Original f32 vectors are not retained for int8 collections.

Metadata

Release files for recern-vector 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recern-vector 0.5.0
File Size Uploaded Provenance Actions
recern_vector-0.5.0.tar.gz 128.0 kB With provenance Details for recern_vector-0.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for recern-vector 0.5.0
File Actions
recern_vector-0.5.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for recern_vector-0.5.0-cp311-abi3-win_amd64.whl
recern_vector-0.5.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for recern_vector-0.5.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
recern_vector-0.5.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for recern_vector-0.5.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
recern_vector-0.5.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for recern_vector-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
recern_vector-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for recern_vector-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 2.9 MB

Release files / recern_vector-0.5.0.tar.gz

Download URL recern_vector-0.5.0.tar.gz
Size 128.0 kB
Tags Source
SHA-256 checksum
How to use checksums
58d30ca75050541b73979a9c189c2139b235381d4feebb374c81afd41778ca38
BLAKE2b-256 checksum
How to use checksums
a70422e9523a686fdbb96046e5058aff1c05f6b6e32f22dd6c59ffb811fb16e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / recern_vector-0.5.0-cp311-abi3-win_amd64.whl

Download URL recern_vector-0.5.0-cp311-abi3-win_amd64.whl
Size 483.0 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
649a0c34aae5de46f57770bc4307a80cf7869c3e0c8322908a95b0f86ed0720b
BLAKE2b-256 checksum
How to use checksums
8a47f7204bcb010dfcbf5be0dfc3ba72ed1b5ba2722375d294e0fc61bfbcb813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / recern_vector-0.5.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL recern_vector-0.5.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 615.1 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
23c70a864283b2a4b9e95654f3c58b49d12c78a3e1ed1a792df4260cbdeeb754
BLAKE2b-256 checksum
How to use checksums
b167c4ce6823d751bcd2193cab3d905421d302c5edbc2f75f8ba7a71709ad3f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / recern_vector-0.5.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL recern_vector-0.5.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 585.1 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e5d6a91cf838264cb0eff9121ad7d039f9f6ce424fbf96d42e8b998ac474f3b2
BLAKE2b-256 checksum
How to use checksums
6266211df3408d194cacc91cb9d513f0c755bf1c43234944a3f0588cc0605d44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / recern_vector-0.5.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL recern_vector-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Size 543.6 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ac61295f219ab20afad1e3f5d24781da37360a8089cbd7fe95afb59ac999339e
BLAKE2b-256 checksum
How to use checksums
6c115357a6a6f70966dcc5a29d9c9a7a975e0e2e8f42f780bce668c4f63ff40f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / recern_vector-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL recern_vector-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 569.0 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
cf58c478d36c5e24aab21915d68d918cc6844989922e51b2cba9936b8f9af030
BLAKE2b-256 checksum
How to use checksums
2385f11c243cd178a3707fb6ca72634d1846ba80575a78252fc642d5b5dafecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for recern-vector 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for recern_vector-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page