Getting Started¶
Python, a widely used general-purpose, high-level programming language provides a powerful scripting interface. Being easy-to-use yet powerful, it enables users to efficiently exploit the capabilities of the GRASS software. Python scripts for GRASS can be written at high level (GRASS modules) as well as at low level (GRASS libraries) through a dedicated interface. The graphical user interface and the GRASS Temporal Framework are entirely written in Python.
A set of packages is provided to the user in order to provide functionality at various levels:
grass.script package provides Python interface to launch GRASS modules in scripts
PyGRASS is an object-oriented Python Application Programming Interface (API) for GRASS which uses the GRASS C API as backend but additionally offers a convenient interface to the GRASS modules
GRASS Temporal Framework implements the temporal GIS functionality of GRASS and provides an API to implement spatio-temporal processing modules
grass.jupyter package offers classes and setup functions for running GRASS in Jupyter Notebooks
Testing GRASS source code and modules using gunittest package
exceptions package contains exceptions used by other packages
imaging package is a library to create animated images and films
pydispatch package is a library for signal-dispatching
Additional Resources¶
GRASS Python introduction provides a general overview of the Python interface to GRASS.
GRASS Jupyter notebooks introduction provides an overview of how to use the grass.jupyter module.