A weather API that fetches and returns weather data from a 3rd party API or cache.
The 3rd party api used is the visual crossing weather api.
Caching is done using redis with its python client redis-py.
- Python v3.3+ (tested on v3.12)
- Pip
Add an API key and a redis connection url (use "redis://localhost:6379/0" for a default local cache setup) to the .env.example file.
Then run these commands from within the project folder/directory:
Bash:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 main.py
CMD:
python -m venv .venv
call .venv\Scripts\activate.bat
pip install -r requirements.txt
python main.py
Powershell:
python -m venv .venv
call .venv\Scripts\activate.ps1
pip install -r requirements.txt
python main.py
And go to http://127.0.0.1:5000 in a modern browser.

