2016-10-31 15:39:25 -07:00
2015-10-02 22:28:08 +00:00
2015-10-30 22:51:24 +00:00
2016-10-31 15:39:25 -07:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. image:: https://travis-ci.org/nlevitt/rethinkstuff.svg?branch=master
    :target: https://travis-ci.org/nlevitt/rethinkstuff
    
rethinkstuff
============

Rudimentary rethinkdb python library with some smarts (and maybe some
dumbs)

What? Why?
----------

As of now there is a very small amount of code here. I had three
projects using the Rethinker class, and had enough code churn inside the
class that it became too painful to keep the three copies in sync. Thus,
a library shared among them.

Three main purposes: 

- round-robin connections among database servers 
- make sure connections close at proper time 
- retry retry-able queries on failure

Not really a connection pool, because it doesnt keep any connections
open, but it does take care of connection management.

Service Registry
~~~~~~~~~~~~~~~~

Now also has a ServiceRegistry class, a lightweight solution for service
discovery for distributed services. Maintains service info and status in
a rethinkdb table called “services”.

Usage
-----

::

    import rethinkstuff
    r = rethinkstuff.Rethinker(['db0.foo.com', 'db0.foo.com:38015', 'db1.foo.com'], 'my_db')
    r.table('my_table').insert({'foo':'bar','baz':2}).run()
    for result in r.table('my_table'):
        print("result={}".format(result))
Description
WARC writing MITM HTTP/S proxy
Readme 4.5 MiB
Languages
Python 97.1%
Dockerfile 2%
Shell 0.9%