API Reference

API documentation for the lazyutils module.

class lazyutils.lazy(method)[source]

Decorator that defines an attribute that is initialized as first usage rather than at instance creation.

Usage is similar to the @property decorator, although lazy attributes do not override the setter and deleter methods.

class lazyutils.delegate_to(attribute, readonly=False)[source]

Property that delegates attribute access to a inner variable.

Parameters:
  • attribute – Name of the inner variable that receives delegation.
  • readonly – If true, makes the the delegate readonly.
class lazyutils.delegate_ro(attribute)[source]

A read-only version of delegate_to()