8.4.8. pymodaq_utils.factory module
Created the 04/11/2022
@author: Sebastien Weber
- class pymodaq_utils.factory.BuilderBase(name, bases, namespace, /, **kwargs)[source]
Bases:
ABCMetaAbstract class defining an object/service builder with a callable interface accepting some arguments
See https://realpython.com/factory-method-python/ for some details
See also
pymodaq.post_treatment.process_1d_to_scalarMethods
__call__(*args, **kwargs)
- class pymodaq_utils.factory.ObjectFactory[source]
Bases:
objectGeneric ObjectFactory with a decorator register to add object builders to the factory with a unique key identifier
See https://realpython.com/factory-method-python/ for some details
Examples
@ObjectFactory.register(‘custom’) def my_custom_builder():
pass
See also
pymodaq.post_treatment.process_1d_to_scalar.Data1DProcessorFactory- Attributes:
- builders
- keys
Methods
create
get_class
keys_function
register
- property builders
- property keys