Coder Social home page Coder Social logo

django-r's Introduction

Django R

Toolkit to use Rethinkdb in Django. Features:

  • Interface to explore the Rethinkdb data
  • Helpers for basic operations

This module was made to give an easy access to the Rethinkdb functionalities inside of the Django environment. We are not trying to replace the classic Django orm nor the builtin Rethinkdb admin interface. It is just a set of tools to ease the use of Rethinkdb in Django.

Install

pip install rethinkdb geojson jsonschema djangoajax six python-dateutil
pip install git+https://github.com/dmpayton/reqon.git
pip install git+https://github.com/synw/django-R.git

Installed apps:

'django_ajax',
'djR',

Urls: url('^r/', include('djR.urls')),

Optional settings

# default: 'localhost'
RETHINKDB_HOST = ip_here
# default: 28015
RETHINKDB_PORT = 28500
# default: None
R_DEFAULT_DB = "mydb"
# default: True
R_VERBOSE = False

Usage

Go to /r/ as superuser and start to explore the data.

Run a query:

from rethinkdb import r
from djR.r_producers import R

q = r.db('mydb').table('mytable').limit(10)
results = R.run_query(q)

Run a query from json:

from djR.r_producers import R

q = {"$db":"mydb", "$table":"mytable", "$query":[["$limit":10]]}
results = R.run_json(q)

Check the Reqon doc for the json query format specifications.

Screenshot

Data explorer screenshot

Todo

  • Merge django-changefeed into here
  • Add more query options: index, order, pluck, filters, etc..

Thanks

django-r's People

Contributors

synw avatar

Stargazers

Rafael Borges avatar Jonathan Barratt avatar Matías Agustín Méndez avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

jheanmarllos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.