Pylibmc is now available on PythonAnywhere

PythonAnywhere, a popular platform to deploy Python apps, released their new image called earlgrey which is based on Ubuntu 16.04. This new image finally supports libmemcached with SASL support. This means you can now use pylibmc to connect to cloud Memcache providers such as MemCachier.

To use pylibmc, you need to make sure you are using the earlgrey image on the batteries included page. If you are not, you can request an update (after reading their post about it). Then make sure to use a virtualenv with Python 3:

$ virtualenv -p python3 venv
$ source venv/bin/activate
(venv) $ pip install pylibmc

Now you are ready to use pylibmc to connect to any Memcached server that requires SASL authentication. To use pylibmc to connect to MemCachier, you might find the documentation helpful.

Note: if you get the error ImportError: cannot open shared object file: No such file or directory when importing pylibmc you might be using a cached pylibmc from an earlier PythonAnywhere image. Clear the ~/.cache/pip directory and re-create the virtualenv to make sure pylibmc can find libmemcached.