Skip to content

objects.py

Pydantic models, exceptions and default values.

ConfigData pydantic-model

A model holding configuration data.

data: ChainMap[str, Any] property readonly

The data object comes from different sources, sorted by priority.

dict_copy(v) classmethod

Make sure all dicts are copied.

Source code in copier/config/objects.py
126
127
128
129
130
131
132
133
134
135
136
@validator(
    "data_from_init",
    "data_from_asking_user",
    "data_from_answers_file",
    "data_from_template_defaults",
    pre=True,
    each_item=True,
)
def dict_copy(cls, v: AnyByStrDict) -> AnyByStrDict:
    """Make sure all dicts are copied."""
    return deepcopy(v)

EnvOps pydantic-model

Jinja2 environment options.

UserMessageError

Exit the program giving a message to the user.