Class: QgsProviderMetadata

class qgis.core.QgsProviderMetadata(_key: str, _description: str, _library: str)

Bases: sip.wrapper

QgsProviderMetadata(key: str, description: str, a2: Callable[…, None]) Metadata for provider with direct provider creation function pointer, where no library is involved.

New in version 3.0.

QgsProviderMetadata(QgsProviderMetadata)

Holds data provider key, description, and associated shared library file or function pointer information.

Provider metadata refers either to providers which are loaded via libraries or which are native providers that are included in the core QGIS installation and accessed through function pointers.

For library based providers, the metadata class is used in a lazy load implementation in QgsProviderRegistry. To save memory, data providers are only actually loaded via QLibrary calls if they’re to be used. (Though they’re all iteratively loaded once to get their metadata information, and then unloaded when the QgsProviderRegistry is created.) QgsProviderMetadata supplies enough information to be able to later load the associated shared library object.

Enums

Methods

description This returns descriptive text for the provider
key This returns the unique key associated with the provider
library This returns the library file name

Signals

Attributes

description(self) → str

This returns descriptive text for the provider

This is used to provide a descriptive list of available data providers.

key(self) → str

This returns the unique key associated with the provider

This key string is used for the associative container in QgsProviderRegistry

library(self) → str

This returns the library file name

This is used to QLibrary calls to load the data provider.