Class: QgsProcessingParameterProviderConnection

A data provider connection parameter for processing algorithms, allowing users to select from available registered connections for a particular data provider.

QgsProcessingParameterProviderConnection should be evaluated by calling QgsProcessingAlgorithm.parameterAsConnectionName().

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterProviderConnection

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

providerId

Returns the ID of the provider associated with the connections.

setProviderId

Sets the ID of the provider associated with the connections.

Static Methods

fromScriptCode

Creates a new parameter using the definition from a script code.

typeName

Returns the type name for the parameter class.

class qgis.core.QgsProcessingParameterProviderConnection[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None, provider: str | None, defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterProviderConnection, for the specified provider type.

Warning

The provider must support the connection API methods in its QgsProviderMetadata implementation in order for the model to work correctly. This is only implemented for a subset of current data providers.

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • provider (Optional[str])

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterProviderConnection)
Parameters:

a0 (QgsProcessingParameterProviderConnection)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterProviderConnection | None[source]

Creates a new parameter using the definition from a script code.

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • isOptional (bool)

  • definition (Optional[str])

Return type:

Optional[QgsProcessingParameterProviderConnection]

providerId(self) str[source]

Returns the ID of the provider associated with the connections.

See also

setProviderId()

Return type:

str

setProviderId(self, provider: str | None)[source]

Sets the ID of the provider associated with the connections.

See also

providerId()

Parameters:

provider (Optional[str])

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str