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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages