The official Python client for HydroDB
Project description
HydroDB Python Client (hydrods)
The official Python client library for HydroDB - a blazing fast, multi-threaded NoSQL database built in C++17.
HydroDB is designed to outperform single-threaded databases like Redis in highly concurrent environments by utilizing a unified Reader-Writer Starvation-Free Lock Engine, dynamic Fluid Pressure Buckets, and Zero-Latency Asynchronous AOF Persistence.
🚀 Installation
pip install hydrods
💻 Quick Start
from hydrods import HydroDB
# Connect to your HydroDB server (Default: localhost:7379)
db = HydroDB(host='127.0.0.1', port=7379)
# --- Basic Operations ---
# SET a key-value pair
db.set('user:101', 'Anurag Panwar')
# GET the value
name = db.get('user:101')
print(f"Name: {name}")
# DELETE a key
db.delete('user:101')
# --- Range Queries (Ordered Keys) ---
# Fetch all keys between 'a' and 'z'
all_data = db.range('a', 'z')
print(all_data)
# Always close the connection when done
db.close()
⚡ Features
- Raw TCP Sockets: No overhead, blazing fast native TCP connections without blocking bugs.
- RESP Protocol Parser: Automatically parses Redis Serialization Protocol responses directly into Python data structures (Strings, Integers, Dictionaries).
- Thread Pool Compatible: Easily handles high concurrency when paired with Python's
threadingor connection pools.
🏆 Performance
In direct concurrent benchmarks against standard Redis Event-Loop:
- Faster Single-Threaded Reads:
~26,000 GET RPSnatively without async-loop overhead. - Extreme Concurrency: Maintains highly stable
40,000+ RPSeven with 200+ concurrent worker threads constantly reading and writing, thanks to robuststd::shared_mutexusage and lock-free thread queues.
License
MIT License
Project details
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 hydrods-2.1.0.tar.gz.
File metadata
- Download URL: hydrods-2.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
328fde172a11cdeb453e56b9b59afff710bd67d87eccfd8fb53db43d1fe71024
|
|
| MD5 |
a2176a43e9161226ff3da788b8751f0c
|
|
| BLAKE2b-256 |
da2fd6b211dcf447d6300b9f438ee98762c771bdb54a52a8b0015a8917126359
|
File details
Details for the file hydrods-2.1.0-py3-none-any.whl.
File metadata
- Download URL: hydrods-2.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da1a01df4e5215821afa1c735d1aa022b36dcccfaf2d32bc1affbc97ced6c8b5
|
|
| MD5 |
59536853b4a60fb1449798fe61229492
|
|
| BLAKE2b-256 |
22f6737957b64fc94b81aff257519801992b83e8896a82beafb4c031c2201cc4
|