The Weather Report proxy server is to be used with the Weather Report web app project
-
Clone this repository. You do not need to fork it first.
git clone https://github.com/AdaGold/weather-report-proxy-server.git
-
Create and activate a virtual environment
$ python3 -m venv venv $ source venv/bin/activate -
Install the
requirements.txt(venv) $ pip install -r requirements.txt
-
Create a
.envfile with your API keys# .env # LocationIQ API key LOCATION_KEY="replace_with_your_api_key" # OpenWeather API Key WEATHER_KEY="replace_with_your_api_key"
-
Run the server
(venv) $ flask run --debug
| Route | Query Parameter(s) | Query Parameter(s) Description |
|---|---|---|
GET /location |
q |
Free-form query string to search for. For Weather Report, this should be the city name. |
GET /weather |
lat & lon |
Geographical coordinates (latitude, longitude) |