Install the QGIS SDK
The Python developer kit qgis-sdk installs two packages at matching
versions: qgis-sdk-runtime, what a plugin imports inside QGIS, and
qgis-sdk-tools, the qgis-sdk command. Neither installs anything into a
QGIS: a built plugin vendors its own copy of the runtime.
Which Python?
Section titled “Which Python?”The tools run on any Python 3.11+ - a virtual environment, Pixi, the system
interpreter. qgis-sdk test --target qgis, qgis-sdk dev and qgis-sdk build
find a QGIS through QGIS_PREFIX_PATH, qgis on PATH, the current
environment, or [tool.qgis-sdk] qgis-prefix in the project.
How do I install the Python kit?
Section titled “How do I install the Python kit?”With pip, into any environment:
pip install qgis-sdkWith Pixi, from the prefix.dev channel:
pixi add --channel https://prefix.dev/archont561/archont561 qgis-sdkThe runtime alone, for the QGIS Python console, a host script or a copy to vendor:
pip install qgis-sdk-runtimeHow do I install the TypeScript SDK?
Section titled “How do I install the TypeScript SDK?”Only a plugin with a web page needs it; qgis-sdk new --web writes the
dependency for you.
bun add @archont561/qgis-sdk # or its unscoped alias: bun add qgis-sdkbun add @archont561/qgis-sdk-ui # the web components, optionalnpm install @archont561/qgis-sdk # or: npm install qgis-sdknpm install @archont561/qgis-sdk-ui # the web components, optionalDid it work?
Section titled “Did it work?”qgis-sdk --helpqgis-sdk targets # the support matrix, and where this host stands in ittargets prints the QGIS and Python versions the kit is qualified against
and which of them this machine can reach, so you know up front whether the
native test layers and dev will run here or only the QGIS-free ones.
Where next
Section titled “Where next”- Your first plugin - scaffold, check, test, run inside QGIS, build the ZIP.
- Supported targets - the full matrix and the qualification behind it.