Nadav
Nadav

Reputation: 168

Python3: Looking for alternatives to gevent and pylibmc/python-memcached

So, I have decided to write my next project with python3, why? Due to the plan for Ubuntu to gradually drop all Python2 support within the next year and only support Python3. (Starting with Ubuntu 13.04)

gevent and the memcached modules aren't officially ported to Python3.

What are some alternatives, already officially ported to Python3, for gevent and pylibmc or python-memcached?

Upvotes: 10

Views: 5720

Answers (4)

Nik
Nik

Reputation: 28

pymemcache : A comprehensive, fast, pure-Python memcached client.

Comparison with other clients

pylibmc

The pylibmc library is a wrapper around libmemcached, implemented in C. It is fast, implements consistent hashing, the full memcached protocol and timeouts. It does not provide access to the "noreply" flag. It also isn't pure Python, so using it with libraries like gevent is out of the question, and its dependency on libmemcached poses challenges (e.g., it must be built against the same version of libmemcached that it will use at runtime).

Python-memcache

The python-memcache library implements the entire memcached text protocol, has a single timeout for all socket calls and has a flexible approach to serialization and deserialization. It is also written entirely in Python, so it works well with libraries like gevent. However, it is tied to using thread locals, doesn't implement "noreply", can't treat errors as cache misses and is slower than both pylibmc and pymemcache. It is also tied to a specific method for handling clusters of memcached servers.

Upvotes: 0

Sławomir Lenart
Sławomir Lenart

Reputation: 8387

for memcached you probably know alternative: redis+python3

Upvotes: 1

Darek
Darek

Reputation: 2921

Circuits has now support for Python 3, try it it is great.

Upvotes: 4

arutaku
arutaku

Reputation: 6107

I am stuck in the same point.

Its core is greenlet 0.4.0, which is available in python 3, but not the full libraries (gevent, evenlet or concurrence).

There are some attempts to migrate it, but with no luck.

You can check packages availability in this website: http://py3ksupport.appspot.com/pypi/greenlet

If I find any alternative I would let you know.

Upvotes: 0

Related Questions