Command line weather app
Project description
Weather Command
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 Temp Only
- Daily Weather
- Daily Weather Temp Only
- Hourly Weather
- Hourly 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for weather_command-6.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e5dff2148368c56cf92612a356fbf518aaad9cb41ee4ddf95287bead7f052c |
|
MD5 | 12fce3299e3a5e3505a7e54aa6b7b315 |
|
BLAKE2b-256 | f34a3a60c632a7c7629246bc52ae5dc830b0ad276a76b9a6b69def50e96557db |