rendercv_model_builder
¶
BuildRendercvModelArguments
¶
Bases: TypedDict
design_file_path_or_contents
instance-attribute
¶
dont_generate_html
instance-attribute
¶
dont_generate_markdown
instance-attribute
¶
dont_generate_pdf
instance-attribute
¶
dont_generate_png
instance-attribute
¶
dont_generate_typst
instance-attribute
¶
html_path
instance-attribute
¶
locale_file_path_or_contents
instance-attribute
¶
markdown_path
instance-attribute
¶
overrides
instance-attribute
¶
pdf_path
instance-attribute
¶
png_path
instance-attribute
¶
settings_file_path_or_contents
instance-attribute
¶
typst_path
instance-attribute
¶
build_rendercv_dictionary(main_input_file_path_or_contents, **kwargs)
¶
Merge main YAML with overlays and CLI overrides into final dictionary.
Why
Users need modular configuration (separate design/locale files) and quick testing (CLI overrides). This pipeline applies all modifications before validation, ensuring users see complete configuration errors.
Example
Parameters:
-
main_input_file_path_or_contents(Path | str) –Primary CV YAML file or string.
-
kwargs(Unpack[BuildRendercvModelArguments], default:{}) –Optional YAML overlay paths, output paths, generation flags, and CLI overrides.
Returns:
-
CommentedMap–Merged dictionary ready for validation.
Source code in src/rendercv/schema/rendercv_model_builder.py
build_rendercv_dictionary_and_model(main_input_file_path_or_contents, **kwargs)
¶
Complete pipeline from raw input to validated model.
Why
Main entry point for render command combines merging and validation in one call. Returns both dictionary and model because error handlers need dictionary metadata for location mapping.
Example
Parameters:
-
main_input_file_path_or_contents(Path | str) –Primary CV YAML file or string.
-
kwargs(Unpack[BuildRendercvModelArguments], default:{}) –Optional YAML overlay paths, output paths, generation flags, and CLI overrides.
Returns:
-
tuple[CommentedMap, RenderCVModel]–Tuple of merged dictionary and validated model.
Source code in src/rendercv/schema/rendercv_model_builder.py
build_rendercv_model_from_commented_map(commented_map, input_file_path=None)
¶
Validate merged dictionary and build Pydantic model with error mapping.
Why
Validation transforms raw YAML into type-safe objects. When validation fails, CommentedMap metadata enables precise error location reporting instead of generic Pydantic messages.
Parameters:
-
commented_map(CommentedMap) –Merged dictionary with line/column metadata.
-
input_file_path(Path | None, default:None) –Source file path for context and photo resolution.
Returns:
-
RenderCVModel–Validated RenderCVModel instance.