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
sparta-memcached-0.0.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for sparta_memcached-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d24600d897634c881156adff9872fb2cc5134025015553c57afecd1d50ee82b |
|
MD5 | 3569dd421c09042bddc5ce9f0b264c21 |
|
BLAKE2b-256 | 90fd896c568f0ca97b764f4d3e19fe034f803e6bd20c8e903c3913736b829382 |