Welcome to the world of PyQGIS, the blending of Quantum GIS and Python to extend and enhance your open source GIS toolbox. With PyQGIS you can write
scripts and plugins to implement new features and perform automated tasks.
This book will guide you in getting started with PyQGIS. After a brief introduction to Python, you’ll learn how to understand the QGIS Application Programmer Interface (API), write scripts, and build a plugin.
This book is designed to allow you to work through the examples as you go along. At the end of each chapter you will find a set of exercises you can do to enhance your learning experience.
The PyQGIS Programmer's Guide is compatible with the version 2.0 API released with QGIS 2.0.
If you purchased the Preview PDF, you can get final version by going to
and regenerating your book.
Code and Data
the code and data for the book.
Chapter 6 – Using the Console (PDF, 542 KB)
- Python Basics
- Setting Up Your Development Tools
- The QGIS/Python Ecosystem
- Navigating the QGIS API
- Using the Console
- Running Scripts
- Tips and Techniques
- Extending the API
- Writing Plugins
- Creating a Development Workflow
- Writing a Standalone Application
- Answers to Exercises
- Appendix A: Installing Software
- Appendix B: Code Listings
- Appendix C: Porting Scripts to 2.0