Skip to content

Alm-4/WeatherAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather API

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.

Example

Error example

Requirements

  • Python v3.3+ (tested on v3.12)
  • Pip

Usage

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.

About

Weather API that fetches and returns weather data from a 3rd party API or from cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors