/get-weather-example

You can get the weather using Reservamos and Openweather APIs. You need a Openweather API Key

Primary LanguagePython

Introduction

Clone this repo. You will need set a open weather map api key in order to run correctly this repo. This api manage if the open weather api key has reached limit.

Create python virtual environment. Tested in python 3.11 [In this case .venv is the name I prefer but could be other]

python -m venv .venv

Activate python virtual environment

source .venv/bin/activate

Create .env file

Copy .env.test to .env and provide real values to OPEN_WEATHERMAP_KEY

Install packages

pip install -r requirements.txt

Run migrations

python manage.py migrate

Run server

python manage.py runserver

Open in browser

Open localhost:8000/?city=mex or click in this link

To run tests, in console run

pytest .

Image

image