Skip to content

Python + Flask based API check and evaluator for weather comparison

Notifications You must be signed in to change notification settings

cgmafia/WeatherIndexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test to check the weather

This API respose has been developed according to the requirement I have taken the index city as Cologne for rival comparison

Requirements & Installation

  • Python 3.9+
  • Flask
  • Pytest

Steps to install

  1. Make sure you have Python 3.9 and above installed
  2. cd to this directory
  3. create a .env file in the root with following parameters:
    OpenWeatherAPI=http://api.openweathermap.org/data/2.5/weather
    API_KEY=Your API key
    INDEX_CITY = City you want to index with
  1. To install all the requirements, run pip install -r requirements.txt
  2. To run the API run python api.py
  3. To run tests run python -m pytest

Endpoints

Response

REST API with Json response looks like this

{
    "check": true,
    "criteria": {
        "daytemp": false,
        "naming": true,
        "rival": true
    }
}

About

Python + Flask based API check and evaluator for weather comparison

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages