Friday, March 8, 2013

ArangoDB Driver for Python: added support of Python 3.3 and ArangoDB 1.2

At least added support of Python 3.3 to the ArangoDB Python driver v 0.1.6 (github). Move forward with pip install arango. By default in Python 3.3 pycurl client will not work, so it's better to specify client by hands using: Also, added support of ArangoDB 1.2.

Monday, February 18, 2013

arango: ArangoDB Driver for Python (updated Feb 24, 2013)

Past year I've heard about new database - ArangoDB. I was not able to test it using my daily tools - there was no driver for Python. So, I've decided to create it. I've tried to create really good one - high code coverage, well documented and easy API initially was a must.

Yesterday, I've released it - now available on PyPi and on github


Here is list of basic tools which I've used to create the driver

  1. nose - for executing tests, integration and unit. ArangoDB driver contain 103 tests
  2. coverage - to have clear metric how many code lines was covered by tests. Now it's 89%
  3. sphinx - to have good documentation it's a must. Also .. testcode:: and .. doctest :: directives is very useful to keep code examples usable.


Initially, I've used requests library as main HTTP transport tool. But at some point I've get a letter from ArangoDB team about python driver performance. Here is most important quote:

The guys told me that PHP took 0,5 seconds, JS about a second and our Python script 5 seconds

I've start digging and found that requests is slow. Fast tests shows that urllib2 2x faster than requests, and pycurl 3x faster. Here is performance tests and JS code for arangosh. Below small chart about 1000 documents creation performance

Some details

pip install arango

Documentation of the Arango driver for python

ArangoDB official website

Update:: I've improved performance of Arango requests client by using Session Objects. Also updated performance chart.

Wednesday, January 30, 2013

Redis PubSub wrapper for Python

Recently I've found that there's no reasonable simple and useful Redis pub sub examples around. So, here is my dead simple wrapper how to implement it without any unnecessary overhead.