Running the Backend

Running on a local machine

This is a step-by-step description for running the backend in the case of the backend be installed locally on developer a machine.

  1. Make sure you installed everything according to Installation.

  2. Start the required component (i.e. the MQTT Broker and the Storage Proxy) refer to:

    1. Start the backend server:

      source $NRP_VIRTUAL_ENV/bin/activate
      python $HBP/nrp-backend/hbp_nrp_backend/hbp_nrp_backend/

      This will start the backend server running on If you wish to run the server on another port, you have to provide another argument

      source $NRP_VIRTUAL_ENV/bin/activate
      python $HBP/nrp-backend/hbp_nrp_backend/hbp_nrp_backend/ 9000


      use the aliases provided by $HBP/nrp-user-scripts/nrp_aliases: nrp-backend and nrp-backend-verbose. The virtual environment will be automatically activated.

    2. Use the NRP Frontend to clone a template experiment and to launch it. If ID of the experiment is known in advance, requests can be sent using any REST client (e.g. Postman or curl)


NRP Backend supports remote debugging two of the most common IDEs: Visual Studio Code and PyCharm. The aliases for running NRP Backend in debug mode, provided in $HBP/nrp-user-scripts/ are nrp-backend-debug-vscode and nrp-backend-debug-pycharm, respectively. When started in debug mode, NRP Backend will wait for the debugger connection on port 9991.

Below, a sample configuration from VScode’s launch.json file is listed:

    "name": "NRP Backend: Remote Attach",
    "type": "python",
    "request": "attach",
    "subProcess": true,
    "connect": {
        "host": "localhost",
        "port": 9991
    "justMyCode": false

Building the documentation

General documentation and Python API

The documentation and Python API (the pages you are currently reading) is created by:

cd $HBP/nrp-backend
make doc # index at build/html/index.html

Unit testing

After downloading Installation of the NRP and its components, you can run linting checks of the NRP Backend and related modules.

In order to run linter-check, there is a dedicated script

cd $HBP/nrp-backend
./ #make sure it is executable

In order to tests, there is a dedicated script

cd $HBP/nrp-backend
./ #make sure it is executable