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.
Gitfetch is a simple tool to get github user details

Gitfetch Just a (cli?) tool to get github user details 🙂 Installation 📂 Install Gitfetch via pypi pip install gitfetch or pip install git+https://g

I'm Not A Bot #Left_TG 7 Jan 23, 2022
commandline version of wordle game and my auto solver.

Wordle Machine (and Wordle Game) (in commandline) My implementation of the Wordle game (inspired by https://www.powerlanguage.co.uk/wordle/) and my in

Kevin Xu 11 Jan 03, 2023
GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

14 Dec 17, 2022
YouCompleteMe: a code-completion engine for Vim

YouCompleteMe: a code-completion engine for Vim Help, Advice, Support Looking for help, advice or support? Having problems getting YCM to work? First

24.5k Jan 06, 2023
A simple note taker CLI program written in python

note-taker A simple note taker program written in python This allows you to snip your todo's, notes, and your tasks easily without extra charges Requi

marcusz 4 Nov 02, 2021
A simple yet powerful timer and time tracker from the command line.

Focus Phase Focus Phase (FP) is a simple yet powerful timer and time tracker. It is a command-line application written in Python and can be installed

Ammar Alyousfi 13 Jan 13, 2022
A command line application, written in Python, for interacting with Spotify.

spotify-py-cli A command line application, written in Python, for interacting with Spotify. The primary purpose behind developing this app was to gain

Drew Loukusa 0 Oct 07, 2021
Tools hacking termux in the name ant-attack

Hello friends, I am ama.player0000. Web developer, software, Android command line (termux). (1)=Well, ant-attack tool is a tool to attack sites and disable them. (2)=You can use those CCTV servers, s

༺AMA.PLAYER༻ 1 Dec 17, 2021
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 03, 2021
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.

Interactive Redis: A Cli for Redis with AutoCompletion and Syntax Highlighting. IRedis is a terminal client for redis with auto-completion and syntax

2.2k Dec 29, 2022
Pequeno joguinho pra você rodar no seu terminal

JokenPython Pequeno joguinho pra você rodar no seu terminal Olá! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021
Task-manager-CLI with Priority Modification

Task-manager-CLI with Priority Modification The functions for the app have been written in task.py file. 1. Install Node.js This project requires Node

1 Jan 21, 2022
lazy_table - a python-tabulate wrapper for producing tables from generators

A python-tabulate wrapper for producing tables from generators. Motivation lazy_table is useful when (i) each row of your table is generated by a poss

Parsiad Azimzadeh 52 Nov 12, 2022
Command-line parsing library for Python 3.

Command-line parsing library for Python 3.

36 Dec 15, 2022
Objexplore is an interactive Python object explorer for the terminal.

Objexplore is an interactive Python object explorer for the terminal. Use it while debugging, or exploring a new library, or whatever! 9D1FAC73-B2A5-4

kylepollina 249 Dec 23, 2022
A terminal slots programme in PY

PYSlots PyPI and Test PyPI External Links PyPI Test PyPI Install Look directly at the bugs! Version pip install pyslots "Don't look directly at the bu

Luke Batema 4 Nov 30, 2022
A simple CLI application helps you to find giant files that are eating up your system storage

Large file finder Sometimes it's very hard to find if some giant files are eating up your system storage. We might need to hunt those down. This simpl

Rahul Baruri 5 Nov 18, 2022
Python-based implementation and comparison of strategies to guess words at Wordle

Solver and comparison of strategies for Wordle Motivation The goal of this repository is to compare, in terms of performance, strategies that minimize

Ignacio L. Ibarra 4 Feb 16, 2022
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 02, 2023
Simple command-line implementation of minesweeper

minesweeper This is a Python implementation of 2-D Minesweeper! Check out the tutorial here: https://youtu.be/Fjw7Lc9zlyU You start a game by running

Kylie 49 Dec 10, 2022