GRASS GIS Python library documentation — GRASS Python Library documentation

# GRASS GIS Python library documentation

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 GIS software. Python scripts for GRASS GIS can be written at high level (GRASS GIS modules) as well as at low level (GRASS GIS libraries) through a dedicated interface. The graphical user interface and the GRASS GIS 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 GIS modules in scripts

- PyGRASS is an object-oriented Python Application Programming Interface (API) for GRASS GIS which uses the GRASS C API as backend but additionally offers a convenient interface to the GRASS GIS modules

- GRASS GIS Temporal Framework implements the temporal GIS functionality of GRASS GIS and provides an API to implement spatio-temporal processing modules

- grass.jupyter package offers classes and setup functions for running GRASS GIS in Jupyter Notebooks

- Testing GRASS GIS 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

Contents:

- GRASS GIS Python scripting with grass.script package
  - Parts of the API
  - Syntax
  - Combining multiple modules
  - Processing many maps
  - Providing GRASS module interface to a script
- PyGRASS documentation
  - GRASS database management
  - Region management
  - Introduction to Raster classes
  - Introduction to Vector classes
  - Interface to GRASS GIS modules
  - PyGRASS message interface
  - pygrass package
  - References
- GRASS GIS Temporal Framework
  - Introduction
  - Temporal API
  - Examples
  - References
- grass.jupyter package
  - Usage
  - Authors
  - Submodules
  - grass.jupyter.interactivemap module
  - grass.jupyter.map module
  - grass.jupyter.map3d module
  - grass.jupyter.region module
  - grass.jupyter.reprojection_renderer module
  - grass.jupyter.seriesmap module
  - grass.jupyter.setup module
  - grass.jupyter.timeseriesmap module
  - grass.jupyter.utils module
- exceptions package
  - Module contents
- imaging package
  - Submodules
  - imaging.images2avi module
  - imaging.images2gif module
  - imaging.images2ims module
  - imaging.images2swf module
  - imaging.operations module
  - Module contents
- Testing GRASS GIS source code and modules
  - Introduction
  - Basic example
  - Building blocks and terminology
  - Testing with gunittest package in general
  - Tests of GRASS modules
  - Tests of C and C++ code
  - Tests of Python code
  - Testing Python code with doctest
  - Tests as general scripts
  - Data
  - Data specific to one test
  - Tests creating separate Mapsets, Locations and GRASS Databases
  - Analyzing quality of source code
  - Further reading
- pydispatch package
  - Submodules
  - pydispatch.dispatcher module
  - pydispatch.errors module
  - pydispatch.robust module
  - pydispatch.robustapply module
  - pydispatch.saferef module
  - pydispatch.signal module
  - Module contents

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2026 GRASS Development Team, GRASS GIS 8.4.3dev Reference Manual