A simple client for Zentropy server
Project description
Zentropy Python Client
A lightweight Python client for Zentropy — a fast, Redis-like key-value store with authentication, Unix socket support, and a simple text-based protocol.
🚀 Installation
Install from PyPI:
pip install zentropy-py
🧠 Usage
Basic Example
from zentropy import Client
client = Client(password="testpass")
client.set("foo", "bar")
print(client.get("foo")) # Output: bar
client.close()
🔐 Authentication
client = Client(host='127.0.0.1', port=6383, password='password here')
⚙️ Supported Commands
| Method | Command | Description |
|---|---|---|
auth(password) |
AUTH |
Authenticate the connection |
set(key, value) |
SET |
Set a key-value pair |
get(key) |
GET |
Retrieve a value |
delete(key) |
DELETE |
Remove a key |
exists(key) |
EXISTS |
Check if a key exists |
ping() |
PING |
Test connectivity |
close() |
– | Close the connection |
Example
client.set("hello", "world")
print(client.exists("hello")) # True
print(client.get("hello")) # "world"
client.delete("hello")
🤝 Contributing
Contributions are welcome! 🎉
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
zentropy_py-0.1.4.tar.gz
(3.8 kB
view details)
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 zentropy_py-0.1.4.tar.gz.
File metadata
- Download URL: zentropy_py-0.1.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe9ec650a9288fecdb199583710060af457a924f8f072f9560f8f810d7e581a
|
|
| MD5 |
5bdbdb08675f8021d8666bea93f37784
|
|
| BLAKE2b-256 |
b3b274c3746775027865efa0ee5061538a96e807f06b67cc5f922a2db10d97fb
|
File details
Details for the file zentropy_py-0.1.4-py3-none-any.whl.
File metadata
- Download URL: zentropy_py-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0406beda65473fa2d95f5a1a55af765b5d0d18dbf7c06dfdac907e3b18958b34
|
|
| MD5 |
46d835021b2c285d9d74e28b9cfe248a
|
|
| BLAKE2b-256 |
957984dabed416a11b50bcb216f527ecd666e27ff674715fdc0e69f6acc3d3e7
|