Skip to main content

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. -->

Metadata

Release files for cachier-python 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cachier-python 0.6.0
File Interpreter ABI Platform
cachier_python-0.6.0-py3-none-any.whl Python 3 none any Details

Release files / cachier_python-0.6.0-py3-none-any.whl

Download URL cachier_python-0.6.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21c06c5f63db33cce3729467ad9c328253b5131f5e25e17b8e40197178d908c4
BLAKE2b-256 checksum
How to use checksums
72410273723f17a15aa23f31584633157d70dc1828bbb2fa2a8961236a3e396f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.6.0 This release

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.2.0

1 release file

0.1.7

1 release file

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page