klyro-db
Typed Python client for the Klyro in-memory database. It supports ordinary
Redis-compatible commands through redis-py and provides typed methods for all
15 current MEM.* commands.
from klyro_db import Klyro, MemoryCreate, MemoryAdd, MemoryQuery
db = Klyro()
db.memory.create("notes", MemoryCreate(mode="HYBRID", dim=384))
record_id = db.memory.add("notes", MemoryAdd(
text="User prefers PostgreSQL",
vector=[0.1] * 384,
metadata={"kind": "preference"},
))
hits = db.memory.query("notes", MemoryQuery(
text="database preference",
vector=[0.1] * 384,
top_k=5,
with_metadata=True,
with_scores=True,
))
db.close()
Klyro listens on 127.0.0.1:7171 by default. Run the server separately with
npx klyro-db, Docker, or the native binary. The package includes a
py.typed marker, so type checkers use its bundled annotations.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klyro_db-0.1.1.tar.gz.
File metadata
- Download URL: klyro_db-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05949fa7def7dbc60b7d0fe9b14c0309d579dfeeeae23c9f716d8827a8e69dd9
|
|
| MD5 |
16b06f832229a9097ddf3b378a2faf0b
|
|
| BLAKE2b-256 |
166683b716759f9a075869d241dc8232209472c6cfe5decc6354b1dbcf7814a9
|
File details
Details for the file klyro_db-0.1.1-py3-none-any.whl.
File metadata
- Download URL: klyro_db-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9302ffd20456ce2b328fe18277b83bdd0dfdfc2bea28d6aaf078df66bb76204d
|
|
| MD5 |
acc82a7ab78857b3d3fc867bc4261540
|
|
| BLAKE2b-256 |
bf546f87ce245b5b86fc05c0546b29f76d33136acc6ea348f901b3a9b4bce8f9
|