muppy

Functions

pympler.muppy.muppy.get_objects(remove_dups=True)

Return a list of all known objects.

Keyword arguments: remove_dups – if True, all duplicate objects will be removed.

pympler.muppy.muppy.get_size(objects)
Compute the total size of all elements in objects.
pympler.muppy.muppy.get_diff(left, right)

Get the difference of both lists.

The result will be a dict with this form {‘+’: [], ‘-‘: []}. Items listed in ‘+’ exist only in the right list, items listed in ‘-‘ exist only in the left list.

pympler.muppy.muppy.sort(objects)
Sort objects by size in bytes.
pympler.muppy.muppy.filter(objects, Type=None, min=-1, max=-1)

Filter objects.

The filter can be by type, minimum size, and/or maximum size.

Keyword arguments: Type – object type to filter by min – minimum object size max – maximum object size

pympler.muppy.muppy.get_referents(object, level=1)

Get all referents of an object up to a certain level.

The referents will not be returned in a specific order and will not contain duplicate objects. Duplicate objects will be removed.

Keyword arguments: level – level of indirection to which referents considered.

This function is recursive.