kevy — Python client
First-party Python client for kevy, the pure-Rust, Redis-compatible
engine. One package ships both faces (contract §1.4): a blocking
Client and an asyncio AsyncClient — the same shape as redis-py's
redis + redis.asyncio.
pip install kevy
import kevy
# Remote — native RESP2/3 over TCP. Standard library only.
r = kevy.connect("kevy://127.0.0.1:6379")
r.set("k", "v")
assert r.get(b"k") == b"v"
# Asyncio — same package, same results.
ac = await kevy.AsyncClient.connect("kevy://127.0.0.1:6379")
await ac.set("k", "v")
# Embedded (in-process), over the C ABI with ctypes. Needs the engine —
# see below; this line raises a message naming where to get it otherwise.
c = kevy.connect("mem://app") # or file:///var/lib/app
The embedded engine
mem:// and file:// run kevy inside your process through
libkevy_ffi, a per-platform native library. A Python wheel does not
carry it: it would work on the handful of targets we happened to build
and nowhere else, while the remote client above works everywhere
CPython does. So the engine comes from the engine's own repository —
git clone https://github.com/goliajp/kevy
cd kevy && cargo build --release -p kevy-ffi # → target/release/
— and is found automatically from a kevy checkout, or by pointing
KEVY_FFI_LIB at the built library. Without it, the first embedded call
raises an error saying exactly this. Nothing else in the API differs.
One URL, two transports (§1.1)
| Scheme | Backend |
|---|---|
mem:// |
embedded, isolated in-memory store |
mem://<name> |
embedded, shared by name (pub/sub works cross-connect) |
file:///abs/path |
embedded, persistent (snapshot + AOF) |
kevy:// / redis:// / tcp:// |
remote RESP over TCP |
rediss:// / kevys:// (TLS) and redis://user:pass@host (AUTH) are
rejected — kevy has neither.
Embedded door (§5)
kevy.open_mem() / kevy.open_persistent(dir) return a DB — the
in-process store over libkevy_ffi, driven by ctypes (no C-extension
build). Every verb is reachable through db.cmd(*argv) -> Reply; db.get
/ db.set are the scalar fast paths; db.subscribe(chan) gives a polled
(next()) + blocking (wait(ms)) subscription. The library is located via
$KEVY_FFI_LIB or the repo target/{release,debug} build.
Command families
Every family of the contract (§3): core string/generic, hash, list, set,
sorted set, sorted-set algebra, hash-field TTL, declarative indexes
(idx_*, remote-only) — with any other IDX.* subcommand reachable through
the raw do(*argv) / idx_query_raw escape hatches — change feed
(feed_*), pub/sub
(Subscriber / AsyncSubscriber), transactions (Transaction),
pipelines, blocking pops (blpop/brpop/bzpopmin), and the cluster
client (ClusterClient). Bytes and str are both accepted; the wire is
bytes (§7).
Errors (§2)
Raised as a KevyError hierarchy inspectable by type: StoreError
(WrongTypeError, NotIntegerError, …), ProtocolError, IoError,
UnsupportedError, InvalidInputError, NotFoundError, ReadOnlyError,
TimedOutError, ClosedError.
Tests
pip install -e '.[test]'
pytest # embedded + remote (spawns a real kevy server)
Remote tests build and boot kevy on a temp port; they skip cleanly if the
server binary is absent (cargo build --release -p kevy).
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 kevy-6.2.0.tar.gz.
File metadata
- Download URL: kevy-6.2.0.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ba9d9f052ac9771a1949666fd92eb0e1e62bcda5758ebfd40ad63d7ff9e888
|
|
| MD5 |
f6e5f39bfa6211ed2c7d05c47a806a8e
|
|
| BLAKE2b-256 |
5e8f264bc86fcd10b37c20fcc0843e68e107ae44b4f60108a9356518597882ed
|
Provenance
The following attestation bundles were made for kevy-6.2.0.tar.gz:
Publisher:
pypi.yml on goliajp/kevy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kevy-6.2.0.tar.gz -
Subject digest:
e2ba9d9f052ac9771a1949666fd92eb0e1e62bcda5758ebfd40ad63d7ff9e888 - Sigstore transparency entry: 2655068397
- Sigstore integration time:
-
Permalink:
goliajp/kevy@f436745cbc70f8630c5a13ea6ab25d1fd8bab3c1 -
Branch / Tag:
refs/tags/v6.2.0 - Owner: https://github.com/goliajp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f436745cbc70f8630c5a13ea6ab25d1fd8bab3c1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file kevy-6.2.0-py3-none-any.whl.
File metadata
- Download URL: kevy-6.2.0-py3-none-any.whl
- Upload date:
- Size: 52.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 |
9196cba49f2f533ec64e350e08650796453e7c3c0d81df8cbfe6e9f9b59a29cf
|
|
| MD5 |
6bb45d1413a38c52cb21797f832c7801
|
|
| BLAKE2b-256 |
45f195c48045a8257befc86c427d25833b7d8063de7e26271ba287d1810b57d7
|
Provenance
The following attestation bundles were made for kevy-6.2.0-py3-none-any.whl:
Publisher:
pypi.yml on goliajp/kevy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kevy-6.2.0-py3-none-any.whl -
Subject digest:
9196cba49f2f533ec64e350e08650796453e7c3c0d81df8cbfe6e9f9b59a29cf - Sigstore transparency entry: 2655068406
- Sigstore integration time:
-
Permalink:
goliajp/kevy@f436745cbc70f8630c5a13ea6ab25d1fd8bab3c1 -
Branch / Tag:
refs/tags/v6.2.0 - Owner: https://github.com/goliajp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f436745cbc70f8630c5a13ea6ab25d1fd8bab3c1 -
Trigger Event:
workflow_dispatch
-
Statement type: