swh.objstorage.multiplexer.filter package¶
Submodules¶
Module contents¶
-
swh.objstorage.multiplexer.filter.
add_filter
(storage, filter_conf)[source]¶ Add a filter to the given storage.
- Parameters
storage (swh.objstorage.ObjStorage) – storage which will be filtered.
filter_conf (dict) –
configuration of an ObjStorageFilter, given as a dictionary that contains the keys:
type: which represent the type of filter, one of the keys of _FILTERS_CLASSES
Every arguments that this type of filter requires.
- Returns
A filtered storage that perform only the valid operations.
-
swh.objstorage.multiplexer.filter.
add_filters
(storage, filter_confs)[source]¶ Add multiple filters to the given storage.
(See filter.add_filter)
- Parameters
storage (swh.objstorage.ObjStorage) – storage which will be filtered.
filter_confs (list) – any number of filter conf, as a dict with:
type (-) – which represent the type of filter, one of the keys of FILTERS.
Every arguments that this type of filter require. (-) –
- Returns
A filtered storage that fulfill the requirement of all the given filters.