The plugin development process
In the previous section, we created a plugin by hand, directly storing the necessary files in the hidden ~/.qgis2
directory. This isn't a particularly robust way of building plugins. In this section, we will look at some of the best practices for developing and distributing plugins, as well as some of the things you need to be aware of when creating your own plugins.
Using the Plugin Builder
QGIS provides a plugin called Plugin Builder that you can use to create your new plugin from a standard template. Plugin Builder is a sophisticated and useful tool for creating plugins, but it does make some assumptions about the way your plugin will be structured and what it will do. For this reason, we deliberately didn't use the Plugin Builder for our example plugins.
More information on the Plugin Builder can be found at http://geoapt.net/pluginbuilder. You can install the Plugin Builder directly from within QGIS, using the Manage and Install Plugins... item from the Plugins...