Skip to content

method_validator

fastmessage.method_validator

MethodValidator

MethodValidator(fastmessage_handler)

a class used to validate results for sending to another method BEFORE sending them

get_model

get_model(method)

return the input model for the method

Parameters:

Name Type Description Default
method Union[str, Callable]

the method (or input device name) to get the model to

required

Returns:

Type Description
Type[BaseModel]

the BaseModel type for that method

validate_and_return

validate_and_return(method, **kwargs)

validates the arguments for the method, and returns it with the right output device

Parameters:

Name Type Description Default
method Union[str, Callable]

the method or input device name to send the arguments to

required
kwargs

the arguments to the method

{}

Returns:

Type Description
CustomOutput

a CustomOutput object, with the right details