Weather forecast microservice for Tomoru.
Install dependencies using pip:
pip install -r requirements.txt
or Poetry:
poetry install
Poetry will install dev-dependencies as well. So use that if you are planning to contribute.
Run using Gunicorn:
gunicorn weerman.app:app
Go ahead and make a request:
http GET http://127.0.0.1:8000/current-weather city==Vladivostok
You should get this response:
HTTP/1.1 200 OK
Connection: close
Content-Length: 271
Content-Type: application/json
Date: Sat, 08 Aug 2020 03:10:27 GMT
Server: gunicorn/20.0.4
{
"condition": "Облачно с прояснениями",
"feels_like": 22.95,
"humidity": 73,
"maximum_temperature": 22,
"minimum_temperature": 22,
"pressure": 756.0,
"temperature": 22,
"wind_speed": 2
}
I have used HTTPie for this example.