beamlime.constructors.providers#

Functions

check_conflicting_providers(*prov_grs)

Raise an error is given factories have any conflicting providers.

merge(*prov_grs)

Return a new ProviderGroup containing all providers of prov_grs.

split_dict_by_filter(filter_func, sequence)

Split a dictionary into two dictionaries based on the filter.

split_sequence_by_filter(filter_func, sequence)

Split a sequence into two sequences based on the filter.

unknown_provider_call()

rtype:

Any

Classes

ArgumentsFilter(func)

Remember arguments and check if the new arguments match the old ones.

Provider(_constructor, /, *args, **kwargs)

Function wrapper that provides certain type of product.

ProviderGroup(*initial_providers)

Group of providers.

SingletonProvider(_constructor, /, *args, ...)

Singleton provider always returns the same instance.

Exceptions

ConflictProvidersError

MismatchingProductTypeError

ProviderExistsError

ProviderNotFoundError

SingletonProviderCalledWithDifferentArgs

UnknownProviderCalled