bday-boy / aiokemon

An asynchronous Python wrapper for making PokéAPI requests.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Make all PokeAPI endpoints into dataclasses #12

Open bday-boy opened 1 year ago

bday-boy commented 1 year ago

This would make all endpoint classes in aiokemon truly have the attributes they are hinted to have. However, this would also be a bit of a pain to implement as it would require matching all JSON response keys to the exact names of the dataclass attributes.

bday-boy commented 1 year ago

If this never happens, at least cut down on the bloat that makes classes take up so much memory. In particular, maybe move as_resource into the PokeAPISession class instead, or just completely remove it altogether.