Skip to main content

A python wrapper package for connecting to a self-hosted cachier service

Project description

Cachier Python

A python library wrapper for using a self-hosted cachier service.

URL: cachier-python

Table of Contents

Installation

Install the package from pypi:

pip install cachier-python

Usage

from cachier_python import Cachier, DriverType

# Create a cachier instance to connect to the service
client = Cachier('http://localhost:8000', driver=DriverType.RAM)

# cache expiry in seconds
CACHIER_EXPIRY = 600

# set the cache
client.set(key='my_key', value='my_value', expiry=CACHIER_EXPIRY)

# get the cached value
cached_value = client.get(key='my_key')

Available drivers:

from cachier_python import DriverType

DriverType.RAM
DriverType.JSON
DriverType.SQLITE
DriverType.PICKLE

check if a driver is valid:

from cachier_python import DriverType

is_valid = DriverType().is_valid(DriverType.RAM)

print(is_valid)

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request. -->

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cachier_python-0.6.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file cachier_python-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cachier_python-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21c06c5f63db33cce3729467ad9c328253b5131f5e25e17b8e40197178d908c4
MD5 4a8bd853a331563256540afa470d86c7
BLAKE2b-256 72410273723f17a15aa23f31584633157d70dc1828bbb2fa2a8961236a3e396f

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