Script for gathering most relevant data from NSM Allvis API written in python.
Output:
- Console/stdout
- JSON-file
- Azure Cosmos DB (MongoDB API)
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.
-
Install Python
-
Install pip3 and git
sudo apt-get install python3-pip git
- Install virtualenv
sudo pip3 install virtualenv
- Clone this git-project
git clone https://github.com/strompa/nsm-allvis
- Create new virtual env. We call it 'allvisenv'
virtualenv allvisenv --python=python3
- Activate the fresh environement
source allvisenv/bin/activate
- Install python requirements
pip install -r nsm-allvis/requirements.txt
- Use editor of choice and enter organisation API-ID and API-key for Allvis service in the script.
API_ID = 'apiid'
API_KEY = 'apikey'
- Configure outputs
- Run script
python3 nsm-allvis/allvis_api_v0_script_v01.py