Skip to main content

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 threading or connection pools.

🏆 Performance

In direct concurrent benchmarks against standard Redis Event-Loop:

  • Faster Single-Threaded Reads: ~26,000 GET RPS natively without async-loop overhead.
  • Extreme Concurrency: Maintains highly stable 40,000+ RPS even with 200+ concurrent worker threads constantly reading and writing, thanks to robust std::shared_mutex usage 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

hydrods-2.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hydrods-2.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file hydrods-2.0.0.tar.gz.

File metadata

  • Download URL: hydrods-2.0.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

Hashes for hydrods-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2bcd4467f766fd0290f6f1080ee8070d296baf5bed76bde2010941ff336e55ea
MD5 f2edd511ed18f02f1e04739c2e56f4fd
BLAKE2b-256 65f6c2e2ad86a2c994f783829705277bd4e87fd904632c14a8cfebcfb8a8f23d

See more details on using hashes here.

File details

Details for the file hydrods-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: hydrods-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hydrods-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f71d42d32c4b08b395c0efe1e037a4dd8b41a83d32feb48df9e7dc62fc47e57
MD5 75762b6f4ac9a93c4fd4c3af4414b0d0
BLAKE2b-256 f6d96132b2d48245f90d386cf13ca37a13851daf57883679c2a0a218a0f5fc35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page