From the course: Python Scripting Using the ArcGIS API for Python

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

The GIS object and connecting to ArcGIS Online anonymously

The GIS object and connecting to ArcGIS Online anonymously

From the course: Python Scripting Using the ArcGIS API for Python

The GIS object and connecting to ArcGIS Online anonymously

- [Instructor] The first step in most any script that uses the ArcGIS API for Python is often to connect to either ArcGIS online or to a portal so that the script can get access to an organization's content. Let's see how to make that connection. The primary module of the ArcGIS API is the gis module. Throughout this course, I will suggest that you have the ArcGIS API reference open so you can get familiar with the classes and each of the API models. Here's the help for the ArcGIS module. The gis module has a GIS class. This GIS class is used to create a connection to ArcGIS online or a portal, and that connection gets stored in a variable as a GIS object. It's kind of easy to get tongue-tied here with so many different things named GIS. But again, there's a module called gis in the ArcGIS library, and it has a class of objects called GIS. Notice the gis module is lowercase, and the GIS class is uppercase. In code, it looks like this, g is my variable that's going to hold my…

Contents