Skip to main content

pwy

A simple weather information tool.


Table of Contents

Features

  • ASCII art
  • Display weather information
    • The name of the location.
    • Temperature (and what the temperature feels like).
    • Weather and weather description.
    • Wind pressure, humidity, wind direction, and wind speed.
    • Time and timezone of the location.

Dependencies

  • OpenWeatherMap API key
  • Python 3.10 or higher
    • requests
    • rich
  • Internet connection

Installation

Pip install

Unix-like | Windows

pip install pwy

Manual/Git install

Unix-like | Windows

Download the latest pwy package here and uncompress it. Go to pwy directory.

cd pwy

Install pwy.

pip install .

Configuration

Unix-like | Windows

Before you can use pwy, you need to configure pwy. Run the command below and fill the required files, these fields are for the OWM API key, location, unit, and language.

pwy

After you're through, the pwy.json (~/.config/pwy.json for Unix-like and pwy.json for Windows) config file, containing your OWM API key, location, unit, and language, will be generated.

Get your OWM key by signing up.

If you want to edit your pwy configuration.

pwy --config

Usage

Unix-like | Windows

To display weather in your current city (from pwy.json).

pwy

To display weather in your current city.

pwy tokyo

You can also specify what country you are in by.

pwy tokyo,jp

To display weather with specific unit of measurement. By default the unit is Metric system.

pwy tokyo --unit imperial

To display weather with specific language.

pwy tokyo --lang ja

To display help information.

pwy --help

Availabe options

usage: __main__.py [-h] [-c] [-u] [-l] [-v] [location ...]

pwy - A simple weather information tool

positional arguments:
  location        input location

options:
  -h, --help      show this help message and exit
  -c, --config    configure pwy
  -u, --unit  input unit
  -l, --lang  input language
  -v, --version   show program's version number and exit

Update

Unix-like | Windows

pip install --upgrade pwy

Development

# Create a virtual environment and enable it.
python3 -m venv
. env/bin/activate

# Install dependencies.
pip install -r requirements.txt

Changelog

View Changelog.

Credits

License

This program is provided under the MIT License.

Metadata

Release files for pwy 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pwy 2.1.2
File Interpreter ABI Platform
pwy-2.1.2-py3-none-any.whl Python 3 none any Details

Release files / pwy-2.1.2-py3-none-any.whl

Download URL pwy-2.1.2-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2d54d9ef798bfd27fc8e4d7d53d16c62336aca08ab6718819508a7994aff9ff
BLAKE2b-256 checksum
How to use checksums
e7c012adc3263cbe8736591843f9f1c65fb277b3ece2ef17d1b91f53a2783851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

2.1.2 This release

1 release file

1.4.7

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page