installation_instruction
Submodules
Attributes
Classes
Class holding schema and template for validating and rendering installation instruction. |
Package Contents
- installation_instruction.__version__
- installation_instruction.__description__
- installation_instruction.__repository__
- installation_instruction.__author__
- installation_instruction.__author_email__
- installation_instruction.__license__
- class installation_instruction.InstallationInstruction(config: str)
Class holding schema and template for validating and rendering installation instruction.
- validate_and_render(input: dict) tuple[list[str], bool]
Validates user input against schema and renders with the template. Returns installation instructions and False. If jinja macro raise is called returns error message and True.
- Parameters:
input – Enduser input.
- Ptype input:
dict
- Returns:
Returns instructions as string and False. Or Error and True.
- Rtpye:
(str, bool)
- Raises:
Exception – If schema or user input is invalid.
- parse_schema() dict
Parses schema into a dict.
This is only important for merging enum, anyOf and oneOf into one type.
- Returns:
Schema as dict.
- Return type:
dict
- template
- classmethod from_file(path: str)
Returns class initialized via config file from path.
- Parameters:
path – Path to config file.
- Ptype path:
str
- Returns:
InstallationInstruction class
- Return type: