Skip to content

deuspaul/paulf-wlgbc-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


WeatherStatus API
Weather Status API

DescriptionHow To RunUnit TestLive Demo


Description

Simple API Application for the Wizeline Golang Bootcamp



How To Run

To clone and run this application, you'll need Git, python3.6+(https://nodejs.org/en/download/), python3-pip and flask 1.1.2+ installed on your computer. You will also need to register and obtain an API key from: https://openweathermap.org/api

From your command line run:

# Clone this repository
$ git clone https://github.com/deuspaul/paulf-wlgbc-api.git

# Go into the repository
$ cd paulf-wlgbc-api

# Create the file with the API Key
$ touch cred_wlgbc.py
apiKey = "<your api key>"

# Install required packages
$ pip3 install -r requirements.txt 

# Run the app
$ export FLASK_APP=main.py
$ flask run



Unit Tests

The unit test for this API is really simple, it just raises a type error in case the input for the get_cityweather function is not a string.

UnitTest

# Run the unit tests
$ python3 -m unittest test_main.py



Live Demo

Test Hello World endpoint: http://52.224.64.102:5000/ Test get_weather api endpoint: http://52.224.64.102:5000/weather/ for example: http://52.224.64.102:5000/weather/guadalajara

About

Simple API Application for the Wizeline Golang Bootcamp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages