Story

Show HN: YaraDB Python Client – A clean interface for my custom WAL-based DB

ashfromsky Wednesday, November 19, 2025

Hi HN,

I recently built YaraDB, a persistent document store, specifically to have a lightweight, Python-native way to handle data with Optimistic Concurrency Control (OCC).

While the database server handles the heavy lifting (WAL persistence, soft deletes), I realized the real value lies in the developer experience. So I built a dedicated Python client that abstracts away the HTTP layer and handles concurrency gracefully.

The client features: - Native Exception Handling: Maps HTTP 409 conflicts directly to `YaraConflictError` for easy try/except blocks. - Type Hinting: Fully typed methods for better IDE support. - Connection Reuse: Uses `requests.Session` for keep-alive connections.

Here is how it looks:

    client = YaraClient("http://localhost:8000")
    
    try:
        client.update(doc_id="...", version=1, body={...})
    except YaraConflictError:
        # Handle race condition naturally in Python
        print("Data changed by someone else!")
You can find the client here: https://github.com/illusiOxd/yaradb-client-py And the server logic here: https://github.com/illusiOxd/yaradb

I'd love to hear your thoughts on the client API design!

1 0
github.com
Visit article Read on Hacker News