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
JSONschema from a list ofConfigVarclasses.
-
check_union(obj, dtype)[source]¶ Check if the type of
objis one of the types in atyping.Union,typing.Listetc.