Welcome to my live weather viewing application ! This is a static web-application that connects to OpenWeather API and displays live weather or 30 day forecast of over 200000 cities globally. This project is made using python programming language and flask web-framework.
- Download this repository to your local machine.
$ git clone https://github.com/Dhruvbam/Live_Weather_App
- Open this folder in your terminal/cmd prompt and run the following code:
$ flask run
- You should see a localhost server running, copy this address into any browser to begin.
- The landing page consists of a form that asks for city and scale details.
- Weather data is displayed after filling the form.
- Weather data - Max/Min temp, current temp, freindly icon, weather description.
- A quote unique to different weather types is also displayed.
- A map is pulled from Open Steet API where as weather data is pulled from Open Weather API
- This is a freindly app that handles all common errors and redirects user to proper webpages.
app.py
: Program entry pointauthentication.py
: Makes requests to the OpenWeather API and returns json data in Python Dictionary Format.customDictionary.py
: This module creates a custom dictionary of data for different webpages.index.html & weather.html
: Display dynamic data from form fields using POST Http request method.
-
Learning Outcomes
- Learned more about API requests, how to parse JSON data and manipulate it.
- Learned more about HTML, CSS use with Jinja2 tools to parse variables to display dynammic data.
- Learned more about Python Web Application enviornment, HTTP Requests and authentication.
- Learned more about Map Data from passing from in HTML and using JavaScript.
-
OpenWeather API Documentation
-
Open Layers Maps API Documentation
-
Python & Flask