Skip to content

Commit

Permalink
Update README.md with library usage
Browse files Browse the repository at this point in the history
  • Loading branch information
seasonedfish committed May 20, 2022
1 parent f6f8511 commit 69c8383
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ It requires no third-party libraries.


## Usage

### Command-line usage
```console
usage: pokesummary [-h] [-i] [-s] [-v] [pokemon_names ...]

Expand All @@ -26,6 +28,19 @@ optional arguments:
-v, --version show program's version number and exit
```

### Python library usage
Starting from version 2.0.0, you can use Pokésummary as a library.
Note that the API is subject to change.
```pycon
>>> from pokesummary.model import PokemonDict
>>> pokemon_data = PokemonDict().data
>>> my_pokemon = pokemon_data["Lanturn"]
>>> my_pokemon.base_stats.special_attack
76
>>> my_pokemon.primary_type
<PokemonType.WATER: 'Water'>
```

## Installation

### Requirements
Expand Down

0 comments on commit 69c8383

Please sign in to comment.