Dynamic generation of informative `Enum`s in Python
Ignacio Vergara Kausel published on
3 min, 444 words
Since I started learning some Rust and getting to know its enums, I've been very into using
Enums in Python. And while enums in both languages are very different, they're close enough for most of my current use cases. Moreover, within Python,
Enums are used in frameworks like
Typer (CLI) and
FastAPI (API), where they are used to provide validation to input within a set of possibilities.