xyberos-redis
Redis plugin — RFC-0019, M4. RedisVectorStore + RedisMemory + cache
backing for CacheResponder, all lazy-importing redis. Covers the
[state] extra scope (cache + state + vector).
Install
pip install -e ./redis
pip install redis # or: pip install xyberos[state]
Usage
from xyberos import create_app
from xyberos_redis import RedisPlugin
app = create_app()
app.load_plugin(RedisPlugin(url="redis://localhost:6379")) # or set REDIS_URL
vector = app.resolve("redis_vector") # a VectorStore
memory = app.resolve("redis_memory") # a Memory
cache = app.resolve("redis_cache") # exact-match string cache
RedisPlugin(replace_defaults=True) also swaps the app's vector_store /
memory providers.
CacheResponder backing
RedisVectorStore is a full VectorStore, so it plugs straight into the core
CacheResponder for near-exact prompt -> answer caching:
from xyberos.llm import HashEmbedder
from xyberos.router import CacheResponder
from xyberos_redis import RedisVectorStore
responder = CacheResponder(store=RedisVectorStore(url="redis://localhost:6379"),
embedder=HashEmbedder())
responder.teach("what is xyberos?", "a cognitive platform")
Design
RedisVectorStore— one Redis hash per namespace; vectors JSON-encoded; queries scored with exact cosine (the same scan-and-score approach as the stdlibSqliteVectorStore, so behavior — and parity — holds without needing a RediSearch vector module).RedisMemory— one entry perstore()appended to a Redis list;retrieve()returnsMemoryEntrys oldest-first, mirroringSqliteMemory.RedisStringCache— tiny exact-matchget/set/deletewith optional TTL.redisis imported lazily; a clearProviderErroris raised when missing.
Tests
pip install pytest fakeredis
pytest tests/
Tests run against fakeredis (an in-memory redis-py client), so they need no
Redis server; they skip cleanly when redis/fakeredis are absent. The vector
parity tests run the exact scenarios the SqliteVectorStore reference passes.
Ship location
[state] extra (redis already added to pyproject.toml).
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 xyberos_redis-0.1.0.tar.gz.
File metadata
- Download URL: xyberos_redis-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c86853fb6aa41f6064831e793fa8add124fc65a9e287e1f99228f9ae0c770c20
|
|
| MD5 |
498881810f7b3d2621455f5157518076
|
|
| BLAKE2b-256 |
ed9a165448ca7f1ce2739ae8e0a9d77d9007da6b46d4981ea25847d80faf5d3b
|
Provenance
The following attestation bundles were made for xyberos_redis-0.1.0.tar.gz:
Publisher:
pypi-plugins.yml on xyberos/xyberos-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_redis-0.1.0.tar.gz -
Subject digest:
c86853fb6aa41f6064831e793fa8add124fc65a9e287e1f99228f9ae0c770c20 - Sigstore transparency entry: 2495340576
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@cd98ad6193005275396bb763df8de0468830de4a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@cd98ad6193005275396bb763df8de0468830de4a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file xyberos_redis-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xyberos_redis-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c2953c3fb5d5de1f205afed84ef2962c3b0a29014a3f980a38bcc73d67941a
|
|
| MD5 |
520d0bd205634e6a529b2108364204a3
|
|
| BLAKE2b-256 |
a6321aa82c9ea2fc8069a7acb180ba7ce2e6dc77adae23dfa32064bc0e5d4aa9
|
Provenance
The following attestation bundles were made for xyberos_redis-0.1.0-py3-none-any.whl:
Publisher:
pypi-plugins.yml on xyberos/xyberos-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_redis-0.1.0-py3-none-any.whl -
Subject digest:
32c2953c3fb5d5de1f205afed84ef2962c3b0a29014a3f980a38bcc73d67941a - Sigstore transparency entry: 2495340650
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@cd98ad6193005275396bb763df8de0468830de4a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@cd98ad6193005275396bb763df8de0468830de4a -
Trigger Event:
workflow_dispatch
-
Statement type: