HyperDB
A hyper-fast local vector database for use with LLM Agents.
Want to invest? Now accepting SAFEs ($135M cap minimum.)
Join the HyperDBiscord
Advantages
- Simple interface compatible with all large language model agents.
- Highly optimized C++ backend vector store with HW accelerated operations via MKL BLAS.
- Enables users to index documents with advanced features such as ids and metadata.
Installation
Install the package from PyPI:
pip install hyperdb-python
Usage
Here's an example of using HyperDB to store and query documents with information about all 151 original pokemon in an instant:
import json
from hyperdb import HyperDB
# Load documents from the JSONL file
documents = []
with open("demo/pokemon.jsonl", "r") as f:
for line in f:
documents.append(json.loads(line))
# Instantiate HyperDB with the list of documents
db = HyperDB(documents, key="info.description")
# Save the HyperDB instance to a file
db.save("demo/pokemon_hyperdb.pickle.gz")
# Load the HyperDB instance from the save file
db.load("demo/pokemon_hyperdb.pickle.gz")
# Query the HyperDB instance with a text input
results = db.query("Likes to sleep.", top_k=5)
Returns
Name: Snorlax
Pokedex ID: 143
HP: 160
Type: normal
Weakness: fighting
Description: Very lazy. Just eats and sleeps. As its rotund bulk builds, it becomes steadily more slothful.
Name: Drowzee
Pokedex ID: 96
HP: 230
Type: psychic
Weakness: dark
Description: Puts enemies to sleep then eats their dreams. Occasionally gets sick from eating bad dreams.
Name: Pinsir
Pokedex ID: 127
HP: 160
Type: bug
Weakness: fire
Description: When the temperature drops at night, it sleeps on treetops or among roots where it is well hidden.
Name: Abra
Pokedex ID: 63
HP: 160
Type: psychic
Weakness: dark
Description: Sleeps 18 hours a day. If it senses danger, it will teleport itself to safety even as it sleeps.
Name: Venonat
Pokedex ID: 48
HP: 160
Type: bug
Weakness: fire
Description: Lives in the shadows of tall trees where it eats insects. It is attracted by light at night.
*Benchmark Credit: Benim Kıçım
Metadata
Release files for hyperdb-python 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hyperdb-python-0.1.4.tar.gz | 5.8 kB | Without provenance | Details for hyperdb-python-0.1.4.tar.gz |
Release files / hyperdb-python-0.1.4.tar.gz
| Download URL | hyperdb-python-0.1.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faf94b14f1b56579c0c8939812d0a0222cc21930bf1ea971933e5bff1d241f14
|
|
BLAKE2b-256 checksum How to use checksums |
e612545be990a8bceca4d78d04543762b6320c58dbfd5a36f4a847549d078e4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for hyperdb-python 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.