This is a final project for UTSA CS5573 Cloud Computing course in Fall 2022. The project is built in Python with Flask framework and deployed by Google AppEngine. The web app is also capable of collecting metrics to perform statistics (i.e. number of times the web app was visited, and the most searched city for the weather forecast functions) by being connected to Google Cloud Firestore to which it automatically data and from which it gets data. The public URL for this application is here.
- app.yaml: the configuration file for Google AppEngine Deployment
- 'static' folder: where JS and CSS files are saved
- 'templates' folder: where all .html files are saved
- requirements.txt: the list of required framework/library and their versions to run this application on local host.
- main.py: the Flask application
- db.py: the Firestore database module
- Python 3.9+ or any latest version (see link for lastest download)
- 'requests' module: for API calls\
- Flask framework
- Google Cloud Firestore API
- Step 1: Create a virtual environment
$ mkdir your-local-repo
$ cd your-local-repo
$ python3 -m venv venv
- Step 2: Activate your virtual environment
$ .venv/bin/activate
- Step 3: Install Flask onto the virtual environment
$ pip install -r requirements.txt
In your terminal/cmd prompt, run
$ pip install Flask
$ pip install requests
$ pip install google-cloud-firestore
In your terminal/cmd prompt, run git clone https://github.com/ht-pham/weather-app.git
In your terminal/cmd prompt:
local-repo$ .venv/bin/activate
local-repo$ pip install -r requirements.txt
local-repo$ flask --app main run
After installing the required packages (Flask,requests, and google-cloud-firestore), in terminal:
- Change directory to where 'main.py' is located:
$ cd your-local-repo
- Run the program:
your-local-repo$ flask --app main run
Thank you to @RapidAPI for the free subcription for weather api.