A collection of helpful tools and widgets to aid QGIS plugin tool development
Project description
QGIS Plugin tools
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
resourcesor other folders - fetching compiled UI file in
resources/uifolder (will be deprecated in the future) - fetching compiled translation file in
resources/i18nfolder (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
- Create new plugin using cookiecutter-qgis-plugin. This will automatically initialize git and add qgis_plugin_tools as a submodule for the plugin.
- Next set up the development environment, edit metadata.txt with description etc. and commit changes.
For existing plugin
- Go to the root folder of your plugin code source
git submodule add https://github.com/osgeosuomi/qgis_plugin_tools.git- 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- On Windows, maybe use a tool like qgis-venv-creator.
# 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qgis_plugin_tools-1.0.0.tar.gz.
File metadata
- Download URL: qgis_plugin_tools-1.0.0.tar.gz
- Upload date:
- Size: 47.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98fa40766c0f48704dcd61d61585df14eba763d2ff694914d01223e60191724
|
|
| MD5 |
ee18ba2b8456e3bdf4e30f419ecbe354
|
|
| BLAKE2b-256 |
1f46d365e67d7194eb3743079cc4744a51ca6b2941093b5f6f4809e471e4f732
|
File details
Details for the file qgis_plugin_tools-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qgis_plugin_tools-1.0.0-py3-none-any.whl
- Upload date:
- Size: 60.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b26c5202a1dc60db98425aa790d795a5194f10c8dadbab1d3cbc7dae1d94003d
|
|
| MD5 |
87116fd1cdd78fe3bf2bc2a41ff8cfee
|
|
| BLAKE2b-256 |
d4b4921821da0c39f927edb64ab2995314c6b5fafefadb092fa633a18d61d7cc
|