silo.low_code.framework.sf_typing module
- silo.low_code.framework.sf_typing.String23
alias of
str
- silo.low_code.framework.sf_typing.set_typechecking(enabled)
Set the global typechecking flag.
- Parameters
enabled (bool) – True enables the Type Checking. False disables the Type Checking.
- silo.low_code.framework.sf_typing.typechecked(*v, **k)
Decorator to check the input and output type of a function or method.
Perform type-checking at run-time to ensure the parameters have the correct types. If an incorrect type is provided, an exception will be raised stating the parameter and type issue.
- Parameters
input (object) – The expected input type. If the typechecking is running against a Requestor it will use request as input. If the typechecking is running against a Processor it will use result as input. If the input is not correct, the exception InputTypeError will be raised.
output (object) – The expected output type. If the output is not correct, the exception OutputTypeError will be raised.
**extra (object) – Used when checking additional parameters. The name must match the parameter. If the input is not correct, the exception InputTypeError will be raised.