Metadata-Version: 2.5
Name: render-lab-tasks-render-kv
Version: 0.1.0
Summary: render-kv tasks for Render Workflows
Project-URL: Repository, https://github.com/render-lab/render-tasks-python
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: redis<7,>=6.4
Requires-Dist: render-lab-tasks-core<0.2,>=0.1.1
Requires-Dist: render==1.0.1
Description-Content-Type: text/markdown

# render-lab-tasks-render-kv

Nine Render Key Value tasks: `kv.get`, `kv.set`, `kv.incr`, `kv.expire`,
`kv.delete`, `kv.lock`, `kv.unlock`, `kv.listPush`, and `kv.listRange`.
Import `render_lab_tasks_render_kv.tasks` for explicit registration.
Each task also exports an injectable async `*_impl(ctx, input, *, deps=...)`.

`REDIS_URL` is read at first use. A linked Render Key Value instance provides
its private connection URL. There are no other credential requirements.

```python
from render_lab_tasks_render_kv.tasks import app, get_impl
# await get_impl(ctx, {"key": "example"})
```

Connections are closed after each raw invocation. Redis transport retries are
explicitly disabled. The durable policy allows three retries at 1s, 2s, 4s.
Increment and list append can execute twice if a connection fails after the
write. Lock acquisition uses SET NX EX; unlock uses one atomic compare-and-delete
Lua command. List append followed by TTL refresh is two Redis commands, matching
TypeScript; partial failure may leave a list without the requested TTL.

Hermetic tests verify command arguments and failure behavior. Live connection,
failover, contention, and expiry checks remain in the repository testing backlog.

## Installation

```sh
pip install render-lab-tasks-render-kv==0.1.0
```
