installation_instruction

Submodules

Attributes

__version__

__description__

__repository__

__author__

__author_email__

__license__

Classes

InstallationInstruction

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:

InstallationInstruction