Command Line Overwrites
PyToolConfig allows you to parse command line overwrites for configuration items in the base table/model.
- In the Configuration Model, set the
command_line
value in theField
constructor. (This only works for items in the base model) For example:
from pytoolconfig import dataclass, field @dataclass class NestedModel: foo_other: str = field(description="w", default="no", command_line=("--foo", "-f"))
- In the Configuration Model, set the
Pass an Argument Parser to the
PyToolConfig
constructor(Optional) Pass arguments to the
parse()
command