Skip to content

Commit

Permalink
(#25) pokedex#22: "adds structural info to readme"
Browse files Browse the repository at this point in the history
  • Loading branch information
withtwoemms committed Feb 27, 2024
1 parent de54305 commit 0820412
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Expand Up @@ -2,6 +2,27 @@
a tool for sourcing info about different Pokémon from the [PokéAPI](https://pokeapi.co/)


### Overview

API requests are to the Pokedex API using the console script entrypoint.
The console script leverages functions within the `pokedex.client` module.
This module relies agnostically on the contents of the `pokedex.api.request` package:
```
pokedex/api/request/
├── __init__.py
├── implementations
│   ├── __init__.py <-- Implementation bindings here!
│   ├── cached.py
│   ├── default.py
│   └── ...
└── protocol.py
```
Therein, a protocol is defined.
This protocol definition serves as the structural "template" for how different types of requests can be implemented.
Implementations have their own module (for clarity) and are "registered" for use outside of the package by the `ApiRequest` enum.
Environment variables can be used with the console script entrypoint to bind an implementation at runtime(_see ["Usage" section](#usage)_).
When new implementations have been deployed, choice of implmentation is made as simple as changing the environment.

### Setup

This project uses [`poetry`](https://python-poetry.org/) as it's build tool.
Expand All @@ -24,7 +45,6 @@ For example, the following runs tests, coverage, and linting:
poetry run check
```


### Usage

There exists a `poetry` buildscript called `get-pokemon`.
Expand All @@ -33,5 +53,3 @@ It can be invoked like so:
```
poetry run get-pokemon by --type ghost
```

pipe to `less`

0 comments on commit 0820412

Please sign in to comment.