Quickstart / Installation¶
The instructions below were tested on Ubuntu 16.04 LTS. They should also work on other Linux distributions and on macOS. For other operating systems, we recommend using an Ubuntu virtual machine (VM).
The BigchainDB Python Driver depends on:
- Python 3.5+
- A recent Python 3 version of
- A recent Python 3 version of
- cryptography and cryptoconditions
If you’re missing one of those, then see “How to Install the Dependencies” below before proceeding.
Next, to install the latest stable BigchainDB Python Driver (
$ pip3 install bigchaindb_driver
If you want to install an Alpha, Beta or RC version of the Python Driver, use something like:
$ pip3 install bigchaindb_driver==0.5.0a4
The above command will install version 0.5.0a4 (Alpha 4). You can find a list of all versions in the release history page on PyPI.
How to Install the Dependencies¶
Dependency 1: Python 3.5+¶
The BigchainDB Python Driver uses Python 3.5+. You can check your version of Python using:
$ python --version OR $ python3 --version
Dependency 2: pip¶
You also need to get a recent, Python 3 version of
pip, the Python package manager.
If you’re using virtualenv or conda, then each virtual environment should include an appropriate version of
You can check your version of
$ pip --version OR $ pip3 --version
pip was at version 9.0.0 as of November 2016.
If you need to upgrade your version of
then see the pip documentation.
Dependency 3: setuptools¶
Once you have a recent Python 3 version of
pip, you should be able to upgrade
$ pip install --upgrade setuptools OR $ pip3 install --upgrade setuptools
Dependency 4: cryptography and cryptoconditions¶
- cryptography depends on libssl, libcrypto which also depends on (Python development library and header files).
- cryptoconditions depends on PyNaCl (Networking and Cryptography library) which depends on
On Ubuntu 14.04 and 16.04, this works:
$ sudo apt-get update $ sudo apt-get install python3-dev libssl-dev libffi-dev
For other operating systems, please refer to the cryptography installation guide.
Installing the Driver¶
Now you can install the BigchainDB Python Driver (
$ pip install bigchaindb_driver OR $ pip3 install bigchaindb_driver
Installation Guide for Developers¶
Here’s how to set up bigchaindb-driver for local development.
Fork the bigchaindb-driver repo on GitHub.
Clone your fork locally and enter into the project:
$ git clone [email protected]:your_name_here/bigchaindb-driver.git $ cd bigchaindb-driver/
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests. For the tests, you’ll need to start the MongoDB, Tendermint and BigchainDB servers:
$ docker-compose up -d bigchaindb
$ docker-compose run --rm bigchaindb-driver flake8 bigchaindb_driver tests
To run the tests:
$ docker-compose run --rm bigchaindb-driver pytest -v
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
- Submit a pull request through the GitHub website.