Skip to content

mailmug/zentropy-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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! πŸŽ‰

About

Python client for the Zentropy key-value server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages