deirokay.statements.loader.statement_factory

deirokay.statements.loader.statement_factory(statement: Dict[str, Any], backend: Backend) BaseStatement[source]

Receive statement dict and create the proper statement object. The name attribute of the class is used to bind the statement type to its class.

Parameters

statement (dict) – Dict from Validation Document representing statement and its parameters.

Returns

Instance of Statement class.

Return type

BaseStatement

Raises
  • KeyError – Custom statement should present a location default parameter.

  • NotImplementedError – Declared statement type does not exist.