Following things are demoed:
✅ Receiving data from mock data (json file included) in an API.
✅ Receiving data from MySQL database (loaded from json file)
✅ Get live weather data for current day with an API.
✅ Usage of docker to orchestrate complete setup with mock data loaded.
🛡️ Live data from online weather service
🛡️ Fully Dockerized
🛡️ MySQL database used
🛡️ Synchronized data
🛡️ Restfull APIs
🛡️ Continuous testing with github actions. (see github actions history)
🛡️ Swagger document for trying APIs
🛡️ Minimal Frontend with React to see weather data and search for cities to see current weather.
git clone https://github.com/arindam31/Flask_Construction_Gis.git
cd Flask_Construction_Gis
For backend (create venv and activate it)
pip install -r requirements.txt
flask create-db
flask load-data
flask run
For frontend:
cd .\frontend\my-weather-app\
npm install
npm run dev
- Visit and browse API lists with Swagger docs: http://127.0.0.1:5000/apidocs/
- Visit the frontend and try searching cities: http://localhost:5173/
With docker (recommended):
docker compose -f docker-compose-all-service.yaml up --build
- Clone the project from github/gitlab
- Create a virtual environment.
python -m venv .venv
- Activate it (for windows)
.venv/Scrpts/activate
- Create a local database and populate data.
flask create-db flask load-data
- Test your setup
- Check for routes or run API tests
flask routes pytest -v
📌 The tests are located under /tests
.
pytest
pytest -s # To see prints too
pytest -s -k "keyword" # Run tests matching a keyword
📄 Detail documentation on sub topics are available in the docs/ directory.
👤 Arindam Roychowdhury