Simple Caching Library for Python
Summary
Simple caching library for supported providers. Pass method call to caching provider along with generated key to populate memcached with the result. The results will be returned with a boolean value if there was a cache miss to assist in any metrics generation.
Versions
0.0.1 - Support for memcached and json conversion
Getting Started
-
Instantiate the provider:
from simplecache.common.json_conversion import JsonConversion from simplecache.providers.memcached import MemcachedProvider memcached = MemcachedProvider(JsonConversion(), servers='127.0.0.1')
-
PUT data into Memcached:
data = { 'test1': 'value1', 'test2': 'value2' } memcached.put('testkey1', 60, data)
-
GET data by key from provider. Optionally: Pass a method for a cache miss to load data into provider from the result.
class TestClass(object): def test_method(self, param1, param2): data = { 'test1': 'value1', 'test2': 'value2' } if param1 != 'p1' or param2 != 'p2': raise Exception('Unexpected error.') return data t = TestClass() # test local instance of memcached with cache miss response, miss = memcached.get( 'testkey2', 60, t.test_method, param1='p1', param2='p2')
-
DELETE data by key from provider.
memcached.delete('testkey1')
Metadata
Release files for pysimplecache 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysimplecache-0.0.1.tar.gz | 3.7 kB | Without provenance | Details for pysimplecache-0.0.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysimplecache-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for pysimplecache-0.0.1-py3-none-any.whl |
| pysimplecache-0.0.1-py2-none-any.whl | Python 2 | none | any | Details for pysimplecache-0.0.1-py2-none-any.whl |
Total release size: 17.6 kB
Release files / pysimplecache-0.0.1.tar.gz
| Download URL | pysimplecache-0.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c16c768521af6389b51ad63c3d1983414aa30e99e9288c9bc923029e58f55ac
|
|
BLAKE2b-256 checksum How to use checksums |
4017c77a35449fb5fc3fda3522f7d7eaafcc65cbd1ae516b420e83e4b7d65771
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Release files / pysimplecache-0.0.1-py3-none-any.whl
| Download URL | pysimplecache-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12f047079247c3f057fb2091eab3f1e4be57c1923af80672076aeac759c4f9d5
|
|
BLAKE2b-256 checksum How to use checksums |
5d8db7141abe941facd0459b679a850809d0095a1d1462160cb33ee425cd18e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Release files / pysimplecache-0.0.1-py2-none-any.whl
| Download URL | pysimplecache-0.0.1-py2-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
85de7b5e6381153c3ede48222988230a9046165240f67464857907b7ec8daf1f
|
|
BLAKE2b-256 checksum How to use checksums |
023ca9bd868ae55742534cd1af91433dc5a87999c0176c7c1dc3d06055b578ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Security for pysimplecache 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.