Skip to main content

recern-vector (Python)

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

Version 0.4.0. Adds the remote backend for Recern HTTP, snapshot leases and verified migration across embedded Recern, Recern HTTP and Qdrant. Stable format 2 and format-1 readers are retained.

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.

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.4.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.4.0
File Size Uploaded Provenance Actions
recern_vector-0.4.0.tar.gz 107.8 kB With provenance Details for recern_vector-0.4.0.tar.gz

Built distributions (wheels)

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

Total release size: 2.5 MB

Release files / recern_vector-0.4.0.tar.gz

Download URL recern_vector-0.4.0.tar.gz
Size 107.8 kB
Tags Source
SHA-256 checksum
How to use checksums
80305815d85fe92a29130f427adf9032872f4336c4525353bf1ef6bc18aab34e
BLAKE2b-256 checksum
How to use checksums
ed30ada77e54ff7d02135af28f294f55280504a8e733cebb67a489d0663f67c0
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 Oct 29, 2026.

Transparency log

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

Download URL recern_vector-0.4.0-cp311-abi3-win_amd64.whl
Size 401.7 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6cc63deb5a6fe53e95624872c411dc8226564b49b5dc16f8cf274e92f274006e
BLAKE2b-256 checksum
How to use checksums
b07821a71aafe5d0fc0ee35c9e294dae2ec29b77cdb1545d0ad0d9c629281eb2
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 Oct 29, 2026.

Transparency log

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

Download URL recern_vector-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 534.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5f714688cd60bc3372463e1a1f168eecb7840b07dd8ed00da4fa8d0b90e92d6a
BLAKE2b-256 checksum
How to use checksums
a5eac4378bd927baada63066aec35e8db418b7c19a08b99fc8fb2b14ad3bb089
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 Oct 29, 2026.

Transparency log

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

Download URL recern_vector-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 515.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4a302fc3cc2988173eea60bfc38be23227195841abb02a5127faf9da38e70d1d
BLAKE2b-256 checksum
How to use checksums
732556c781d7688008096d8cbb69ced0bf322eca5bffe15fb634f91ad488cfdb
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 Oct 29, 2026.

Transparency log

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

Download URL recern_vector-0.4.0-cp311-abi3-macosx_11_0_arm64.whl
Size 474.3 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a0a35c04deb5993b9037d79e36046050d2e6cbe91a2b4d7a012fc5f60b62b9a5
BLAKE2b-256 checksum
How to use checksums
1615be4c7014c28e9553d4a74561ebb31c3623b27f10a96d65adedce114e231a
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 Oct 29, 2026.

Transparency log

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

Download URL recern_vector-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 490.3 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bb20bb04b6e6daecbb37c0b3649c3bfce6a152d871987757d59f9e946d3d9f30
BLAKE2b-256 checksum
How to use checksums
cbd8e26fed51fa3a2def2f2096c003d12a0cfde5cbe68e26a1881cded8501329
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 Oct 29, 2026.

Transparency log

Security for recern-vector 0.4.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.4.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 Oct 29, 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