Skip to content

gruzewski/weather_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather API service

Simple Weather RESTfull API service that takes city and time period and returns min, max, average, and median temperature and humidity.

Local setup

Install all dependencies:

wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
pip install virtualenv
virtualenv -p python3 weather_virtenv
. weather_virtenv/bin/activate
git clone [email protected]:gruzewski/weather_service.git
cd weather_service
pip install -r requirements.txt

Next copy sample config and update API key:

cp sample_config.py config.py
vim config.py

Finally run it:

python app.py

Testing

To run all the tests:

nosetests tests/

I have used vcrpy to fake original weather api provider's response. If you want to use another provider (or something has changed in the current API response) you can delete tests/fixtures/vcr_cassettes/test_api_london and a new file will be created after the first run.

About

Simple API weather service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages