With this API you can get current weather forecast for different locations all over the world.
GET request to https://varvara-weather-forecast-bot.herokuapp.com/weather/api/v1.0/
Parameters:
location (str): Location
Returns:
{
location (str or None): Location
response (str or None): Verbal weather description
error (str, optional): Error description
}
$ curl -i -H "Content-Type: application/json" -X GET -d '{"location": "Red Square"}' https://varvara-weather-forecast-bot.herokuapp.com/weather/api/v1.0/
>> {"location":"Red Square","response":"Temperature: 13C, feels like: 12C, rain."}
$ curl -i -H "Content-Type: application/json" -X GET -d '{"location": "Natural History Museum, London"}' https://varvara-weather-forecast-bot.herokuapp.com/weather/api/v1.0/
>> {"location":"Natural History Museum, London","response":"Temperature: 20C, feels like: 21C, cloudy."}
$ curl -i -H "Content-Type: application/json" -X GET -d '{"location": "Piazza del Colosseo, 1, Roma"}' https://varvara-weather-forecast-bot.herokuapp.com/weather/api/v1.0/
>> {"location":"Piazza del Colosseo, 1, Roma","response":"Temperature: 26C, feels like: 28C, clear."}
$ curl -i -H "Content-Type: application/json" -X GET -d '{"location": "хупся"}' https://varvara-weather-forecast-bot.herokuapp.com/weather/api/v1.0/
>> {"error": "Error parsing location 'хупся' with geopy.", "location": "хупся", "response": null}
- Yandex Weather API: API with detailed weather info based on latitude and longitude
- geopy: Python library to convert string address to its latitude and longitude
- Flask API: Web application framework
- Docker: Tool for building containerized applications
- Heroku server: Cloud server platform
- Moesif: API Monitoring
- Guide to RESTful API with Flask
- Guide to Deploying a Flask app on Heroku
- Yandex Weather API Examples
- Heroku Port Binding
- Pre commit hooks
- Prometheus
- Grafana