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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pokesummary-2.1.0.tar.gz.

File metadata

  • Download URL: pokesummary-2.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.12 Darwin/20.6.0

File hashes

Hashes for pokesummary-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b062fb8afbb35539af104ae192f29b28dc9b6de419607a54fabfed6c17ea479c
MD5 12bb393166635ab001e2d0558fd85f3a
BLAKE2b-256 697375a69dbcc8894637bbceb89606b94b0dc709d7aeaa48c8440ce21211819c

See more details on using hashes here.

File details

Details for the file pokesummary-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pokesummary-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.12 Darwin/20.6.0

File hashes

Hashes for pokesummary-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af2975d69f06316ce3163abaa03dfc662d8fdc8b9247e83241d910d20be08ed2
MD5 8e9a7d80298384cfccb5b9a9d9a85ba7
BLAKE2b-256 018159ecb7f886d23a75dd8b10fc2cf413694ac9a60da5cb4f9f29cd3cffbda8

See more details on using hashes here.

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