/nsm-allvis

Primary LanguagePython

NSM Allvis API

Script for gathering most relevant data from NSM Allvis API written in python.

Input and Output

Output:

  • Console/stdout
  • JSON-file
  • Azure Cosmos DB (MongoDB API)

Build and Run

Instructions below are for Ubuntu 18.04 using Python 3.6.9 but should easily be converted to other operating systems and work on later versions of Python.

Linux

  1. Install Python

  2. Install pip3 and git

sudo apt-get install python3-pip git
  1. Install virtualenv
sudo pip3 install virtualenv
  1. Clone this git-project
git clone https://github.com/strompa/nsm-allvis
  1. Create new virtual env. We call it 'allvisenv'
virtualenv allvisenv --python=python3
  1. Activate the fresh environement
source allvisenv/bin/activate
  1. Install python requirements
pip install -r nsm-allvis/requirements.txt
  1. Use editor of choice and enter organisation API-ID and API-key for Allvis service in the script.
API_ID = 'apiid'
API_KEY = 'apikey'
  1. Configure outputs
  1. Run script
python3  nsm-allvis/allvis_api_v0_script_v01.py