Skip to content

QGIS SDK

Declare a plugin with a Python application and ordinary functions. The SDK derives the plugin description, the native windows, the Processing algorithms, the bridge allowlist and the typed page-side client from those same declarations - and the pure layers import without QGIS, so a plugin is testable from source.

pip install qgis-sdk

  • Python kit 0.8.0
  • TypeScript SDK 0.6.0
  • Web components 0.1.0
  • experimental 0.x · MIT

One declaration, every host

QgisSdkPlugin, its actions and a Dialog or Dock built from the UI catalogue describe the plugin once. QGIS gets metadata.txt and a classFactory from build; a web page gets a typed QgisSdk from the same declarations.

Testable without QGIS

The declarations, the contract layer and the UI catalogue are standard library only. qgis-sdk test runs a project on the SDK fakes; --target qgis and --target desktop add the native layers when a QGIS is there.

Processing, layers, files, jobs

ctx reaches layers, the Processing registry (any provider, typed parameters), files the user granted, settings, the network, the log and scoped background jobs - each service with a fake for tests.

Web views as first-class surfaces

A QWebEngineView page talks to the plugin over an allowlisted bridge: QgisSdk.fromBridgeSchema(schema), framework-free stores, React, Vue and Svelte bindings, and qgis-sdk-ui light-DOM components.

From an empty directory to an installable ZIP

Section titled “From an empty directory to an installable ZIP”
  1. Install the developer kit: pip install qgis-sdk brings the runtime a plugin imports and the qgis-sdk command.

  2. Scaffold and check: qgis-sdk new my_tools --title "My Tools", then qgis-sdk check - pyproject, syntax, imports, UI rules, runtime version.

  3. Test and run: qgis-sdk test without QGIS, qgis-sdk dev inside a real QGIS Desktop with reload on save.

  4. Build: qgis-sdk build writes dist/<plugin>-<version>.zip with the runtime vendored inside - nothing to install on the user’s QGIS.

Try the web components

This interactive form runs against a scripted host, not a live QGIS session. Try the controls or explore the component stories.

Open the component Storybook