Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lasarux/rebirthdb-python

 
 

Repository files navigation

RebirthDB Python driver

Build Status Codacy Badge

Overview

What is RebirthDB?

RebirthDB is the fork of RethinkDB which is the first open-source scalable database built for realtime applications. It exposes a new database access model -- instead of polling for changes, the developer can tell the database to continuously push updated query results to applications in realtime. RebirthDB allows developers to build scalable realtime apps in a fraction of the time with less effort.

Installation

$ pip install rebirthdb

Note: this package is the extracted driver of RethinkDB's original python driver.

Quickstart

The main difference with the previous driver (except the name of the package) is we are not importing RebirthDB as r. If you would like to use RebirthDB's python driver as a drop in replacement, you should do the following:

from rebirthdb import RebirthDB

r = RebirthDB()
connection = r.connect(db='test')

Example

Create a table, populate with data, and get every document.

from rebirthdb import RebirthDB

r = RebirthDB()
connection = r.connect(db='test')

r.table_create('marvel').run(connection)
marvel_heroes = r.table('marvel')
marvel_heroes.insert({
    'id': 1,
    'name': 'Iron Man',
    'first_appearance': 'Tales of Suspense #39'
}).run(connection)

for hero in marvel_heroes.run(connection):
    print(hero['name'])

Run tests

To ensure python driver works with python 2.7, 3.4, 3.5, 3.6 we are using tox and pytest. For testing (depending on what you would like to test) you can run tox or pytest.

New features

Github's Issue tracker is ONLY used for reporting bugs. NO NEW FEATURE ACCEPTED! Use spectrum for supporting features.

Contributing

Hurray! You reached this section which means, that you would like to contribute. Please read our contributing guide lines and feel free to open a pull request.

About

Python driver for RebirthDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Makefile 0.5%