Skip to main content

Command line weather app

Project description

Weather Command

Tests Status pre-commit.ci status Coverage PyPI version PyPI - Python Version

A command line weather app

Installation

Installation with pipx is recommended.

pipx install weather-command

Alternatively Weather Command can be installed with pip.

pip install weather-command

Usage

First an API key is needed from OpenWeather, A free account is all that is needed. Once you have your API key create an environment variable named OPEN_WEATHER_API_KEY that constains your API key.

export OPEN_WEATHER_API_KEY=your-api-key

Each time the shell is restarted this variable will be cleared. To avoid this it can be added to your profile. For example if your shell is zsh the API key can be added to the ~/.zshenv file. Doing this will prevent the need to re-add the key each time the shell is started.

To get the weather for a city:

weather city seattle

Once installed you can also add aliases to your shell to make it quick to get a forecast. For example if your shell is zsh you can add something like the following to your ~/.zshrc file:

alias we="weather zip 98109 -i --am-pm"
alias wed="weather zip 98109 -i --am-pm -f daily"
alias weh="weather zip 98109 -i --am-pm -f hourly"

After adding this to the ~/.zshrc you will need to restart your terminal. After that typing we will get the current forecast, wed will get the daily forecast and weh will get the hourly forecast.

Examples

  • Current Weather

Current weather

  • Current Weather Temp Only

Current weather temp only

  • Daily Weather

Daily weather

  • Daily Weather Temp Only

Daily weather temp only

  • Hourly Weather

Hourly weather

  • Hourly Weather Temp Only

Hourl weather temp only

Settings

weather now has the ability to save settings to default certain flags. The list of possible settings can be seen with:

weather settings --help

Contributing

Contributions to this project are welcome. If you are interested in contributing please see our contributing guide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather_command-6.1.4.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather_command-6.1.4-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file weather_command-6.1.4.tar.gz.

File metadata

  • Download URL: weather_command-6.1.4.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.2.0-1012-azure

File hashes

Hashes for weather_command-6.1.4.tar.gz
Algorithm Hash digest
SHA256 899428973de6934b2fb42b3dc46ae35d08f852cf89c2ebd15cb72b1650bc2d7f
MD5 c3b9305c888595bb6cb660cc07f07672
BLAKE2b-256 5d860a37b58694b1851cf4d01cac295e2bc7dc6c173c803f3eae5c12f388a29a

See more details on using hashes here.

File details

Details for the file weather_command-6.1.4-py3-none-any.whl.

File metadata

  • Download URL: weather_command-6.1.4-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.2.0-1012-azure

File hashes

Hashes for weather_command-6.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c19992ee4d67083c54c206867513bcbc46a7baf6df43b19fdc150828e41aca5
MD5 13fc4603cc03899c94851d68c15d5a1d
BLAKE2b-256 456932d7833a6ad747b8103af62116160110d5cdc38ebfb500c142494520bc1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page