reverbrain/elliptics — pull request #230 by shaitan (2013-10-07 00:51:31+00:00)
Title: New Python binding

New Python binding consists of 2 parts:
* ```elliptics.core```
* ```elliptics```

```elliptics.core``` is a mirror of C++ elliptics binding with full support async_result (wait, get, connect, iterate etc.), elliptics::session interface and result_entries.

```elliptics``` is a wrapper of ```elliptics.core```` which adds flexibility to ```elliptics.core``` and extends it.

To start working with elliptics via python binding:
1. ```import elliptics```
2. create node: use ```n = elliptics.create_node()``` - for simply creating node with specified parameters or:
* create logger: ```e = elliptics.Logger('/dev/stderr', 1)```
* create node: ```n = elliptics.Node(e)```
* add remote to node: ```n.add_remote("host:port:family")```
3. create session: ```s = elliptics.Session(n)```
4. set groups: ```s.groups = [1,2,3,...]```
5. use session instance to send requests to elliptics..

All old code probability will not work, because almoust all of the ```elliptics.Session``` methods return ```elliptics.AsyncResult```.