Class: QgsProcessingRegistry¶
- class qgis.core.QgsProcessingRegistry¶
Bases:
PyQt5.QtCore.QObject
Registry for various processing components, including providers, algorithms and various parameters and outputs.
QgsProcessingRegistry
is not usually directly created, but rather accessed throughQgsApplication.processingRegistry()
.QgsProcessingRegistry(parent: QObject = None) Constructor for QgsProcessingRegistry.
Methods
Adds a new alias to an existing algorithm.
Register a new parameter type for processing.
Add a processing provider to the registry.
Finds an algorithm by its ID.
Returns basic algorithm information for the algorithm with matching ID.
Returns a list of all available algorithms from registered providers.
Creates a new instance of an algorithm by its ID.
Returns the parameter type registered for
id
.Returns a list with all known parameter types.
Returns a matching provider by provider ID.
Gets list of available providers.
Unregister a custom parameter type from processing.
Removes a provider implementation from the registry (the provider object is deleted).
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- addAlgorithmAlias(self, aliasId: str, actualId: str)¶
Adds a new alias to an existing algorithm.
This allows algorithms to be referred to by a different provider ID and algorithm name to their actual underlying provider and algorithm name. It provides a mechanism to allow algorithms to be moved between providers without breaking existing scripts or plugins.
The
aliasId
argument specifies the “fake” algorithm id (eg “fake_provider:fake_alg”) by which the algorithm can be referred to, and theactualId
argument specifies the real algorithm ID for the algorithm.New in version 3.10.
- Parameters:
aliasId (str) –
actualId (str) –
- addParameterType(self, type: QgsProcessingParameterType) bool ¶
Register a new parameter type for processing. Ownership is transferred to the registry. Will emit parameterTypeAdded.
See also
New in version 3.2.
- Parameters:
type (QgsProcessingParameterType) –
- Return type:
bool
- addProvider(self, provider: QgsProcessingProvider) bool ¶
Add a processing provider to the registry. Ownership of the provider is transferred to the registry, and the provider’s parent will be set to the registry. Returns
False
if the provider could not be added (eg if a provider with a duplicate ID already exists in the registry). Adding a provider to the registry automatically triggers the providersQgsProcessingProvider.load()
method to populate the provider with algorithms.See also
- Parameters:
provider (QgsProcessingProvider) –
- Return type:
bool
- algorithmById(self, id: str) QgsProcessingAlgorithm ¶
Finds an algorithm by its ID. If no matching algorithm is found,
None
is returned.See also
See also
- Parameters:
id (str) –
- Return type:
- algorithmInformation(self, id: str) QgsProcessingAlgorithmInformation ¶
Returns basic algorithm information for the algorithm with matching ID.
This method uses an internal cache to ensure that information is quickly returned and is suitable for calling many times.
New in version 3.32.
- Parameters:
id (str) –
- Return type:
- algorithms(self) List[QgsProcessingAlgorithm] ¶
Returns a list of all available algorithms from registered providers.
See also
- Return type:
List[QgsProcessingAlgorithm]
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- createAlgorithmById(self, id: str, configuration: Dict[str, Any] = {}) QgsProcessingAlgorithm ¶
Creates a new instance of an algorithm by its ID. If no matching algorithm is found,
None
is returned. Callers take responsibility for deleting the returned object.The
configuration
argument allows passing of a map of configuration settings to the algorithm, allowing it to dynamically adjust its initialized parameters and outputs according to this configuration. This is generally used only for algorithms in a model, allowing them to adjust their behavior at run time according to some user configuration.See also
See also
- Parameters:
id (str) –
configuration (Dict[str) –
- Return type:
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- parameterType(self, id: str) QgsProcessingParameterType ¶
Returns the parameter type registered for
id
.New in version 3.2.
- Parameters:
id (str) –
- Return type:
- parameterTypeAdded¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- parameterTypeRemoved¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- parameterTypes(self) List[QgsProcessingParameterType] ¶
Returns a list with all known parameter types.
New in version 3.2.
- Return type:
- providerAdded¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- providerById(self, id: str) QgsProcessingProvider ¶
Returns a matching provider by provider ID.
- Parameters:
id (str) –
- Return type:
- providerRemoved¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- providers(self) List[QgsProcessingProvider] ¶
Gets list of available providers.
- Return type:
List[QgsProcessingProvider]
- receivers(self, PYQT_SIGNAL) int ¶
- removeParameterType(self, type: QgsProcessingParameterType)¶
Unregister a custom parameter type from processing. The type will be deleted. Will emit parameterTypeRemoved.
See also
New in version 3.2.
- Parameters:
type (QgsProcessingParameterType) –
- removeProvider(self, provider: QgsProcessingProvider) bool ¶
Removes a provider implementation from the registry (the provider object is deleted). Returns
False
if the provider could not be removed (eg provider does not exist in the registry).See also
removeProvider(self, providerId: str) -> bool Removes a provider implementation from the registry (the provider object is deleted). Returns
False
if the provider could not be removed (eg provider does not exist in the registry).See also
- Parameters:
provider (QgsProcessingProvider) –
- Return type:
bool
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