Skip to content

Demo python package of a CLI application fetching and displaying weather data for a given city.

Notifications You must be signed in to change notification settings

LoicRiegel/demo-weather-app

Repository files navigation

Weather app (demo project)

Demo python package of a CLI application fetching and displaying weather data for a given city.

Install

git clone
cd weather
pip install .

Usage

Usage: weather [OPTIONS] CITY

Arguments:
*    city       TEXT                The city for which to display the weather forecast [default: None] [required]
Options:
*  --unit       [metric|imperial]   Units to use for weather data [default: metric]
*  --help                           Show this message and exit.

This app uses OpenWeatherMap service to fetch the weather information. To use this app, you first need to create a personal API key (see here).

Do once:

export OPENWEATHERMAP_KEY=<YOUR_API_KEY>

Then:

weather --help
weather London
weather London --unit metric

Contributing

Use pre-commit hooks which will run the ruff linter and formatter, and run the mypy type-checker:

pre-commit install

Run unit tests

pytest

About

Demo python package of a CLI application fetching and displaying weather data for a given city.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages