Skip to main content

Vector_DB Python Integration

Overview

rs_vector_db is a Rust-based project designed for efficient vector storage and similarity search. This README provides guidance on integrating Vector_DB with Python. The integration allows you to run the Vector_DB server and perform vector addition and similarity searches using Python scripts.

THIS REQUIRES AN OPENAPI KEY

export OPENAI_API_KEY="your-key-here";

Installation

pip install rs_vector_db

Example Usage

from rs_vector_db import run_server, vector_search, add_vector
import time

URL = "http://127.0.0.1:3000"

# Start Vector_DB server on its own thread
run_server("127.0.0.1:3000", "./metal_gear_db.json")

# Wait for the server to initialize - this might not be necessary
time.sleep(1)

# Add a vector to the DB
results = add_vector(URL, "Why are we still here to suffer", "https://www.youtube.com/watch?v=N_vJMHMBzLM")
print(results)

results = vector_search(URL, "I can still feel the pain in my leg and in my arm", 0.2, 9000)

print(results)

Contributing

If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

Notes for myself

maturin publish
__token__
key

License

This project is licensed under the MIT License.

Release files for rs-vector-db 0.1.4

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

Source distribution (sdist)

Source distribution for rs-vector-db 0.1.4
File Size Uploaded
rs_vector_db-0.1.4.tar.gz 16.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rs-vector-db 0.1.4
File Interpreter ABI Platform
rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details

Total release size: 3.9 MB

Release files / rs_vector_db-0.1.4.tar.gz

Download URL rs_vector_db-0.1.4.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
12e6dc68bb64e93d6ffc2552d0837198efb438d6ee4bf8491cb1dec0319ea041
BLAKE2b-256 checksum
How to use checksums
695a80d58e26413dba05a9a01919262c6495efc8b3900c6ce207a9cb609d2dbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.17

Release files / rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl
Size 3.9 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
718bf8af41bc017dc76b58e92a7d86546e3ca74dfec0f351cdf38f80a83c63be
BLAKE2b-256 checksum
How to use checksums
004d93d0896edabeda64acdef8162ea31f66409a5c16dee5aefa36ddcd248897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.17

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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