Skip to main content

qgis-sdk

The Python developer kit for QGIS plugins: the runtime a plugin imports and the command that scaffolds, checks, tests, runs and builds it.

Declare a plugin on plain classes and let the SDK derive the rest: the JSON description a web view reads, the native windows, the Processing algorithms, the bridge allowlist and the typed TypeScript client. The pure layers import without QGIS or Qt, so a plugin is testable from source. qgis-sdk is a code-free kit that installs qgis-sdk-runtime and qgis-sdk-tools at matching versions.

Status: 0.7.0, experimental 0.x. Each 0.Y.0 carries migration notes; nothing is promised stable before 1.0.0.

Installation

pip install qgis-sdk                            # runtime + tools
pip install "qgis-sdk[controlled-deployment]"   # optional Pydantic adapter
pixi add --channel https://prefix.dev/archont561/archont561 qgis-sdk

Example

from qgis_sdk import action, plugin
from qgis_sdk.models import LayerInput, Metres, VectorLayerInfo
from qgis_sdk.ui import Button, Dialog, Form, LayerPicker, Number, on


class BufferDialog(Dialog):
    title = "Buffer"
    layer_id = LayerPicker(kind="vector", required=True)
    distance = Number(range=(0, 10_000), required=True)
    form = Form([layer_id, distance], action_id="buffer")
    run = Button(text="Run")

    @on(run).clicked
    def run_clicked(self) -> None:
        self.ctx.log.info("buffered", layer=self.form.submit().id)


@plugin(id="field.tools", title="Field tools")
class FieldTools:
    surfaces = (BufferDialog,)

    @action(id="buffer", title="Buffer")
    def buffer(self, layer_id: LayerInput, distance: Metres) -> VectorLayerInfo:
        params = {"INPUT": layer_id, "DISTANCE": distance}
        return self.ctx.algorithms.run("native:buffer", params).vector("OUTPUT")

qgis-sdk new <directory> writes a project on this API; check, test, dev and build take it from there. What QGIS's loader needs - metadata.txt, the classFactory - is rendered by build and dev, never written into the project.

Documentation

License

MIT

Metadata

Release files for qgis-sdk 0.7.0

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

Built distribution (wheel)

Table of built distributions (wheels) for qgis-sdk 0.7.0
File Interpreter ABI Platform Actions
qgis_sdk-0.7.0-py3-none-any.whl Python 3 none any Details for qgis_sdk-0.7.0-py3-none-any.whl

Release files / qgis_sdk-0.7.0-py3-none-any.whl

Download URL qgis_sdk-0.7.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
262a32c42aecb9e7e96b870a258cb340bc084f6b82bc83133beb9d7a57a7621a
BLAKE2b-256 checksum
How to use checksums
afa2d3aaefaec654e81f193bebe72b7b0405e128fd51541bfbdfc169ca238765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for qgis-sdk 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for qgis_sdk-0.7.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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