src.utilsΒΆ

General infrastructure code utilities.

Functions

assert_is_file

Raise an error if filepath is not a valid path to a real file.

assert_str_true_or_false

Raise an error if checkstr is not 'true' or 'false'.

assert_valid_log_level

Check the log level is a valid log level.

assert_valid_uuid_list

Check the uuid list provided is a list of valid uuid's or an empty string.

check_valid_ip_address

Check an IP address is a valid IP address.

format_list_str

Convert a comma-separated list of strings into a JSON compatible list.

format_secret_list_str

Convert a comma-separated list into a JSON compatible list.

is_valid_uuid

Check a provided uuid is a valid uuid.

raise_billing_or_mgmt

Raise if both billing and mngmt are set or neither are set.

raise_if_none

Raise an exception if value is None.

validate_ticker_stack_combination

Raise an error if ticker and stack names are not valid names.