Skip to main content

veclite

Embedded, single-file, in-process vector database — Python binding (SPEC-009).

pip install veclite installs a prebuilt abi3 wheel (CPython 3.9+); no Rust toolchain is needed. NumPy is optional but recommended for zero-copy vectors.

pip install veclite          # core
pip install "veclite[numpy]" # + numpy extra

Quickstart

import veclite

db = veclite.Database.memory()            # or Database.open("data.veclite")
docs = db.create_collection("docs", dimension=3, metric="euclidean")
docs.upsert("a", [1.0, 0.0, 0.0], {"lang": "en"})
docs.upsert("b", [0.0, 1.0, 0.0])

hits = docs.search([0.9, 0.1, 0.0], limit=5)   # -> [{id, score, payload, vector?}]
page = docs.scroll(limit=100)                  # -> {points, next_cursor}

NumPy float32 arrays are borrowed without a Python-side copy on search and upsert_batch (PY-020); the GIL is released around every core call so searches from multiple threads run in parallel (PY-030).

Custom embedders

Register any Python object with embed(text) and a dimension property; auto- embed collections then route text through it. embed_batch, fit, export_state, and import_state are used when present. Exceptions raised in the callback surface as a VecLiteError with the original exception chained (__cause__).

import numpy as np

class MyEmbedder:
    @property
    def dimension(self): return 384
    def embed(self, text: str) -> np.ndarray:
        ...  # return a float32 vector of length `dimension`

db.register_embedder("mine", MyEmbedder())
col = db.create_collection("t", dimension=384, embedding_provider="mine")
col.upsert_text("d1", "hello world")
hits = col.search_text("hello", limit=5)

A Python embedder is not persisted — only its serialized state. After reopening a database that uses one, re-register it under the same name before use.

Async (veclite.aio)

The optional veclite.aio facade mirrors the sync surface with async methods that run the blocking core on the asyncio thread pool. Because the core is GIL-free, awaits overlap. It imports lazily, so synchronous use pays nothing.

import asyncio, veclite

async def main():
    db = veclite.aio.memory()
    docs = await db.create_collection("docs", dimension=3)
    await docs.upsert("a", [1.0, 0.0, 0.0])
    hits = await docs.search([1.0, 0.0, 0.0], limit=5)

asyncio.run(main())

Errors

Every veclite.VecLiteError subclass (CollectionNotFound, DimensionMismatch, Locked, InvalidArgument, IoError, …) carries the identical message as the Rust core (PY-040). Catch the base veclite.VecLiteError to handle any of them.

License

Apache-2.0.

Metadata

Release files for hivellm-veclite 0.1.1

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

Source distribution (sdist)

Source distribution for hivellm-veclite 0.1.1
File Size Uploaded Provenance Actions
hivellm_veclite-0.1.1.tar.gz 2.4 MB Without provenance Details for hivellm_veclite-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for hivellm-veclite 0.1.1
File Interpreter ABI Platform Actions
hivellm_veclite-0.1.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for hivellm_veclite-0.1.1-cp39-abi3-win_amd64.whl
hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Total release size: 9.5 MB

Release files / hivellm_veclite-0.1.1.tar.gz

Download URL hivellm_veclite-0.1.1.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
aadc710cfe72b1ba22390817f69e35680256170dd681fc456248d99737520432
BLAKE2b-256 checksum
How to use checksums
07a3d7ad5846496ffeacf46235bc07c1051ff651691f342bd2dc8c981ad5a270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / hivellm_veclite-0.1.1-cp39-abi3-win_amd64.whl

Download URL hivellm_veclite-0.1.1-cp39-abi3-win_amd64.whl
Size 2.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b5dd514b60c62f10d0876420caee4b6d1182d32053d7b1b69f3f93621dba23eb
BLAKE2b-256 checksum
How to use checksums
c16f8610556e3f98475795127d796ef1905defe2bdfe9d4444d228783ba0b59a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
73133389cf89cb64d0d9ca30b366a6eb232ab9df07b807553025626c79815f20
BLAKE2b-256 checksum
How to use checksums
9750e36c807fe78cbb64f1cdaf58334695dc19faa43765afc82ad2c065939925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hivellm_veclite-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.5 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ccf60886a4cc31caac4e1e8eec39dc053cfa68a214a10ccd995683daf368ca68
BLAKE2b-256 checksum
How to use checksums
a15db5058c55ced2b0269f4cd80425918f794a455ae89cbe8ff1e0e7636074dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for hivellm-veclite 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

4 release files No provenance

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