Skip to main content

brinicle is a C++ vector index engine (ANN library) optimized for disk-first, low-RAM similarity search.

Project description

brinicle

brinicle is a C++ vector index engine (ANN library) optimized for disk-first, low-RAM similarity search. It provides fast build + query, supports inserts/upserts/deletes, and targets predictable latency at high recall with minimal memory overhead on constrained environments.

Install

You can either download via pip:

pip install brinicle

Or compile the code:

git clone https://github.com/bicardinal/brinicle.git
cd brinicle
bash build.sh

Usage

import numpy as np
import brinicle

D = 2
n = 5
X = np.random.randn(n, D).astype(np.float32)
Q = np.random.randn(D).astype(np.float32)

engine = brinicle.VectorEngine("test_index", dim=D, delta_ratio=0.1)

engine.init(mode="build")
for eid in range(n):
    engine.ingest(str(eid), X[eid])
engine.finalize()

print(engine.search(Q, k=10)) # returns a list of ids

To insert:

Y = np.random.randn(5, D).astype(np.float32)
engine.init(mode="insert")
for eid in range(5):
    engine.ingest(str(eid) + "x", Y[eid])
engine.finalize()
print(engine.search(Q, k=10))

To upsert:

Y = np.random.randn(5, D).astype(np.float32)
engine.init(mode="upsert")
for eid in range(5):
    engine.ingest(str(eid), Y[eid])
engine.finalize()
print(engine.search(Q, k=10))

To delete:

engine.delete_items(["1", "4"])
print(engine.search(Q, k=10))

To re-build:

engine.optimize()
print(engine.search(Q, k=10))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

brinicle-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (367.8 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

brinicle-0.0.3-cp314-cp314-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (364.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

brinicle-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (364.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

brinicle-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (364.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

brinicle-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (361.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

brinicle-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

brinicle-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (359.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file brinicle-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 19555d887dc3df5fb265e50f9f185964221438d8442583ed48cf764a0925d6a5
MD5 22b61dba0f27e7f46289d94ce96eace5
BLAKE2b-256 1abcd9564ae4bbeb957d37d7c4d179fbfdb3b9d9f3b710ce1a96b99cf787cde6

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f2a43faea83a544669869de78e2eaf0081f5c055606554c2956cd0eed007d22
MD5 a0ff2a923cdc44eb09bdc943047db8b8
BLAKE2b-256 b85939c1299e34ee18bc0b3ed729f4b2c9b26802f5c28132079cd9d3e11d8494

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4f5dd7f6bb098ad3661f8acd7f16efa52654cf10e887f65af0c8cfa5045c465f
MD5 53a7e6c6374ea56386d2863304b26060
BLAKE2b-256 1436e21f8912b44a33d481ffe7c88ccc5d736ac94f57850d5927a375752ec6a9

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98c8715c405ab7ac50ef783762077a531ffcbbdc568176abc128a040d8925474
MD5 11849646f25816de046e13d064d53059
BLAKE2b-256 ef94b3322c3b936592710c6c03ff86af31e4c45b65933eb2669ca796a3b65523

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 073f9875dde6f9444dec5c6e0cb225e35294e7c77eef45fb2550f091214b00fd
MD5 810a93344be412b26be6519a498d8dfe
BLAKE2b-256 cb3edcfe057853abeff1daa76296a3a617c95ae628be073a5f55c6966f965f1e

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 57b6f0bc1e4387e00ffe96ce1fa120bfe6afc37479139680a922377e2384208b
MD5 48012a5a17387f09bb5ee281cf58d37b
BLAKE2b-256 cd793f5175cff932e1b14e16aa13d983c8fc8adc2c2945385aaafbfdd6fa15cc

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1cde670126c1654e2f2ee2fba967ecac114e4334eacfb9c162f20c83c237f39d
MD5 a524cf044fd5a213ec8436b224957863
BLAKE2b-256 1d73352644694de06b1cb9420aed2a0d0f888271f192c3be51dd8d268b353347

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9459343fd33a48a590704818bd69cd3b146c38c48f7720865491f718a9a5d98a
MD5 a88d30951ff8465a38d44e0bf659432e
BLAKE2b-256 31697e4dbeaeb282dfc41b9cd81402d5e8bba84d1f593792c15276b425862e56

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5ed86c3bc69c95f0c96c263f7c2d43d7097a4bce8f5d2ecd8d326168823b574d
MD5 15e9c812ca30032df20bb974e26aecc7
BLAKE2b-256 11604dec36f9ef267cbebdade93691587efa505abc47cea9a7430bdf3f1f7f4d

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c673bd200619ab2bc3e0e829f919b72cb7b8575ea4454ff8762667d22e17e232
MD5 7d367eabf995a5cd3d871ce26e046ac6
BLAKE2b-256 0692ce0fa997749496d4e64cf1fac0211a8c0a6e037851e0bb9a9b18dd2487c6

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ead6065542a3d221f289eee56102c05956dd7dac764326ec241abfe051ad96de
MD5 103c10407331b4346183f0d000972ed3
BLAKE2b-256 09ee5323ced40e4cc16b8cf8e5e749c0e8383afd0b9faf5755376e7386d44d40

See more details on using hashes here.

File details

Details for the file brinicle-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for brinicle-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 394e1fcfbab1859cfe4929b79efc6b03cc8ae8ccf69da7d93f7f5a5822052b52
MD5 2acf7e98f93b4b4f6c98ec4d61363458
BLAKE2b-256 c8bcc09ef1b444fc5d5c8f925fc7c9cf4947e85ac721e432e444794dfdfba101

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page