Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 900 Bytes

universal_config.rst

File metadata and controls

25 lines (16 loc) · 900 Bytes

Universal Configuration

Universal Configuration refers to configuration keys given by pytoolconfig. You can overwrite your own configuration keys with the ones provided by pytoolconfig.

In your configuration model, set the universal_config value in the Field constructor. (This only works for items in the base model). You still need to set a default value. For example:

from pytoolconfig import dataclass, field, UniversalKey


@dataclass
class NestedModel:
    foo_other: str = field(
        description="w", default="no", universal_config=UniversalKey.min_py_version
    )

The value of this field will be overwritten by pytoolconfig's equivalent universal configuration field.

Available configuration keys:

.. autopytoolconfigtable:: pytoolconfig.universal_config.UniversalConfig