A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging.

Overview

wwy

A simple weather tool.

wwy

pypi openweathermap license

Installation

# Unix-like
pip3 install wwy

# Windows
pip install wwy

Usage

# wwy 
wwy tokyo

# wwy 
wwy tokyo,jp

# wwy  -u 
wwy tokyo -u imperial

Update

# Unix-like
pip3 install --upgrade wwy

# Windows
pip install --upgrade wwy

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 E.
Clint E.
Command-line interface to PyPI Stats API to get download stats for Python packages

pypistats Python 3.6+ interface to PyPI Stats API to get aggregate download statistics on Python packages on the Python Package Index without having t

Hugo van Kemenade 140 Jan 3, 2023
pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery.

pypinfo: View PyPI download statistics with ease. pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery. Installation pypin

Ofek Lev 351 Dec 26, 2022
pwy - A simple weather tool.

A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging. Name changed from wwy to pwy.

Clint 105 Dec 31, 2022
Install python modules from pypi from a previous date in history

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

Amar Paul 4 Jul 3, 2021
A command line tool made in Python for the popular rhythm game

osr!name A command line tool made in Python for the popular rhythm game "osu!" that changes the player name of a .osr file (replay file). Example: Not

null 2 Dec 28, 2021
(BionicLambda Universal SHell) A simple shell made in Python. Docs and possible C port incoming.

blush ?? (BionicLambda Universal SHell) A simple shell made in Python. Docs and possible C port incoming. Note: The Linux executables were made on Ubu

null 3 Jun 30, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
The easiest way to create beautiful CLI for your programs.

The Yandere is a program written in Python3, allowing you to create your own beautiful CLI tool.

Billy 31 Dec 20, 2022
NudeNet wrapper made to provide a simple cli interface to the library

Nudenet Wrapper. Small warpper script for NudeNet Made to provide a small and easy to use cli interface with the library. You can indicate a single im

null 1 Oct 20, 2021
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget

Currently, all the work is being done inside the refactoring branch. pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget P

Everton Correia 45 Dec 11, 2022
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli.

ABOUT A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Janardon Hazarika 17 Dec 11, 2022
A useful and easy to use Terminal Timer made with Python.

Terminal SpeedCubeTimer Installation ¡No requirements! Just Download and play Usage Starts timer.py and you will see this. python timer.py Scramble

Achalogy 5 Dec 22, 2022
A CLI Password Manager made using Python and Postgresql database.

ManageMyPasswords (CLI Edition) A CLI Password Manager made using Python and Postgresql database. Quick Start Guide First Clone The Project git clone

Imira Randeniya 1 Sep 11, 2022
CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

null 1 Jan 10, 2022
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Timo Furrer 659 Dec 28, 2022
A simple command line tool written in python to manage a to-do list

A simple command line tool written in python to manage a to-do list Dependencies: python Commands: todolist (-a | --add) [(-p | --priority)] [(-l | --

edwloef 0 Nov 2, 2021
A simple Python CLI tool that draws routes/paths on a given map.

Map Router A simple Python CLI tool that draws routes/paths on a given map. Index Installation Usage Docs Why? License Support Installation Coming soo

Pedro Morim 1 Nov 7, 2021