This API provides all the necessary endpoints to give access to specific informations to Surirobot.
-
Weather
- Forecast
-
News
- Google News
-
Cryptocurrencies
- CoinMarkerCap
- Python3
- Virtualenvwrapper
pip install virtualenvwrapper
- If you have some trouble with the command
workon
see : https://stackoverflow.com/questions/29900090/virtualenv-workon-doesnt-work
- Clone repository
- Create virtualenv
mkvirtualenv suri-api-services && workon suri-api-services
- Install dependencies
pip install -r requirements.txt
- If you wants to run the test suite:
pip install -r requirements-dev.txt
- Configure .env
cp .env.example .env
-
Option 1 - Drop your Google API credentials in res/credentials folder
- forecast.json - Forecast
- google.json - Google News
- coinmarketcap.json - CoinMarkerCap
-
Option 2 (suri-downloader) - Fill the login & password fields in env and do:
# Use export commands only if those inputs are not fulfilled in .env file
export $REMOTE_DATA_LOGIN=<value>
export $REMOTE_DATA_PASSWD=<value>
tools/get-credentials
- Run the dev server
./app.py
- Run the production server
gunicorn -w 4 -b 127.0.0.1:5000 wsgi:app
The Openapi spec and a postman collection are available in the doc
folder.
You can render the documentation by pointing your browser at the url given by the server.