Metadata-Version: 2.5
Name: kvblockd
Version: 0.2.0
Summary: Python client for the kvblockd KV-cache block store (KVB1 wire protocol)
Project-URL: Homepage, https://kvstash.com
Project-URL: Documentation, https://kvstash.com/docs/python-client/
Project-URL: Get the daemon, https://kvstash.com/docs/install/
Author-email: Rudray Mehra <rudraymehra@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: blake3>=0.4
Requires-Dist: xxhash>=3.4
Provides-Extra: test
Requires-Dist: pytest-repeat; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# kvblockd: Python client for the KVStash KV-cache store

`kvblockd` talks to the **KVStash daemon**, a separate server that stores LLM KV-cache blocks in DRAM, NVMe and S3
so engines can skip recomputing long prompts. This package is the client only; the engine adapters
(`vllm-kvblockd`, `sglang-kvblockd`, `lmcache-kvblockd`) install it for you.

## 1. Get the daemon (free download)

```sh
curl -fsSL https://kvstash.com/install.sh | sh     # Linux x86-64/arm64, macOS arm64 for development
```

Then start it with the two-minute quickstart: https://kvstash.com/docs/quickstart/

## 2. Use the client

```sh
pip install kvblockd
```

```python
from kvblockd.client import Client

c = Client("127.0.0.1:9440", namespace="demo", token="demo-token")
c.put(b"k" * 32, b"hello")                # keys are 32 bytes
print(c.batch_exists([b"k" * 32]))         # (1, [True])
values, statuses = c.batch_get_bytes([b"k" * 32])
c.close()
```

- Full API: https://kvstash.com/docs/python-client/
- From another machine or a cloud VPC: https://kvstash.com/docs/connect-an-engine/#network
- Troubleshooting: https://kvstash.com/docs/troubleshooting/

Python 3.10 or newer.
