Skip to main content

QGIS Plugin tools

PyPI version Downloads CI Code on Github Ruff uv 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 (will be deprecated in the future)
  • fetching compiled translation file in resources/i18n folder (will be deprecated in the future)
  • removing QRC resources file easily
  • translate using the i18n.tr() function.
  • managing the release process : zip, upload on plugins.qgis.org, tag, GitHub release (will be deprecated in the future)
  • providing some common widgets/code for plugins
  • setting up a debug server (will be deprecated in the future)

How to install it

As external dependency

It is recommended to use this module as an external dependency with the help of qgis-plugin-dev-tools.

The tool can be installed via pip:

pip install qgis_plugin_tools

Remember to add this as a runtime requirement in your pyproject.toml:

[tool.qgis_plugin_dev_tools]
plugin_package_name = "your_plugin_package_name"
runtime_requires = [
    "qgis_plugin_dev_tools"
]

As a submodule

[!WARNING] Using qgis_plugin_tools as a submodule is not recommended and will be deprecated in the future.

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/osgeosuomi/qgis_plugin_tools.git
  3. To get most out of the submodule, try to refactor the plugin to use the default plugin tree

Setting up development environment

This project uses uv to manage python packages. Make sure to have it installed first.

  • Create a venv that is aware of system QGIS libraries: uv venv --system-site-packages
# Activate the virtual environment
$ source .venv/bin/activate
# Install dependencies
$ uv sync
# Install pre-commit hooks
$ pre-commit install

Updating dependencies

uv lock --upgrade

How to use it

Refer to usage documentation.

Contributing

Contributions are very welcome. Get started by reading OSGeo Suomi CONTRIBUTING guidelines.

Release files for qgis-plugin-tools 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qgis-plugin-tools 1.1.1
File Size Uploaded
qgis_plugin_tools-1.1.1.tar.gz 48.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qgis-plugin-tools 1.1.1
File Interpreter ABI Platform
qgis_plugin_tools-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 108.9 kB

Release files / qgis_plugin_tools-1.1.1.tar.gz

Download URL qgis_plugin_tools-1.1.1.tar.gz
Size 48.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9ebefceb11157670d5b82fc25e9349e3a1bc70092bd2a7758b0d269732391870
BLAKE2b-256 checksum
How to use checksums
e86704e1ba6d7d6d6d6686e0845c2728161baaeb38168a5292c3f57b69b09a99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / qgis_plugin_tools-1.1.1-py3-none-any.whl

Download URL qgis_plugin_tools-1.1.1-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5392ce864f65db2a88ce0ada3c7612256a50d4e790a84e3ffdaadc74932a73c
BLAKE2b-256 checksum
How to use checksums
1ca0514ab636e156cb2e37d64b163b664feb85886945b096d46d3a910f542a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

2.0.0

2 release files

This release

1.1.1 This release

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page