Sparta memcached library
Project description
sparta-memcached
Sparta memcached library.
Usage
import pylibmc
import sparta.memcached
alice_cache = sparta.memcached.SpartaCacheWrapper(
pylibmc.Client(
["127.0.0.1:11211"],
binary=True,
behaviors={"tcp_nodelay": True, "ketama": True, "no_block": True, "cas": True}
),
key_prefix="alice/",
)
bob_cache = sparta.memcached.SpartaCacheWrapper(
pylibmc.Client(
["127.0.0.1:11211"],
binary=True,
behaviors={"tcp_nodelay": True, "ketama": True, "no_block": True, "cas": True}
),
key_prefix="bob/",
)
your_value = ...
alice_cache.set("your_key", your_value)
assert alice_cache.get("your_key") == your_value
assert alice_cache.get("your_key") != bob_cache.get("your_key")
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparta-memcached-0.2.2.tar.gz.
File metadata
- Download URL: sparta-memcached-0.2.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba51020b0e9e1a6ec0ef2c8b5236c5af2efddde27aaca10e722c15ed80fde106
|
|
| MD5 |
0a8c0b127907b376faba6b8d59c1ffcc
|
|
| BLAKE2b-256 |
e553f5c5f7c16e955ba8f7b979b06c6bdcd30ba4088089fc7e64bc45ce385bca
|
File details
Details for the file sparta_memcached-0.2.2-py3-none-any.whl.
File metadata
- Download URL: sparta_memcached-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bf7da848f35aaf31ffa7c29bce012ebef0b1cf4a48e9ae53d7b79b1c4a83677
|
|
| MD5 |
c7f9d5e203041274cd07be759e74d89d
|
|
| BLAKE2b-256 |
361bd9fdf0a4cbb3c173d6864ba9c432ad4125b11463dc15ccc9d9dd80227acc
|