method_validator
fastmessage.method_validator
MethodValidator
a class used to validate results for sending to another method BEFORE sending them
get_model
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
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 |