Skip to content


Subversion checkout URL

You can clone with
Download ZIP
TheBigDB Python bindings.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

TheBigDB Python Wrapper

A simple python wrapper for making requests to the API of Full API documentation.


Just grab the file You'll only need to have the package requests intalled.

Simple usage

First, you need to initialize the class with:

from thebigdb import TheBigDB
thebigdb = TheBigDB()

The following actions return a dict object from the parsed JSON the server answered.

Search (api doc){"subject": {match: "James"}, "property": "job", "answer": "President of the United States"}){"subject": "London", "property": "population"}, {"period": {"on": "2007-06-05"}})

Create (api doc)

thebigdb.api_key = "your-private-api-key"

thebigdb.create({"subject": "iPhone 5", "property": "weight", "answer": "112 grams"})
thebigdb.create({"subject": "Bill Clinton", "property": "job", "answer": "President of the United States"}, {"period": {"from": "1993-01-20 12:00:00", "to": "2001-01-20 12:00:00"}})

Show (api doc), Upvote (api doc) and Downvote (api doc)"id-of-the-sentence")

thebigdb.upvote("id-of-the-sentence") # don't forget to set your API key
thebigdb.downvote("id-of-the-sentence") # don't forget to set your API key

That's it!

Response object

If you want more details on what has been received, you can check thebigdb.response after each request. It is the object returned by the requests package after each request.

It has several readable attributes:"id-of-the-sentence")
thebigdb.response.content       # String of the actual content received from the server
thebigdb.response.headers       # Dict of the headers received from the server

More details

Other Features

You can access other parts of the API in the same way as statements:

thebigdb.user(action, parameters)

# Examples
thebigdb.user("show", {"login": "christophe"})["user"]["karma"]


  • Python 2.7+


Don't hesitate to send a pull request !


First, install the required packages:

pip install -r requirements.pip

Then, run the tests in the file with:



  • bobtwinkles for creating the first version of this wrapper
  • The community for their invaluable feedback!
Something went wrong with that request. Please try again.