mixins package

This is package includes Mixin classes which may be added to your own project classes to add certain functionality to them.

Submodules

mixins.attrequals module

class mixins.attrequals.EqHashMixin[source]

Bases: object

Sets __hash__ based on attributes named in equal_attrs only.

equal_attrs = None
class mixins.attrequals.EqOnAttrsMixin[source]

Bases: object

Allows class equality to be compared on the equality of the attribute names listed in equal_attrs.

equal_attrs = None
class mixins.attrequals.EqOnAttrsWithConversionMixin[source]

Bases: mixins.attrequals.EqOnAttrsMixin

Allows class equality to be compared on the equality of the attribute names listed in equal_attrs, converting all attributes to convert_type before comparing.

convert_type

alias of builtins.str

mixins.propertycache module

class mixins.propertycache.SimplePropertyCacheMixin[source]

Bases: object

Supports caching properties.

mixins.repr module

class mixins.repr.ReprMixin[source]

Bases: object

Sets class __repr__ method based on the attributes named in repr_cols.

property readable_repr
repr_cols: List[str] = []
mixins.repr.get_repr(obj, cols)[source]
Return type

str

mixins.repr.show_contents(obj)[source]

Used to view what’s inside an object with pretty printing :param _sphinx_paramlinks_mixins.repr.show_contents.obj: :return: