Skip to main content

A simple vector database allows difference search methods (consine similarity and euclidean distance ect.)

Project description

VDBpy

A simple vector database allows difference search methods (consine similarity and euclidean distance ect.)

Usage

View example.py for details

from VDBpy.indexing import VectorIndex
from VDBpy.query import VectorQuery

# Create a new vector index
index = VectorIndex()

# Add some vectors to the index
index.add_vector([1, 2, 3], 'vector1')
index.add_vector([4, 5, 6], 'vector2')

# Create a new vector query
query = VectorQuery(index)

# Execute the query
results = query.execute([2, 2, 2], k=2)
'''
# Execute the query using cosine similarity
results = query.execute([2,2,2], k=2, metric='cosine')
# Execute the query using Manhattan distance
results = query.execute([2,2,2], k=2, metric='manhattan')
# Execute the query using Jaccard similarity
results = query.execute([2,2,2], k=2, metric='jaccard')
'''

# Print the results
for id, similarity in results:
  print(f"ID: {id}, Similarity: {similarity}")

Installation

pip install VDBpy

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

VDBpy-0.1.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

VDBpy-0.1.4-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file VDBpy-0.1.4.tar.gz.

File metadata

  • Download URL: VDBpy-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for VDBpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cf8f2440e839ebdd4a96419288e09e166f7783d94f7cbda090aaed466c35663f
MD5 5f660276a3296248fcabe79621369f31
BLAKE2b-256 4b791326135ac143e5410ca3fb79111e6e7677cfd52d4cc2febd82eff85cd0e0

See more details on using hashes here.

File details

Details for the file VDBpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: VDBpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for VDBpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 96135696274cdb976b81f8837c89db8331b94c8e63a7e8078318286faccecca2
MD5 d1c04e0a69034ff79bfa91d2e25a79b0
BLAKE2b-256 571251556c3cab58050645f6f6ad8d3c7b1d352b38e1a93c20fde200b30c5063

See more details on using hashes here.

Supported by

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