pwy - A simple weather tool.

Related tags

Command-line Toolspwy
Overview

pwy

A simple weather tool.


Table of Contents

Dependencies

  • python - 3.5 or greater
  • requests - for fetching HTTP requests

Installation

Unix-like

pip3 install pwy

Windows

pip install pwy

Usage

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

Update

Unix-like

pip3 install --upgrade pwy

Windows

pip install --upgrade pwy

Credits

License

Made by Clint E. This program is provided under the GPL-3.0 License.

Comments
  • Error when fetching weather

    Error when fetching weather

    With the latest available on pip:

    $ wwy kolkata
    Traceback (most recent call last):
      File "/usr/local/bin/wwy", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 146, in main
        display_weather_info(info)
      File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 118, in display_weather_info
        for line in ascii:
    TypeError: 'NoneType' object is not iterable
    
    opened by jarun 8
  • name 'light_rain' is not defined

    name 'light_rain' is not defined

    getting the following error:

    $ wwy -c kolkata  
    Traceback (most recent call last):
      File "/usr/local/bin/wwy", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 92, in main
        get_ascii(info)
      File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 69, in get_ascii
        for i in range(len(light_rain)):
    NameError: name 'light_rain' is not defined
    

    Please fix.

    opened by jarun 5
  • Missing ~/.pwrc?

    Missing ~/.pwrc?

    I've used pwy for a while to make a quick check on a sibling living in Japan. I tried it yesterday and got the following

    Traceback (most recent call last):
      File "/home/user/.local/bin/pwy", line 8, in <module>
        sys.exit(main())
      File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 202, in main
        info = get_weather_data(location, unit, lang)
      File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 35, in get_weather_data
        f"&appid={get_key()}&units={unit}&lang={lang}")
      File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 20, in get_key
        with open(f"{home}/.pwyrc") as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.pwyrc'
    

    Obviously missing a .pwyrc, but what should I put there? I don't see it on the github page. I tried uninstalling and reinstalling both via pip3 and cloning the repo. Same issue. Any help appreciated.

    opened by gr4kk3r 3
  • Invalid API key

    Invalid API key

    Hi, I've created my API key and I've done pwy --config <api-key>, but when I do, say, pwy montreal, I see the following error:

    Invalid API key.
    Traceback (most recent call last):
      File "/data/dev/pytools/pwy/bin/pwy", line 8, in <module>
        sys.exit(main())
      File "/data/dev/pytools/pwy/lib/python3.9/site-packages/pwy/cli.py", line 202, in main
        info = get_weather_data(location, unit, lang)
      File "/data/dev/pytools/pwy/lib/python3.9/site-packages/pwy/cli.py", line 52, in get_weather_data
        "name": data["name"],
    KeyError: 'name'
    
    opened by farzadmf 3
  • Publish release assets for package building

    Publish release assets for package building

    If you could, I would appreciate it if you could upload zip and/or tar.gz files as releases so this can be built with python-setuptools and installed with a package manager. Please also include the api key in key.py in the compressed assets or add a switch so we can use our own openweathher api keys. Thanks.

    opened by CultofRobots 2
  • NameError: name 'pwy_jsoon' is not defined.

    NameError: name 'pwy_jsoon' is not defined.

    Running on Windows 10 I receive the follow error when attempting to run pwy version 1.4.6:

      File "C:\Users\User\scoop\apps\python\3.10.0\lib\site-packages\pwy\cli.py", line 38, in get_config_data
        data = json.load(pwy_jsoon)
    NameError: name 'pwy_jsoon' is not defined. Did you mean: 'pwy_json'?
    
    opened by patevs 0
  • Support for environment variable with location name

    Support for environment variable with location name

    Will it be possible to support an environment variable (e.g. LOCATION) similar to BROWSER to indicate the location when the positional argument is missing?

    Something in the lines of:

    LOCATION="New York" pyw
    

    Looking for it for better nnn integration. When I do:

    export NNN_HELP= pyw New York
    

    and exec NNN_HELP as a command, I get an error because of the space in New York.

    opened by jarun 3
