pyappconf.py_config package

Submodules

pyappconf.py_config.generate module

pyappconf.py_config.generate.pydantic_model_to_python_config_file(model, imports, exclude_fields=())[source]

Generate a python config file from a pydantic model.

Parameters:

model (BaseModel) – The pydantic model.

Return type:

str

Returns:

The python config file.

pyappconf.py_config.generate.pydantic_model_to_python_config_stub_file(model, imports, exclude_fields=(), generate_model_class=False)[source]

Generate the stub file for the generated python config file from a pydantic model.

Parameters:

model (BaseModel) – The pydantic model.

Return type:

str

Returns:

The python stub file.