pythoncassandrapycassa

best Cassandra library/wrapper for Python?


I found lazyboy and pycassa - maybe there are others too. I've seen many sites recommending lazyboy. IMHO the project seems dead, see https://www.ohloh.net/p/compare?project_0=pycassa&project_1=lazyboy

So what's the best option for a new project? Thanks.


Solution

  • The Cassandra project has been recommending that new projects use CQL for a few versions now, and with the advent of CQL 3 in Cassandra 1.1, I'd definitely recommend going right to that. Advantages include a more familiar syntax if you've used SQL before, and a commonality of interface between the different language CQL drivers. CQL is CQL, whether you use it from Java, Python, Ruby, Node.js, or whatever. Drivers don't need to support as much as full Cassandra client libraries, so there is less need for maintenance and less dependence on client authors.

    The Python CQL driver is on GitHub: datastax/python-driver. (Previous releases were on Google Code.)

    For information on CQL, see Datastax's quite through docs for CQL 2, a post on how to make effective data models with CQL 3, and a post on what's new in CQL 3 overall.

    There's also a full reference on CQL 3 which is pending approval into the official Cassandra repo; while it's waiting, you should be able to read it here in pcmanus' github.

    All that said, though, if you'd rather not use CQL, Pycassa really is better maintained and ought to have good support for quite some time.