lisa.conf.DeferredValue#
- class lisa.conf.DeferredValue(callback, *args, **kwargs)[source]#
Bases:
object
Wrapper similar to
functools.partial()
allowing to defer computation of the value until the key is accessed.Once computed, the deferred value is replaced by the value that was computed. This is useful for values that are very costly to compute.
See also
Deferred values can be forcefully computed using
eval_deferred()
, e.g. to ensure a serialized configuration contains all the values an offline user might need.