A lightweight client-side library for zcached, written in Python.
Project description
Zcached.py - A client-side library for zcached.
📜
Introduction
Zcached.py is a Python client-side library designed to interact with zcached, a high-performance in-memory caching system. This library provides developers an easy-to-use interface for integrating zcached into their Python applications, enabling efficient data caching.
For more information, please see zcached repository.
🌟
Features
- Simplified Caching: Zcached.py simplifies the process of caching data by providing intuitive functions for storing and retrieving values.
- Efficient Communication: The library optimizes communication with the zcached server, ensuring minimal overhead and efficient data transfer.
- Properly Typehinted: The codebase of zcached.py is properly typehinted, enhancing code readability.
🔧
Installation
[!IMPORTANT]
Library requires python version 3.8 or newer. (Older also should work, but untested).
Before installing zcached.py, ensure that you have the zcached server. Instructions for installing and running the server can be found here.
Once the zcached server is ready to use, you can proceed to install zcached.py using pip:
pip install -U zcached.py
🖊️
Usage
Here's a basic example demonstrating how to use zcached.py in your Python code:
from typing import List
from zcached import ZCached, Result
client = ZCached(host="localhost", port=5555)
client.run()
if client.is_alive() is False:
raise RuntimeError("Something went wrong.")
client.set(key="dogs", value=["Pimpek", "Laika"])
dogs_result: Result[List[str]] = client.get(key="dogs")
dbsize_result: Result[int] = client.dbsize()
keys_result: Result[List[str]] = client.keys()
print(keys_result.value)
client.save()
client.delete("dogs")
client.flush()
See more examples here
👥
Contributing
Contributions to zcached.py are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
📕
License
Zcached.py is licensed under the 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
Built Distribution
File details
Details for the file zcached.py-1.2.1.tar.gz
.
File metadata
- Download URL: zcached.py-1.2.1.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a7af70b424da32278a205e44faa710564ff6bd18e4e2b08f8207226a847fff6 |
|
MD5 | baddbc719f773f18077016da7895b11c |
|
BLAKE2b-256 | bab7cd21762d8d1ccbeab461e43088bab175c85d4247185df1dc2272784e179b |
File details
Details for the file zcached.py-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: zcached.py-1.2.1-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60254d1a5938aa34673ac9f177e15188a94c6278ff502aef67549d1838d1d436 |
|
MD5 | 3badd7f9eedc7a1f5a714233a51f7382 |
|
BLAKE2b-256 | f59c06e685813d979b691f97ef6555c8ea2ce92d9f1ba90f7d032655f4f93684 |