Skip to main content

An easy-to-use, informative command line interface (CLI) for accessing Pokémon summaries.

Project description

Pokésummary

In the heat of a Pokémon battle, Pokésummary lets you quickly get the information you need!

Pokésummary is an easy-to-use, informative command line interface (CLI) for displaying Pokémon height, weight, types, base stats, and type defenses. It works completely offline, opting to use local datasets instead of APIs. It requires no third-party libraries.

image

Usage

Command-line usage

The simplest example is passing a Pokémon name as an argument. Here, we want to display Bulbasaur's summary, so we pass bulbasaur as an argument.

pokesummary bulbasaur

Multiple Pokémon names can be chained. Now, we pass the names of Bulbasaur's whole evolution line. Note that Pokémon names consisting of multiple words (e.g. Mega Venusaur) must be surrounded by quotation marks.

pokesummary bulbasaur ivysaur venusaur "mega venusaur"

If you would like to run pokesummary interactively, use the -i flag. Now we can type several Pokémon names, hitting Enter after each one. Use Ctrl-D (EOF) to exit.

pokesummary -i

Since the -i flag reads from standard input, we can pipe Pokémon names to it. If we have a file pokemon_names.txt filled with Pokémon names (each separated by newline), we can use the following to display each of their summaries.

cat pokemon_names.txt | pokesummary -i

Python library usage

Starting from version 2.0.0, you can use Pokésummary as a library.

>>> from pokesummary.model import PokemonDict
>>> pokemon_dict = PokemonDict()
>>> my_pokemon = pokemon_dict["Lanturn"]
>>> my_pokemon
Pokemon(name='Lanturn', classification='Light Pokémon', height=1.2, weight=22.5, primary_type=<PokemonType.WATER: 'Water'>, secondary_type=<PokemonType.ELECTRIC: 'Electric'>, base_stats=PokemonBaseStats(hp=125, attack=58, defense=58, special_attack=76, special_defense=76, speed=67))

Installation

Requirements

  • Python 3.7+
  • A terminal supporting ANSI escape codes (most Linux and macOS terminals, see here for Windows)

Install from PyPI

  1. Install using pip
pip3 install pokesummary

Install from Source Code

  1. Clone or download the repository
  2. Install using pip
pip3 install .

Uninstall

  1. Uninstall using pip
pip3 uninstall pokesummary

Contributing

Please see CONTRIBUTING.md.

Acknowledgements

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

pokesummary-2.1.0.tar.gz (34.2 kB view hashes)

Uploaded Source

Built Distribution

pokesummary-2.1.0-py3-none-any.whl (34.4 kB view hashes)

Uploaded Python 3

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