DEV Community

Cover image for How to check the weather right from your terminal with Python
Stokry
Stokry

Posted on

How to check the weather right from your terminal with Python

Today I want to show you how to check the weather from your terminal. For this purpose, we are going to use cli-weather, a lightweight command-line app to get fast weather data right on the command line.

cli-weather is a command-line app to get instant real-time weather data by city name or postal code from any corner on earth right on the command line.

With cli-weather app you can retrieve current weather observations from over 45,000 live weather stations using WeatherBIT API, and highly localized weather forecasts for any point on the globe using the world's most trusted weather models such as GFS 13km, ECMWF, DWD 6.5km ICON-Europe, and NOAA 3km HRRR.!

Installation

cli-weather requires pip python package manager to install.

pip install cli-weather
Enter fullscreen mode Exit fullscreen mode

Basic Usage

cli-weather command [-h] [-a] [-d] [-f] [-c COUNTRY] [-u {M,S,I}] city_nmae/postal_cod
Enter fullscreen mode Exit fullscreen mode

This is our example:

enter image description here

Sweet, isn't it? :-)

Thank you all.

Top comments (2)

Collapse
 
mxglt profile image
Maxime Guilbert

Nice!

Collapse
 
stokry profile image
Stokry

Thanks!