Releases(2.1.2)
  • 2.1.2(Dec 25, 2022)

    • Changed license from GPLv3 to MIT.
      • Added MIT License notice to source code files
    • Added requirements.txt
    • Removed unused codes
    • Implemented comprehensions
    • Formatted with autopep8
    • Added .vscode settings
    Source code(tar.gz)
    Source code(zip)
  • 1.4.7(Dec 1, 2021)

  • 1.4.5(Nov 8, 2021)

    • Replaced pwyrc with pwy.json.
      • pwy.json
        • Set OWM API key.
        • Set default location.
        • Set default unit.
        • Set default language.
    • Ability to display weather using the pwy command.
      • pwy reads the values set in the pwy.json file.
      • If there is/are arguments, pwy will satisfy the arguments.
    • Minor code cleanup.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.4(Sep 30, 2021)

  • 1.4.3(Sep 26, 2021)

    • Added default value to the arguments and removed the unnecessary if else.
    • Removed the unnecessary f-strings
    • Added sys.exit(1).
    • Moved .pwyrc to ~/.config/pwyrc (in Unix-like OS).
    • Minor code refactor.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.2(Sep 17, 2021)

    • Moved main.py to cli.py.
    • Added _version.py.
    • Added --version argument.
    • Remove key.py.
    • Added --config argument to setup pwy.
    • API key is now stored in .pwyrc.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Jun 26, 2021)

    1.4.0 - 2021.06.26

    • Separated get_ascii() and get_weather_translation().
    • Removed the output labels.
    • Added main.py
    • Added zip and tar.gz archives for manual installation.
    Source code(tar.gz)
    Source code(zip)
Owner
Clint
Clint
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 09, 2022
Professor Wordlist is a free open source command line tool written in python

Professor Wordlist is a free open source command line tool written in python, With the aim of generating custom wordlists with a variety of unique parameters and functions providing many possibilitie

オークO A K Z E H オーク 1 Oct 28, 2021
Un module simple pour demander l'accord de l'utilisateur dans une CLI.

Demande de confirmation utilisateur pour CLI Présentation ask_lib est un module pour le langage Python proposant une seule fonction; ask(). Le but pri

CallMePixelMan 7 May 09, 2022
PyWordle: A Python-made wordle manual solver

PyWordle: A Python-made wordle manual solver How to use it Start the program with python3 pywordlesolver.py. How it works The program has a simple 5-l

Federico Torrielli 5 Nov 24, 2022
Universal Command Line Interface for Amazon Web Services

This package provides a unified command line interface to Amazon Web Services.

Amazon Web Services 13.3k Jan 07, 2023
Command Line Based Todo Script

Todo-CLI Features Full-Fledged Command Line Based Todo List with the following features planned: Interactive Interface OS Notifications Save and Remov

DSC IIEST 5 Nov 17, 2021
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

37 Dec 15, 2022
Play WORDLE game in your terminal.

Wordle TUI Play WORDLE game in your terminal. The game will be kept the same as the Web version. Prerequisites Python 3.7+ Linux/MacOS (Windows is not

Frost Ming 61 Oct 30, 2022
Openstack bucket retention cli

Openstack bucket retention cli

Fatih Sarhan 3 Apr 03, 2022
Project scoped command execution to just do your work

Judoka is a command line utility that lets you define project scoped commands and call them through their alias. It lets you just do (= judo) your work.

Eelke van den Bos 2 Dec 17, 2021
Dynamically Generate GitHub Stats as like Terminal Interface

GitHub Stats Terminal Style Dynamically Generate GitHub Stats as like Terminal Interface Usage Create a New Repository using this Template or click he

YOGESHWARAN R 63 Jan 03, 2023
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
Ssl-tool - A simple interactive CLI wrapper around openssl to make creation and installation of self-signed certs easy

What's this? A simple interactive CLI wrapper around openssl to make self-signin

Aniket Teredesai 9 May 17, 2022
tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Alexander Rudy 3 Jan 10, 2022
🎈 `st` is a CLI to quickly kick-off your new Streamlit project

🎈 st - a friendly Streamlit CLI st is a CLI that helps you kick-off a new Streamlit project so you can start crafting the app as soon as possible! Ho

Arnaud 18 Dec 19, 2022
kitty - the fast, feature-rich, cross-platform, GPU based terminal

kitty - the fast, feature-rich, cross-platform, GPU based terminal

Kovid Goyal 17.3k Jan 04, 2023
Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

0 Oct 04, 2021
This is a tool for managing file notes through the command line

This is a tool for managing file notes through the command line

2 Jun 22, 2022
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments

Secretum Inc. 16 Oct 15, 2022