Skip to main content

Disk-backed HNSW vector database with SQLite metadata

Project description

NoPokeDB

Disk-based HNSW vector DB with SQLite metadata

Installation

pip install nopokedb

Usage

import numpy as np
from nopokedb import NoPokeDB

# Initialize (or load existing) store
db = NoPokeDB(dim=128, max_elements=10000, path="./vdb_data")

# Prepare dummy vectors (128-dim)
my_vector = np.random.rand(128).astype(np.float32)
query_vector = np.random.rand(128).astype(np.float32)

# Add to the database
db.add(my_vector, metadata={"name": "foo"})

# Query for nearest neighbors
results = db.query(query_vector, k=5)
for hit in results:
  print(hit)

# Persist & close
db.close()

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

nopokedb-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

nopokedb-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file nopokedb-0.1.2.tar.gz.

File metadata

  • Download URL: nopokedb-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for nopokedb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 183521b62f0fc94b512d4c6cdb490e07d340412c7137e8936b22d7308dbec232
MD5 dff0bf58cdc0827c5dfde334781209fe
BLAKE2b-256 7b349e24a53596e380363356332e531de0d2da77fff4540ef1b706104cd4dad5

See more details on using hashes here.

File details

Details for the file nopokedb-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nopokedb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for nopokedb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6f2890d17175c638aa42a13914c0e8813733874e851fe5eccaf26b534171c5d
MD5 699b441d33f3bb88f795dcf8642e5046
BLAKE2b-256 5a7ed9d0e3a49c56b977cf9c03c2d1d62a04db7e7788d514aa78446476388446

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