Skip to main content

recern-vector (Python)

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

Version 1.0.0. Stable public APIs with audited collection lifetimes, input validation and crash recovery. Incremental encoding, paged format 3 and automatic WAL checkpoints remain compatible with 0.5.0. 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 1.0.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

Client.remote(url, api_key=key, timeout=10.0, ca_file=None) has been available since 0.4.0 in 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 1.0.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 1.0.0
File Size Uploaded Provenance Actions
recern_vector-1.0.0.tar.gz 134.8 kB With provenance Details for recern_vector-1.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for recern-vector 1.0.0
File Actions
recern_vector-1.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for recern_vector-1.0.0-cp311-abi3-win_amd64.whl
recern_vector-1.0.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-1.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
recern_vector-1.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for recern_vector-1.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
recern_vector-1.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for recern_vector-1.0.0-cp311-abi3-macosx_11_0_arm64.whl
recern_vector-1.0.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for recern_vector-1.0.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 3.0 MB

Release files / recern_vector-1.0.0.tar.gz

Download URL recern_vector-1.0.0.tar.gz
Size 134.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c31db79e8613d95e1aef1c2b6aec1189647178737b3f7683beb34a33267a41
BLAKE2b-256 checksum
How to use checksums
39dbea13f38edabaca60df2df23aeab87cb2f05a3f5d9b101fe88bf6bde1243b
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 6, 2026.

Transparency log

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

Download URL recern_vector-1.0.0-cp311-abi3-win_amd64.whl
Size 502.7 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
29c41e44f6d22e8849b8863a2fe1a375f1641b04365ec5f7f26f44513becef24
BLAKE2b-256 checksum
How to use checksums
8a9e04d2a4c88df720e2173cb56491d4d475c142c3f803dc0932aa8a0b7ff1eb
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 6, 2026.

Transparency log

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

Download URL recern_vector-1.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 635.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
14a48cea2955117f89791ac6fbe024ab7744366d7fc2c4b89d70468092308ef9
BLAKE2b-256 checksum
How to use checksums
21eae691c55fecc074c863ea329defdb6437dc2fe7cba8bbd2fd58c43c655107
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 6, 2026.

Transparency log

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

Download URL recern_vector-1.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 601.5 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f13aef0867de79bc04a7f262ffae2943feefd1f625c0d8caff158c672ab82efa
BLAKE2b-256 checksum
How to use checksums
96a8d28b337b9ad36cfa502b4af96fe8b993fa9d9c3d96342792eaa276701e2a
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 6, 2026.

Transparency log

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

Download URL recern_vector-1.0.0-cp311-abi3-macosx_11_0_arm64.whl
Size 561.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
af740d9bb1320605af59398e0659462ed7f3f3629553ac8343589647724400a5
BLAKE2b-256 checksum
How to use checksums
fb2b2c44fabfab1e4e5af61d8bf320459d66596bb032dd0a2521ea6aac45ff43
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 6, 2026.

Transparency log

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

Download URL recern_vector-1.0.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 586.9 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
95ba756b9a3eea2d6ffa3ef87dcb9baf224adcbd15847636165fff0a40cfea55
BLAKE2b-256 checksum
How to use checksums
ef613b8c7386c35db9a5e6e26766859cf527f80ecc40eca919fcca1ada67d9c2
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 6, 2026.

Transparency log

Security for recern-vector 1.0.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-1.0.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 6, 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