CallValidator
This class validates function calls by checking both the input arguments and the return value against defined schemas. It utilizes an internal arguments validator and an optional return validator to ensure data integrity throughout the function execution lifecycle. The class is identified by a name and maintains a reference to the underlying Python function being validated.
Attributes
| Attribute | Type | Description |
|---|---|---|
| function | Py< PyAny > | The Python callable object that will be invoked and validated. |
| arguments_validator | Arc< CombinedValidator > | The validator used to verify and coerce the positional and keyword arguments passed to the function. |
| return_validator | Option< Arc< CombinedValidator > > | An optional validator used to verify the value returned by the function after execution. |
| name | String | The display name of the call validator used in error messages and representation. |
Constructor
Signature
def CallValidator(
function: Py< PyAny >,
arguments_validator: Arc< CombinedValidator >,
return_validator: Option< Arc< CombinedValidator > >,
name: String
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| function | Py< PyAny > | The Python function to be validated. |
| arguments_validator | Arc< CombinedValidator > | The validator used for the function arguments. |
| return_validator | Option< Arc< CombinedValidator > > | An optional validator for the function's return value. |
| name | String | The name of the call validator instance. |
Signature
def CallValidator(
function: Py< PyAny >,
arguments_validator: Arc< CombinedValidator >,
return_validator: Option< Arc< CombinedValidator > >,
name: String
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| function | Py< PyAny > | The Python function or callable to be validated. |
| arguments_validator | Arc< CombinedValidator > | The validator used to enforce schema constraints on the function's input arguments. |
| return_validator | Option< Arc< CombinedValidator > > | An optional validator used to enforce schema constraints on the value returned by the function. |
| name | String | The display name of the validator, typically used in error messages and logs. |