Schema Handler

Schema definitions

class kissats.schemas.schemas.MasterSchemaDirectory

Bases: object

Master Schema directory

base_schema_location

location of the schema dir

global_param_schema

Global param schema

reporting_schema

The reporting schema

task_param_schema

Task param schema

task_return_schema

Task return schema

kissats.schemas.schemas.load_schema(schema_location)

Load a schema from a .json or .yaml file

Parameters:schema_location (string or pathlib.Path) – Absolute location of the schema file to load.
Returns:The schema in dict format
Return type:dict
kissats.schemas.schemas.normalize_and_validate(dict_to_check, schema)

Normalize and validate a dictionary, will raise if invalid

Parameters:
  • dict_to_check (dict) – dictionary to check
  • schema (dict) – schema to use
Returns:

Normalized and valid dictionary

Return type:

dict

Raises:

SchemaMisMatch