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.
Friday, March 8, 2013
Monday, February 18, 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.
Here is list of basic tools which I've used to create the driver
- nose - for executing tests, integration and unit. ArangoDB driver contain 103 tests
- coverage - to have clear metric how many code lines was covered by tests. Now it's 89%
- 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
pip install arango
Documentation of the Arango driver for python
Update:: I've improved performance of Arango requests client by using Session Objects. Also updated performance chart.
Wednesday, January 30, 2013
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.