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.1.0.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

qgis_plugin_tools-0.1.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qgis_plugin_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for qgis_plugin_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d10625e82654e16857571e3b54d03466fbb0587f10719ef1c7deeb6bf3fe23fb
MD5 f378ec02ed4245c9b30a106c8119c595
BLAKE2b-256 76937ebc40c2bb0916407f48061bc1c8dc3e2d8a25d762ebdc5964ffb039ac52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qgis_plugin_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for qgis_plugin_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ba1b663ecde3287d17518764c3f7fca538e4907c872133403e67d72ff8a0a8d
MD5 747ff5dd1eb37c12c47e26af8901c910
BLAKE2b-256 46dea296cf8a5d0d96f7b55b2ccb6b8049ab51874fa2c42a8b947adfd7dd7bd3

See more details on using hashes here.

Supported by

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