dynaconf.utils package¶
Submodules¶
dynaconf.utils.boxing module¶
dynaconf.utils.functional module¶
-
class
dynaconf.utils.functional.
LazyObject
[source]¶ Bases:
object
A wrapper for another class that can be used to delay instantiation of the wrapped class.
By subclassing, you have the opportunity to intercept and alter the instantiation. If you don’t need to do that, use SimpleLazyObject.
-
class
dynaconf.utils.functional.
Promise
[source]¶ Bases:
object
This is just a base class for the proxy class created in the closure of the lazy function. It can be used to recognize promises in code.
-
class
dynaconf.utils.functional.
SimpleLazyObject
(func)[source]¶ Bases:
dynaconf.utils.functional.LazyObject
A lazy object initialized from any function.
-
dynaconf.utils.functional.
allow_lazy
(func, *resultclasses)[source]¶ A decorator that allows a function to be called with one or more lazy arguments. If none of the args are lazy, the function is evaluated immediately, otherwise a __proxy__ is returned that will evaluate the function when needed.
-
class
dynaconf.utils.functional.
cached_property
(func, name=None)[source]¶ Bases:
object
Decorator that converts a method with a single self argument into a property cached on the instance.
Optional
name
argument allows you to make cached properties of other methods. (e.g. url = cached_property(get_absolute_url, name=’url’) )
-
dynaconf.utils.functional.
lazy
(func, *resultclasses)[source]¶ Turns any callable into a lazy evaluated callable. You need to give result classes or types – at least one is needed so that the automatic forcing of the lazy evaluation code is triggered. Results are not memoized; the function is evaluated on every access.
dynaconf.utils.parse_conf module¶
dynaconf.utils.files module¶
Module contents¶
-
class
dynaconf.utils.
DynaconfDict
(*args, **kwargs)[source]¶ Bases:
dict
A dict representing en empty Dynaconf object useful to run loaders in to a dict for testing
-
logger
¶
-
-
class
dynaconf.utils.
Missing
[source]¶ Bases:
object
Sentinel value object/singleton used to differentiate between ambiguous situations where None is a valid value.