class documentation

A collection of Placeholder variables.

Method __contains__ Containment check operator for placeholder variables.
Method __getitem__ Subscript operator to build placeholder variables.
Method __init__ schema (dict, optional): Schema for the placeholder collection. (default: None)
Method contains Check if the placeholder collection contains the specified placeholder variable.
Method get Create a placeholder variable with an associated type.
Method get_schema_as_dict Generate a schema for the placeholder collection as a Python dictionary.
Method get_schema_as_json Generate a schema for the placeholder collection as a JSON formatted string.
Method to_jsonpath Returns a JSON path representation of the placeholder variable to be used for step parameters.
Method validate Validate a specified input against the placeholder collection schema.
Instance Variable immutable Undocumented
Instance Variable json_str_template Undocumented
Instance Variable name Undocumented
Instance Variable parent Undocumented
Instance Variable schema Undocumented
Instance Variable store Undocumented
Instance Variable type Undocumented
Method _create_variable Undocumented
Method _get_path Get path to a placeholder variable node in the collection.
Method _is_empty Check if the store for a placeholder collection/variable is empty.
Method _is_valid_name Undocumented
Method _join_path Undocumented
Method _make_immutable Make a placeholder collection (including all variables contained) immutable.
Method _set_schema Set the schema for a placeholder collection.
def __contains__(self, placeholder): (source)

Containment check operator for placeholder variables.

def __getitem__(self, name): (source)

Subscript operator to build placeholder variables.

def __init__(self, schema=None, **kwargs): (source)

Args:
schema (dict, optional): Schema for the placeholder collection. (default: None)
Keyword Args:
name (str, optional): Name of the placeholder variable. (default: None) type (type, optional): Type of the placeholder variable. (default: None) parent (Placeholder, optional): Parent variable for a placeholder variable. (default: None)

def contains(self, placeholder): (source)

Check if the placeholder collection contains the specified placeholder variable.

Args:
placeholder (Placeholder): Placeholder variable to search for, in the collection.
Returns:
bool: True if placeholder variable was found in the collection. False, otherwise.
def get(self, name, type): (source)

Create a placeholder variable with an associated type.

Args:
name (str): Name of the placeholder variable. type (type): Type of the placeholder variable.
Raises:
ValueError: If placeholder variable with the same name but different type already exists. ValueError: If placeholder variable does not fit into a previously specified schema for the placeholder collection.
Returns:
Placeholder: Placeholder variable.
def get_schema_as_dict(self): (source)

Generate a schema for the placeholder collection as a Python dictionary.

Returns:
dict: Placeholder collection schema.
def get_schema_as_json(self, pretty=False): (source)

Generate a schema for the placeholder collection as a JSON formatted string.

Args:
pretty (bool, optional): Boolean flag set to True if JSON string should be prettified. False, otherwise. (default: False)
Returns:
str: JSON formatted string representation of the block.
def to_jsonpath(self): (source)

Returns a JSON path representation of the placeholder variable to be used for step parameters.

Returns:
str: JSON path representation of the placeholder variable
def validate(self, input): (source)

Validate a specified input against the placeholder collection schema.

Args:
input (dict): Input to validate against the placeholder collection schema.
Returns:
ValidationResult: Named tuple with the keys:
"valid" (Boolean): Representing the result of validation , "keys_missing" (list(str)): List of keys missing in the input , "keys_type_mismatch" (list(str), type, type): List of tuples with key name, expected type, and provided type.
immutable: bool = (source)

Undocumented

json_str_template: str = (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

def _create_variable(self, name, parent, type=None): (source)

Undocumented

def _get_path(self): (source)

Get path to a placeholder variable node in the collection.

def _is_empty(self): (source)

Check if the store for a placeholder collection/variable is empty.

def _is_valid_name(self, name): (source)

Undocumented

def _join_path(self, path): (source)

Undocumented

def _make_immutable(self): (source)

Make a placeholder collection (including all variables contained) immutable.

def _set_schema(self, schema, path=[]): (source)

Set the schema for a placeholder collection.