Automating Tasks with Python

Python is a powerful yet easy to use programming language that has huge potential for increasing productivity. It can be used to automate GIS and other workflows and can even be used to extend the functionality of GIS packages such as QGIS (using PyQGIS) and ArcGIS (using ArcPy). Our Automating Tasks with Python course is aimed at non-developers who are looking to develop a strong footing in Python.

Successful automation allows workflows to be completed quickly and consistently, freeing up more time for quality assurance. Delegates will learn how to use python to interact with databases, GIS packages and other external programs. A detailed course outline can be found below.

Delegates should have a solid understanding of GIS concepts but do not require any prior software development experience.

All of our training courses combine presentations with practical exercises, allowing delegates to practice the techniques and concepts being taught. Delegates are supplied with a course manual containing all exercises and presentation materials.

Delegates are encouraged to bring any datasets they may find useful during Open Sessions, held at the end of each day where tutors aim to solve any relevant GIS queries or problems.

Suitable for those who wish to:

  • Script / automate GIS tasks in QGIS
  • Manipulate datasets
  • Automate console-based applications
  • Automate database queries and tasks
  • Gain a solid foundation in python to facilitate self-learning

How we run our courses

Lutra Consulting specialise in running customised training courses for organisations. That means that you get to choose the course content that best meets your requirements and we'll send one of our knowledgeable and experienced tutors to you, with everything required to run your course, anywhere in the UK or Ireland.

Please see our main training page for more information about how we run our courses.

Course structure and registration

Our Automating Tasks with Python training course is usually taken as a two day course and covers the topics listed below in green (day 1) and blue (day 2).

Those looking for a tailored Python training course for multiple staff may pick and choose content from below and from our other courses. Please contact training@lutraconsulting.co.uk to book a course or to discuss your requirements in detail.


Topic Level
An Introduction to PythonIntermediate
What is python
Script execution
Integrated development environments
First StepsIntermediate
Installing an IDE
Creating a project
Making output with print
Comments
Variables
Basic Data TypesIntermediate
Numbers
Python dynamic types
Type conversion
Operator precedence
StringsIntermediate
Operators
Functions and methods
Immutability
Using FunctionsIntermediate
Capturing InputIntermediate
Flow of Execution and BranchingIntermediate
Syntax and indentation
Controlling the flow of execution
If, elif and else
ListsIntermediate
Sequence slicing
Operators and methods
LoopsIntermediate
While loops
Loop control - break and continue
For loops
Diagnosing ProblemsIntermediate
Exceptions
Handling exceptions
Defining FunctionsIntermediate
File Input / OutputIntermediate
Open function
File iterators
ModulesIntermediate
Introduction to modules
Exploring modules
TuplesAdvanced
Running External ProcessesAdvanced
Why?
Interacting with external processes
The Python subprocess module
A subprocess example
Extracting useful information from process output
DictionariesAdvanced
ClassesAdvanced
Database InteractionAdvanced
Making database connections
Executing queries
Retrieving results
Scripting QGISAdvanced
QGIS' internal arrangement
Python bindings
Interfacing with QGIS
Examples
Writing a script to buffer layer geometry in QGIS