9

Can you please tell me how I can programmatically (or from the console) access the loaded plugin list? I tried:

QgsProviderRegistry.pluginList()

but got:

TypeError: QgsProviderRegistry.pluginList(bool asHtml=False): first argument of unbound method must have type 'QgsProviderRegistry

I am sure I am missing something, but don't know what. How can I get access to the actual QgsProviderRegistry instance?

1 Answer 1

14

Actually, you would need to access the instance method of the QgsProviderRegistry class, since it is a singleton:

QgsProviderRegistry.instance().pluginList()    

However, as you can see, it doesn't list QGIS plugins, but data provider plugins, which are used by QGIS to support different data formats such as WFS, PostgreSQL/PostGIS, WMS, GDAL, etc.

To achieve what you're looking for, type in the QGIS Python console:

qgis.utils.available_plugins    

You could even access the list of active plugins (i.e., those plugins loaded by QGIS and not unchecked by the user):

qgis.utils.active_plugins    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.