A decorator that converts a function into a lazy property. The function wrapped is called the first time to retrieve the result and then that calculated result is used the next time you access the value:
class Foo(object):
@cached_property
def foo(self):
# calculate something important here
return 42
The class has to have a __dict__ in order for this property to work.
Import an object from a module, by name.
Parameters: | name – The object name, in the package.module:name format. |
---|---|
Returns: | The imported object |
Get a storage from URL.
Storages URLs are in the format:
Returns a “shortened representation” of an object; that is, the return value of repr(obj) limited to a certain length, with a trailing ellipsis '...' if text was truncated.
This function is mainly used in order to provide a nice representation of local variables in TracebackInfo objects
Trim a string to a maximum length, adding an “ellipsis” indicator if the string was trimmed
Class used to hold information about an error traceback.
This is meant to be serialized & stored in the database, instead of a full traceback object, which is not serializable.
It holds information about:
A textual representation of the traceback information may be retrieved by using str() or unicode() on the object instance.
Class used to represent progress reports.
It supports progress reporting on a multi-level “tree” structure; each level can have its own progress status, or it will generate it automatically by summing up values from children.