Skip To Content

Use ArcGIS API for Python in a notebook

ArcGIS API for Python provides a library to programmatically perform GIS visualization and analysis, spatial data management, and GIS system administration tasks. It can be run in scripts or in an interactive notebook format such as hosted Python notebooks powered by ArcGIS Notebook Server.

For a complete introduction to the API, see its documentation.

Get started with ArcGIS API for Python

To use the API in a notebook, first import its library by running the following cell. This is included in the default notebook template.

from arcgis.gis import GIS

The default notebook also includes the following code to create a GIS object. The home authentication allows you to create an instance of the GIS class representing the default instance of your portal without requiring a user to pass their credentials or specify a URL to your portal.

gis = GIS('home')

The GIS object also allows you to specify optional arguments to connect through a proxy. See the following ArcGIS API for Python help topics for more information: Using the GIS, GIS object, Working with different authentication schemes.

View the sample notebooks that are included with ArcGIS Notebook Server to learn how ArcGIS API for Python can be used in your own notebooks.


في هذا الموضوع
  1. Get started with ArcGIS API for Python