Turn Pydantic defined Data Models into CLI Tools
Fix friction point with argparse validation. Pydantic is now completely responsible for casting and validation.
Improve ergonomics by using cli=(short, long)
or cli=(long,)
in Field.
debug:bool = False
can be customized with (-d, --debug)
to negate the default value.x:bool
, or x:Optional[bool]
, x:Optional[bool] = None
semantics remain the same with (--enable-x, --disable-x)
format.Field
instead of Config.CLI_EXTRA_OPTIONS to have one consistent model