swh.objstorage.multiplexer.filter package#

Submodules:

Module contents:

swh.objstorage.multiplexer.filter.read_only()[source]#
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.

  • require. (- Every arguments that this type of filter)

Returns:

A filtered storage that fulfill the requirement of all the given filters.