Sparta memcached library
Project description
sparta-memcached
Sparta memcached library.
Usage
import pylibmc
import sparta.memcached
alice_cache = sparta.memcached.KeyPrefixWrapper(
pylibmc.Client(
["127.0.0.1:11211"],
binary=True,
behaviors={"tcp_nodelay": True, "ketama": True, "no_block": True},
),
key_prefix="alice/",
)
bob_cache = sparta.memcached.KeyPrefixWrapper(
pylibmc.Client(
["127.0.0.1:11211"],
binary=True,
behaviors={"tcp_nodelay": True, "ketama": True, "no_block": 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
Close
Hashes for sparta_memcached-0.0.2b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1705bf14c226a2f8d7a7b1de2ae26781ea741cf5ae006956a40397daa6ac213 |
|
MD5 | 7e029752770a3e36cba1326141b5d822 |
|
BLAKE2b-256 | ff5a887c9baa92a8c4a58d365fd8dd23c8780a3d8dd91776951a7d57c15c9d08 |