Skip to main content

A lightweight client-side library for zcached, written in Python.

Project description

Zcached.py - A client-side library for zcached.

commits license

📜 Introduction

Zcached.py is a Python client-side library designed to interact with zcached, a high-performance caching system. This library provides developers with 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 should also work, but untested).

Before installing zcached.py, ensure that you have the zcached server. Instructions for installing the server can be found here.

Once the zcached server is installed, 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)

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

zcached.py-1.0.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

zcached.py-1.0.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file zcached.py-1.0.1.tar.gz.

File metadata

  • Download URL: zcached.py-1.0.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for zcached.py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9059dec64246215c788ac8afe01427fcada66c6d368654ae6948ba18267967a8
MD5 c6e2648189bdc70e1547ccc6969b7bbb
BLAKE2b-256 c564c069b66a10f27f487f03648b01bb7953169dcc828067d3802dd6217f88e6

See more details on using hashes here.

File details

Details for the file zcached.py-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: zcached.py-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for zcached.py-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a24fc5222ec68ce4ec38684f26d8833908a2571299aa2304cb7188ef503c0949
MD5 427c172ceaed09eab452c51e7d4ca408
BLAKE2b-256 ae7bd73650971cac4f243d8098ca7dd77ca217ff499f452409d5f8296313686d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page