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.1.tar.gz (3.5 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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hydrods-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 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.1.tar.gz
Algorithm Hash digest
SHA256 6eed80ca820f4c28b36e127985301e9401a9615c22ff0b255b0a8abf5687f6ca
MD5 9d777e6668bfb558b3dbcbfa16e388d4
BLAKE2b-256 80cc66cbe583f653476336aeb7eb01aadeba1b74c288ac3d4c589d84bd23ce74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hydrods-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd963a780334ac68cd9d4e36ef216ad7d8e4e6fa3c8caa3011d8dac91d0ec8e4
MD5 3e7021838856c985f551d7d3a2b0c273
BLAKE2b-256 3124ee7bfb7877312ca8772f186db17aa120effb0b9543fab2c931d285e32ba8

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