Skip to main content

No project description provided

Project description

RichWx

A CLI tool to display weather alerts in the terminal using the Rich library. This is a for fun python package that leverages Rich, NWSAPy, and Click to display weather information in your terminal. Here's an example of when richwx alerts state TX is ran:

example alert

To install, it is (highly) recommended to create a virtual environment:

python -m venv env
source env/bin/activate

or on windows:

python -m venv env
./env/Scripts/activate

From here, install it using pip: pip install richwx. You can also install it directly into your base environment (i.e. without setting up a virtual environment), but it's generally good practice to not install anything to your local machine's base environment.

Open a new terminal and type: richwx intro - this will print out a nice little intro and confirm for you that the package works as intended. If you get errors, please open an issue.

User Agent

The user agent is highly encouraged by the National Weather Service API maintainers. It's essentially "metadata" that the maintainers would like to have in the event there's a security issue with the application; they use it as a method to contact you. This information is only stored within the environment. See the API docs for more information.

All user agent-related content can be found under auth (i.e. rich auth ...).

  • You can control what the user agent is set to by checking its value: richwx auth check.
  • You can set the value: richwx auth set [contact], where [contact] is your information.
  • To reset the value to it's default, use richwx auth purge.

It's always better safe than sorry, don't put any personal information here that you might not want in the wrong hands. This information is only sent to the API in a header format, but it is saved locally in the current environment.

Using RichWx

At any point, you can type --help to get additional information about the specific command. I.e. richwx alerts --help.

Alerts by State

The Alerts leverage the /alerts endpoint within the API. Simply

Type richwx --help to pull up a help menu. At any point, you can pull up a help menu by appending --help to the end of the command.

The only functionality that is implemented is alerts by state. That is: richwx alerts state [state]. You can input the full name of the state or the 2 letter abbreviation.

By adding the flag --show-id, the ID to the specific alert will show it's associated ID. This is necessary to be able to look at individual details of a specific alert.

Alerts by ID

If you get the alerts by ID (i.e. richwx alerts id [id]), you'll be able to pull up specific information about the alert:

example individual alert

Developers Note

That's it. That's the documentation. If you have questions, reach out to me. If there is enough community support, I will be more than happy to maintain the package and continue development with features the community would like to see.

I do also allow others to contribute to this package and make suggestions. If you would like to make a suggestion, please do not open an issue, but rather post in the ideas discussion board on GitHub.

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

richwx-0.0.3.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file richwx-0.0.3.tar.gz.

File metadata

  • Download URL: richwx-0.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for richwx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 21d9855bd344aba07d420d7217a74ffffafd671209292ebe1b5933c39226877b
MD5 d2e1206b68c90c00ee09e1646a0b92d5
BLAKE2b-256 734a6d42eab3424dbd68cc198d3925b7d0974f5533d3881d07e55d90a1970bed

See more details on using hashes here.

Supported by

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