Read this first

Pre-requisites

The project has been developed using Python 3.8. Therefore, in order to use it you need:

Python3

Install Python3 & pip on OS X

Python 3 installation guide for OS X: here

Install Python3 & pip on Linux

Python 3 installation guide for Linux: here

Install Python3 & pip on Windows

Python 3 installation guide for Windows: here

Virtualenv

After python3 and pip installation, it is highly recommended to create a Python virtual environment using the venv module

Clone project and install dependencies

You need to clone and access the root folder of the repository in order to follow the next sections:

git clone git@bitbucket.org:madeofgenes/genomcore-sdk-python.git && cd genomcore-sdk-python

Now, create and activate a Python virtual environment and install the required packages:

python3 -m venv env && source ./env/bin/activate && python -m pip install --upgrade pip wheel
python -m pip install -r requirements.txt

Tip

Upgrading pip and wheel is recommended to improve package installation.

Set environment variables

Environment variable BIOMED_ENV defines the target Biomed API. Taking as values: localdev, dev, staging and prod for, respectively, local API, development API, staging API and production API:

export BIOMED_ENV=localdev

Warning

jwt/PyJWT libraries

Pipelines using this library should NOT install the [jwt](https://pypi.org/project/jwt/) library. That’s because this library uses [PyJWT](https://pypi.org/project/PyJWT/): both get installed under the same name (jwt), and that can lead to collisions when running import jwt inside our python scripts.