Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

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.

Files for doublethink, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size doublethink-0.3.0.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page