configconfig.utils
Utility functions.
Functions:
|
Returns a tuple of permitted values for a |
|
Returns either the configuration value, the default, or raises an error if the value is required but wasn’t supplied. |
|
Get the YAML type that corresponds to the given Python type. |
|
Create a |
|
Check if the type of |
|
Get the type for the JSON schema that corresponds to the given Python type. |
-
get_literal_values
(literal)[source] Returns a tuple of permitted values for a
typing.Literal
.New in version 0.3.0.
-
optional_getter
(raw_config_vars, cls, required)[source] Returns either the configuration value, the default, or raises an error if the value is required but wasn’t supplied.
-
make_schema
(*configuration_variables)[source] Create a
JSON
schema from a list ofConfigVar
classes.
-
check_union
(obj, dtype)[source] Check if the type of
obj
is one of the types in atyping.Union
,typing.List
etc.