пример:
import pylibmc
mc = pylibmc.Client(["127.0.0.1:11211"], binary=True)
mc.set("some_key", "Some value")
value = mc.get("some_key")
print value
Traceback (most recent call last):
File "test.py", line 47, in <module>
mc.set("some_key", "Some value")
_pylibmc.WriteError: error 5 from memcached_set: WRITE FAILURE