Show the current weather for any city.
To build and run this project using docker and docker-compose simply run:
echo "DEBUG=False
SECRET_KEY='oneOfTheMostSecureSecretsInTheWorld'
OPEN_WEATHER_MAP_API_KEY='your api key from OWM'
MEMCACHED_URL=memcached:11211
CACHE_TTL=60" >> .env
docker-compose up -d- replace
OPEN_WEATHER_MAP_API_KEYAndSECRET_KEYwith your own string in.envfile
then open your browser and navigate to http://localhost:8000
GET /api/v1/weather/city/${city_name}?LANG=${LANGUAGE_CODE}| Parameter | Type | Description |
|---|---|---|
city_name |
string |
Required. Id of item to fetch |
LANG |
string |
Optional. lang code. e.g: es |
Returns weather information by desired language.
run the blow command for testing service
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py testTesting includes selenium firefox webdriver, so make sure that you have the geckodriver in your os PATH and Firefox browser is installed on your computer.