Back to Home11/19/2025, 2:01:05 PM

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

1 points
0 comments

Mood

calm

Sentiment

positive

Category

tech

Key topics

database

python

WAL-based DB

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!

The author is sharing their custom WAL-based database's Python client, showcasing a clean interface. The lack of comments suggests a low-key introduction.

Snapshot generated from the HN discussion

Discussion Activity

No activity data yet

We're still syncing comments from Hacker News.

Generating AI Summary...

Analyzing up to 500 comments to identify key contributors and discussion patterns

Discussion (0 comments)

Discussion hasn't started yet.

ID: 45979586Type: storyLast synced: 11/19/2025, 3:13:00 PM

Want the full context?

Jump to the original sources

Read the primary article or dive into the live Hacker News thread when you're ready.