Skip to main content

recern-vector (Python)

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

Version 0.3.0. Adds a portable Python client and verified migration to Qdrant. Stable format 2 remains compatible with format-1 databases.

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.

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.3.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.3.0
File Size Uploaded
recern_vector-0.3.0.tar.gz 90.6 kB Details

Built distributions (wheels)

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

Total release size: 2.5 MB

Release files / recern_vector-0.3.0.tar.gz

Download URL recern_vector-0.3.0.tar.gz
Size 90.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bc962b088d1a2766051eaedc90e2c36fc76b7618d7577303c40d3bab3e953da4
BLAKE2b-256 checksum
How to use checksums
0b7acfb44ef1a32a1ef58da3b3ed00fd5186c07284ee5b2bbb52503bb682a98a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 11, 2026.

Transparency log

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

Download URL recern_vector-0.3.0-cp311-abi3-win_amd64.whl
Size 392.0 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0d74d3c560edb6e3cdedc014231f5cdfbf34061006933300ebf107048287a257
BLAKE2b-256 checksum
How to use checksums
32da7df9fd203603dcefee90e36b52c7cf124c68e952e03ae5f65b59d1e7cb71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 11, 2026.

Transparency log

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

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

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 11, 2026.

Transparency log

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

Download URL recern_vector-0.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 508.0 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f589315610e262ca7e13b4926cddf639899ba91dc1efcfadb96f5c24a4ef02a0
BLAKE2b-256 checksum
How to use checksums
3d0c238b1a1329e8873ff799a1a7a491345b78acaad530bb7fb6500a8c149a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 11, 2026.

Transparency log

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

Download URL recern_vector-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
Size 465.6 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
70a58a060445833651c3442b4d88494a430ebfe8d598e72106fcf73bda7f4f40
BLAKE2b-256 checksum
How to use checksums
c40b01188dbc12d75cf91c4cdf925fd912627d1f0d6d84d74b2151a8e73b2e1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 11, 2026.

Transparency log

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

Download URL recern_vector-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 481.9 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b8d4e55b6f47be95600b1986cb4bf67041a7cb64c0468e49d33c6348426c0c32
BLAKE2b-256 checksum
How to use checksums
411c3f50067e9b4a2e02c516acd979398acb1c96174fb7a7c85e2c425aa5343a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

6 release files

0.2.0

6 release files

0.0.2

6 release files

0.0.1

6 release files

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