filters.iterator module

Contains base iteration functionality for the filter package.

class filters.iterator._IterObject(is_filters=None, not_filters=None)[source]

Bases: object

Base iterator class used to yield filtered items.

__init__(is_filters=None, not_filters=None)[source]

Store filters for the instance.


Return whether the given item is valid for the instances filters.

classmethod register_filter(filter_name, function)[source]

Register the given filter to the class.

classmethod unregister_filter(filter_name)[source]

Unregister the given filter from the class.

_filters = {}

Raise an error if the inheriting class does not have their own.

class filters.iterator._IterObjectMeta[source]

Bases: type

Meta class used to create a _filters dictionary for each class.


Return the class filters dictionary.