Coder Social home page Coder Social logo

weather_forecast_bot's Introduction

weather_forecast_bot

With this API you can get current weather forecast for different locations all over the world.

API description

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
}

Command line usage examples

$ 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}

Used technology stack

  1. Yandex Weather API: API with detailed weather info based on latitude and longitude
  2. geopy: Python library to convert string address to its latitude and longitude
  3. Flask API: Web application framework
  4. Docker: Tool for building containerized applications
  5. Heroku server: Cloud server platform
  6. Moesif: API Monitoring

Useful tutorials

  1. Guide to RESTful API with Flask
  2. Guide to Deploying a Flask app on Heroku
  3. Yandex Weather API Examples
  4. Heroku Port Binding

TODO

  1. Pre commit hooks
  2. Prometheus
  3. Grafana

weather_forecast_bot's People

Contributors

varvarvarvar avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.