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, sharded NoSQL database built in C++.

HydroDB is designed to outperform single-threaded databases like Redis in highly concurrent environments by utilizing 64-way Sharded Locks 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 (SkipList / 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.
  • RESP Protocol Parser: Automatically parses Redis Serialization Protocol responses directly into Python data structures (Strings, Integers, Dictionaries).
  • Thread-safe Design: Easily handles high concurrency when paired with Python's threading or connection pools.

🏆 Performance

In direct concurrent benchmarks (100,000 Operations, 100 Clients), HydroDB combined with hydrods achieves:

  • 1.8x Faster Writes than Redis.
  • 3x Faster Parallel Reads leveraging C++ std::shared_mutex.

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-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

hydrods-1.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hydrods-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hydrods-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1cbb4e98bb9eea191afa71b762c83b2ad2b242e7d9a20732c417ccaa75564e88
MD5 a6349b9c4af422690072b15920f483da
BLAKE2b-256 d7ca70c0b55538ed5df45c8ba6dbd11914be3c9fc477b96a4447ece3fb8abe3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hydrods-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 722a2f42185b15004a13f82a0c29083aefb1f62233c2c3b0e3c365026ddb0ab1
MD5 05fed60bf44aa96b9bfeed0988473680
BLAKE2b-256 b6bfc7bd41c3d8f2dc87478f7c75ae15933d11e3bca8a708c7860485257e06bf

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