Configuration
- pydantic settings Config[source]
Project configuration.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
Show JSON schema
{ "title": "Config", "description": "Project configuration.", "type": "object", "properties": { "base_path": { "title": "Base Path", "description": "Directory the config was loaded from, used to resolve relative paths.", "env_names": "{'base_path'}", "type": "string", "format": "path" }, "root_sass_file": { "title": "Root Sass File", "description": "Scss stylesheet with the style for the whole application.", "env_names": "{'root_sass_file'}", "type": "string" }, "root_qss_file": { "title": "Root Qss File", "description": "Qss stylesheet with the style for the whole application, generated from 'root_sass_file'.", "env_names": "{'root_qss_file'}", "type": "string" }, "generator": { "description": "Code generator used to compile ui and resource files.", "default": "python", "env_names": "{'generator'}", "allOf": [ { "$ref": "#/definitions/CodeGenerators" } ] }, "flatten_folder_structure": { "title": "Flatten Folder Structure", "description": "Whether to keep the original folder structure or flatten it.", "default": true, "env_names": "{'flatten_folder_structure'}", "type": "boolean" }, "ui_files_folder": { "title": "Ui Files Folder", "description": "Root folder containing *.ui files.", "env_names": "{'ui_files_folder'}", "type": "string" }, "generated_ui_code_folder": { "title": "Generated Ui Code Folder", "description": "Root folder to save code generated from *.ui files to.", "env_names": "{'generated_ui_code_folder'}", "type": "string" }, "uic_args": { "title": "Uic Args", "description": "Additional arguments for the uic executable.", "env_names": "{'uic_args'}", "type": "array", "items": { "type": "string" } }, "form_import": { "title": "Form Import", "description": "Python: generate imports relative to '.'", "default": true, "env_names": "{'form_import'}", "type": "boolean" }, "resource_folder": { "title": "Resource Folder", "description": "Root folder containing *.qrc files.", "env_names": "{'resource_folder'}", "type": "string" }, "generated_rc_code_folder": { "title": "Generated Rc Code Folder", "description": "Root folder to save code generated from *.qrc files to.", "env_names": "{'generated_rc_code_folder'}", "type": "string" }, "rcc_args": { "title": "Rcc Args", "description": "Additional arguments for the rcc executable.", "env_names": "{'rcc_args'}", "type": "array", "items": { "type": "string" } } }, "required": [ "base_path" ], "additionalProperties": false, "definitions": { "CodeGenerators": { "title": "CodeGenerators", "description": "Valid code generator values.", "enum": [ "python", "cpp" ], "type": "string" } } }
- Fields:
- Validators:
_validate_rc_input_path
»resource_folder
_validate_rc_io
»all fields
_validate_style_input_path
»root_sass_file
_validate_styles_io
»all fields
_validate_ui_input_path
»ui_files_folder
_validate_ui_io
»all fields
- field base_path: Path [Required]
Directory the config was loaded from, used to resolve relative paths.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field flatten_folder_structure: bool = True
Whether to keep the original folder structure or flatten it.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field form_import: bool = True
Python: generate imports relative to ‘.’
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field generated_rc_code_folder: str | None = None
Root folder to save code generated from *.qrc files to.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field generated_ui_code_folder: str | None = None
Root folder to save code generated from *.ui files to.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field generator: CodeGenerators = CodeGenerators.python
Code generator used to compile ui and resource files.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field rcc_args: List[str] [Optional]
Additional arguments for the rcc executable.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field resource_folder: str | None = None
Root folder containing *.qrc files.
- Validated by:
_validate_rc_input_path
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field root_qss_file: str | None = None
Qss stylesheet with the style for the whole application, generated from ‘root_sass_file’.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- field root_sass_file: str | None = None
Scss stylesheet with the style for the whole application.
- Validated by:
_validate_rc_io
_validate_style_input_path
_validate_styles_io
_validate_ui_io
- field ui_files_folder: str | None = None
Root folder containing *.ui files.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_input_path
_validate_ui_io
- field uic_args: List[str] [Optional]
Additional arguments for the uic executable.
- Validated by:
_validate_rc_io
_validate_styles_io
_validate_ui_io
- rc_folder_paths() Tuple[Path, Path] [source]
Resolve paths to root style files.
- Returns:
Paths to
resource_folder
andgenerated_rc_code_folder
.- Return type:
Tuple[Path, Path]
- rcc_kwargs() RccKwargs [source]
Extract keyword arguments to be used with
compile_resource_file
.- Returns:
Keyword arguments for
compile_resource_file
.- Return type:
- root_style_paths() Tuple[Path, Path] [source]
Resolve paths to root style files.
- Returns:
Paths to
root_sass_file
androot_qss_file
.- Return type:
Tuple[Path, Path]
- ui_folder_paths() Tuple[Path, Path] [source]
Resolve paths to root style files.
- Returns:
Paths to
ui_files_folder
andgenerated_ui_code_folder
.- Return type:
Tuple[Path, Path]