Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 1.6 KB

README.md

File metadata and controls

73 lines (54 loc) · 1.6 KB

API Services

PyPI - Python Version

This API provides all the necessary endpoints to give access to specific informations to Surirobot.

Features

  • Weather

    • Forecast
  • News

    • Google News
  • Cryptocurrencies

    • CoinMarkerCap

Requirements

Installation

  • 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

Docs

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.