Skip to main content

A collection of helpful tools and widgets to aid QGIS plugin tool development

Project description

QGIS Plugin tools

PyPI version Downloads CI Code on Github Code style: black Imports: isort pre-commit

Warning: The API is not stable yet. Function and files may move between commits.

As it's a submodule, you can configure your GIT to auto update the submodule commit by running:

git config --global submodule.recurse true

The module is helping you with:

  • setting up some logging (QgsMessageLog, file log, remote logs...)
  • fetching resources in resources or other folders
  • fetching compiled UI file in resources/ui folder
  • fetching compiled translation file in resources/i18n folder
  • removing QRC resources file easily
  • translate using the i18n.tr() function.
  • managing the release process : zip, upload on plugins.qgis.org, tag, GitHub release
  • providing some common widgets/code for plugins
  • setting up a debug server

How to install it

For a new plugin

This will create needed structure for your plugin

  1. Create new plugin using cookiecutter-qgis-plugin. This will automatically initialize git and add qgis_plugin_tools as a submodule for the plugin.
  2. Next set up the development environment, edit metadata.txt with description etc. and commit changes.

For existing plugin

  1. Go to the root folder of your plugin code source
  2. git submodule add https://github.com/GispoCoding/qgis_plugin_tools.git
  3. To get most out of the submodule, try to refactor the plugin to use the default plugin tree

As external dependency

This project can also be used as an external dependency. It can be installed via pip:

pip install qgis_plugin_tools

Setting up development environment

Refer to development documentation.

How to use it

Refer to usage documentation.

Plugin tree example

The plugin should follow the following file tree to get most out of this module.

Plugin Foo root folder:

  • plugin_repo # no '-' character!
    • .gitmodules
    • .pre-commit-config.yaml
    • .gitattributes
    • .gitignore
    • .qgis-plugin-ci # to use qgis-plugin-ci
    • pluginname # no '-' character!
      • .gitignore
      • qgis_plugins_tools/ # submodule
      • resources/
        • i18n/ # Alternatively translations could use Transifex
          • fi.ts
          • fi.qm
        • ui/
          • main_dialog.ui
        • icons/
          • my_icon.svg
      • __init__.py
      • foo.py
      • metadata.txt
      • build.py
    • test/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qgis_plugin_tools-0.3.0.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qgis_plugin_tools-0.3.0-py3-none-any.whl (51.3 kB view details)

Uploaded Python 3

File details

Details for the file qgis_plugin_tools-0.3.0.tar.gz.

File metadata

  • Download URL: qgis_plugin_tools-0.3.0.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for qgis_plugin_tools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a41be146603182720076a7a022a099d036d2a6cd72d280f0740279563e4cdb94
MD5 9f2d3b91a108cab8a9c66e4067d489a8
BLAKE2b-256 29f0cb790ae2ea0f9eadc3a7f22a6f162ae51a1ad0b11ff738b5e949cca641f0

See more details on using hashes here.

File details

Details for the file qgis_plugin_tools-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qgis_plugin_tools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0aae8bbb7a18a594b63688278925512683a200ba55d42ac3dcb7670775f3c7
MD5 d64e3c68bbb16318f1298b77e53a51b5
BLAKE2b-256 03ecee3b8afa77825690590d79f49d52c6a4358eb19e4f1d482392a88d2d212a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page