InVEST Model Entry Points

All InVEST models share a consistent python API:

  1. The model has a function called execute that takes a single python dict ("args") as its argument.
  2. This arguments dict contains an entry, 'workspace_dir', which points to the folder on disk where all files created by the model should be saved.

Calling a model requires importing the model’s execute function and then calling the model with the correct parameters. For example, if you were to call the Carbon Storage and Sequestration model, your script might include

import natcap.invest.carbon.carbon_combined
args = {
    'workspace_dir': 'path/to/workspace'
    # Other arguments, as needed for Carbon.


For examples of scripts that could be created around a model run, or multiple successive model runs, see Creating Sample Python Scripts.