Skip to main content

A tiny CPU-first, in-memory vector search library in C++ with Python bindings.

Project description

spheni

A tiny CPU-first, in-memory vector search library in C++ with Python bindings.

Install

pip install spheni

Quick Example

import numpy as np
import spheni

spec = spheni.IndexSpec(4, spheni.Metric.L2, spheni.IndexKind.Flat)
engine = spheni.Engine(spec)

base = np.random.rand(10, 4).astype(np.float32)
engine.add(base)

query = np.random.rand(4).astype(np.float32)
hits = engine.search(query, 3)

for h in hits:
    print(h.id, h.score)

Features

  • Indexes: Flat, IVF
  • Metrics: Cosine, L2
  • Storage: F32, INT8
  • Operations: add, search, search_batch, train, save, load

Build From Source

python -m pip wheel . --no-deps -w dist

Then install the wheel from dist/.

Links

Project details


Download files

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

Source Distribution

spheni-0.1.1.tar.gz (16.4 MB view details)

Uploaded Source

Built Distributions

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

spheni-0.1.1-cp312-cp312-win_amd64.whl (272.9 kB view details)

Uploaded CPython 3.12Windows x86-64

spheni-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

spheni-0.1.1-cp311-cp311-win_amd64.whl (271.7 kB view details)

Uploaded CPython 3.11Windows x86-64

spheni-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (309.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spheni-0.1.1-cp310-cp310-win_amd64.whl (270.6 kB view details)

Uploaded CPython 3.10Windows x86-64

spheni-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spheni-0.1.1-cp39-cp39-win_amd64.whl (276.9 kB view details)

Uploaded CPython 3.9Windows x86-64

spheni-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file spheni-0.1.1.tar.gz.

File metadata

  • Download URL: spheni-0.1.1.tar.gz
  • Upload date:
  • Size: 16.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spheni-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5cf097f9f0569161239ba39260a5ded4359fa9969df522808ece57a30fc11772
MD5 03c6f9edce14414053944869a6cacc5f
BLAKE2b-256 a80d9ec5c54b6b96e9ec500a4ac70efabc2f5d75d72d779ba26db5dbe7492317

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: spheni-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 272.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spheni-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0643857a26ee48abb92c3749cd6ad4c617215fd3be22ef797243f03d0b250a5
MD5 a8ef4bca5c9c91324e19df94e83c6247
BLAKE2b-256 cba50d02945e3244cd9ac53f2a8e95b0ce6a7fe518bbc3ca5ae5a667b5b85bd9

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spheni-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3443c788617858f649f142b302be69fb705258371123b436717dfd0244230d1
MD5 403aa5dd37860d34095d9f50442c0bdc
BLAKE2b-256 369cc17383a27662751a08432655f1ae806c7b266f096a8fdb8899083b322ba5

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: spheni-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 271.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spheni-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 45bbcc59ec1ce225f6601265c086174d42558d8a9f7fe0402eab7c732c280972
MD5 d0fc6a404cf206a66874a2f70fe06390
BLAKE2b-256 f18f6e8c2add732b45d386ce2ea6aa813db4df1e7ce717b702f5ef8ca730fafb

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spheni-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b75c1e44fefd40d506f6257671d7aee9fb90eebbdba12565b57dfc550d785780
MD5 ef3d923058aded21251584eb26b94c06
BLAKE2b-256 b02af2182df6af40bf51d6f004ed8f6971fed98673c7415a02ad3500f5fc07b0

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: spheni-0.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 270.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spheni-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e6513c02096224fcf83b3bc5cf570b174e8976a5f81c0c78365a3bbaeb26708c
MD5 372ba4442687522d550ee15f2d145c58
BLAKE2b-256 62d7a7ad588310921070714f82aaaa9f054ac9d9cb9db12aecaa48ab96cf8faf

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spheni-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27fca3ef59cb29219db442e27ed32e995ef669be7f5509af79021a6b5eb1f520
MD5 ab6e5a1b29a67d1f623eaa65461b2321
BLAKE2b-256 8825b670115cb3c36194c213ab930e5e2b1b83f6784dc70803dd3dbfa9265ff2

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: spheni-0.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 276.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spheni-0.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4ec2e0d4d8bdd32acb7e2fb32388fabbf2d5e0fa33f5bd037deb0f2dedbc3a66
MD5 dd28018515e710b30321feb5d7db6938
BLAKE2b-256 b411ed56d85c83b3b7ff08ce83e79a9be641583e6f4464b7283cce46420a3288

See more details on using hashes here.

File details

Details for the file spheni-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spheni-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7f48ae7b75275f70e933c80ec1381d078346e7896454e2def30e6a723b05ac5
MD5 a3b0f6e54053372e4de3fbc569d7fd76
BLAKE2b-256 506d41fed293504a1bb609e50e2ad38d1a3b84c812e80beaf18dc2b64bd90152

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