Validate progfigsite modules

Progfigsite modules must follow a certain API. This module validates compliance.

Module Contents#



A property of a progfigsite module.


The result of validating a module


validate(→ ValidationResult)

Validate a progfigsite module

class progfiguration.progfigsite_validator.ProgfigsiteProperty#

A property of a progfigsite module.

property errstr: str#

A string describing the error

submodule: str#

The name of the submodule that the attribute is in.

An empty string for the root module.

attribute: str#

The string name of the attribute in the module to check for.

If this is empty, we just check if the module exists.

type: Any#

The type of the attribute.

required: bool = True#

Whether the attribute is required.

class progfiguration.progfigsite_validator.ValidationResult(path: str)#

The result of validating a module

property is_valid: bool#

True if the module is valid, False otherwise


A list of attributes that a progfigsite module must have


The path to the module (must already be present in Python module path)

errors: List[ProgfigsiteProperty] = []#

A list of errors that were found

progfiguration.progfigsite_validator.validate(module_path: str) ValidationResult#

Validate a progfigsite module

Return a ValidationResult object.