QGIS & PyQGIS
Driving QGIS from Python: Processing algorithms, layouts, plugins and headless runs.
Everything on Spatial Workflow about qgis & pyqgis, in the order that usually works: understand the idea, then run the task, then fix it when it goes wrong. 25 guides in total.
One learning path runs through this topic — follow it if you would rather work through a route than pick a single guide.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- How to Automate QGIS with Python (PyQGIS): The Complete Workflow automate qgis with python
- PyQGIS vs GeoPandas: Which to Use for GIS Automation pyqgis vs geopandas
- The QGIS Processing Framework Explained qgis processing framework explained
- QGIS Data Providers Explained: How QGIS Reads Any Data Source qgis data provider explained
- The PyQGIS API Map: Which Class Does What pyqgis classes overview
- How QGIS Styling Works: Renderers, Symbols and Rules qgis renderer symbol explained
- Expressions, Scripts, Models or Plugins? QGIS Extension Points Explained qgis plugin vs script vs model
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Run QGIS Processing Algorithms from Python qgis processing algorithm python
- How to Run a PyQGIS Script Headless Without Opening QGIS run pyqgis headless
- How to Batch Process Layers in QGIS with PyQGIS batch process layers pyqgis
- How to Build a QGIS Processing Model and Run It from Python qgis processing model python
- How to Write a Custom QGIS Processing Script Algorithm in Python qgis processing script algorithm
- How to Style Layers and Export Map Layouts from PyQGIS qgis export layout python
- How to Move Data Between QGIS and GeoPandas qgis geopandas data exchange
- How to Run Field Calculator Expressions from PyQGIS pyqgis field calculator expression
- How to Add, Edit and Delete Features with PyQGIS pyqgis edit features
- How to Build and Save a QGIS Project File from Python create qgis project python
- How to Load and Write PostGIS Layers from PyQGIS pyqgis postgis layer
- How to Automate QGIS from the Command Line with qgis_process qgis_process command line
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- How to Fix "ModuleNotFoundError: No module named 'qgis'" no module named qgis
- PyQGIS Script Crashes with a Segmentation Fault: How to Fix It pyqgis segmentation fault
- QGIS Processing "Algorithm Not Found" Error in Python: How to Fix It qgis algorithm not found
- PyQGIS Layer Fails to Load (isValid() Returns False): How to Fix It pyqgis layer is not valid
- qt.qpa.plugin: Could Not Load the Qt Platform Plugin xcb in PyQGIS qt platform plugin xcb error
- PyQGIS Processing Output Is Empty: How to Fix It pyqgis processing empty output
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
Related topics
Subjects that keep coming up alongside this one, most overlap first.