Skip to main content

rethinkdb python library

Project description


RethinkDB python library. Provides connection manager and ORM framework (object-relational mapping, sometimes called ODM or OM for nosql databases).

Connection Manager

Three main purposes:

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

Not currently a connection pool, because it doesn’t keep any connections open. Should be possible to implement connection pooling without changing the API. However, testing suggests there would be no appreciable performance gain from connection pooling.

Usage Example

import doublethink
rr = doublethink.Rethinker(['', '', ''], 'my_db')
for result in rr.table('mytable'):


Simple yet powerful ORM system. Does not enforce a schema.

Usage Example

import doublethink

rr = doublethink.Rethinker(['', '', ''], 'my_db')

class MyTable(doublethink.Document):

doc1 = MyTable(rr, {'animal': 'elephant', 'size': 'large'})

doc1_copy = MyTable.load(rr, = 'bread'

doc1.first_name = 'Frankworth'


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”.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doublethink-0.3.0.tar.gz (11.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page