Function: run

qgis.processing.run(algOrName: str | QgsProcessingAlgorithm, parameters: Dict[str, object], onFinish: Callable | None = None, feedback: QgsProcessingFeedback | None = None, context: QgsProcessingContext | None = None, is_child_algorithm: bool = False) Dict | None

Executes given algorithm and returns its outputs as dictionary object.

Parameters:
  • algOrName – Either an instance of an algorithm, or an algorithm’s ID

  • parameters – Algorithm parameters dictionary

  • onFinish – optional function to run after the algorithm has completed

  • feedback – Processing feedback object

  • context – Processing context object

  • is_child_algorithm – Set to True if this algorithm is being run as part of a larger algorithm, i.e. it is a sub-part of an algorithm which calls other Processing algorithms.

Returns:

algorithm results as a dictionary, or None if execution failed

Raises:

QgsNotSupportedException if the Processing plugin has not been loaded