Skip to content

Retry Constant

Constants for retry configuration.

read_int_env(name, default, *, minimum=1)

Read an integer setting from the environment.

Parameters:

Name Type Description Default
name str

The environment variable name.

required
default int

The value used when the variable is unset or empty.

required
minimum int

The smallest accepted value. Defaults to 1. Use 0 for a count that may be switched off, such as the number of retries.

1

Returns:

Name Type Description
int int

The configured value.

Raises:

Type Description
EvalConfigurationError

If the variable is set to something other than an integer of at least minimum. The value itself is never included.