abstract_api.core.validators.numerical module#

abstract_api.core.validators.numerical.between(param: str, value: Any, start: int | float, end: int | float) None[source]#

Validate a value to be in a range (inclusive).

Args:

param: Parameter name. value: Parameter value. start: Beginning of the range. end: End of the range.

Raises:

ClientRequestError if the given value is not in the range (inclusive).

abstract_api.core.validators.numerical.greater_or_equal(param: str, value: Any, threshold: int | float) None[source]#

Validate a value to be in a range (inclusive).

Args:

param: Parameter name. value: Parameter value. threshold: Threshold that the given value must be greater than.

Raises:

ClientRequestError if the given value is less than given threshold.