Skip To Content

Scripting with ArcGIS API for Python

ArcGIS API for Python allows you to automate common tasks, such as creating and managing users and groups, publishing and updating items, monitoring server usage, performing visualization and data analysis, and transferring ownership of items. It also allows you to script complex tasks such as cloning portal content.

In addition to batch processing scripts, the API can be used in a browser-based interactive scripting environment called Jupyter Notebook. The notebook environment provides an interface to execute code; visualize portal items, users, and groups; and view web layers, maps, and scenes interactively.

Esri offers a Jupyter Notebook environment built in to ArcGIS Enterprise. Introduced at 10.7, ArcGIS Notebooks is hosted by ArcGIS Notebook Server, which uses containers to isolate each notebook user's workspace. With ArcGIS Notebooks, you can use ArcGIS API for Python and ArcPy to work with the items in your portal, perform advanced spatial analysis, and craft data science workflows.

Learn more about ArcGIS Notebooks

The API is built as modules that make it straightforward to learn and use. The gis module is the entry point and provides an information model to access and program your portal. The gis module provides various classes that you can use to create and manage users and their groups and items. The features and raster modules allow access to feature and raster layers, as well as the ability to perform analysis on these layers. The geoanalytics module allows the execution of GeoAnalytics Tools. To learn more about the rest of the modules and the architecture of the API, see the API overview.

Get started

The API is distributed as a Python package and can be installed using conda, which is a popular Python package and environment management system. The instructions for setup are documented on the ArcGIS Developer site.

Visit the following sample notebooks to learn about some of the tasks that can be performed using the API:

In this topic
  1. Get started