views:

89

answers:

1

I need to use gets and cas (check and set) commands of memcached from Python application. The only Python client library supporting them I found is Twisted. But Twisted requires quite different design of application, so it's not an option. Is there any other full-featured (not listed on official page) Python library for memcached? Pure Python solution is preferred.

Summary: Thanks to piquadrat there is patch for for python-libmemcached to add support of missing methods. The patch is already applied to trunk in August, but there was no new release yet. Using development branch is OK in many cases, but I'm still looking for stable pure Python solution.

+1  A: 

I don't see pylibmc listed there, but I have no idea if it supports those commands you need (edit: it doesn't, sorry).

/edit: if everything else fails, you could perhaps use this patch for python-libmemcached, which adds support for cas and gets.

piquadrat
Thanks for the links. Unfortunately `pylibmc` lacks support for CAS too. It looks like the simplest solution so far is patching python-memcached myself. Any C solution will require long testing and audit to use in sensitive projects. +1 anyway.
Denis Otkidach