ArcGIS API for Python

What's New in ArcGIS API for Python 2.2.0 (September 2023)

The ArcGIS API for Python version 2.2.0 was released on September 25, 2023.  The primary focus of this release is dependency upgrades and bug fixes, but we’ve also added several new pieces of functionality.  You can find the full release notes here; in this blog, we highlight some of the major themes and common workflows. 

Experience Builder support 

In 2.2.0, we have introduced an entire module dedicated to working with ArcGIS Experience Builder. Managing Experiences via automation has been a popular user request, and we are excited to bring the first version of this functionality. Using the WebExperience class, users can perform a variety of operations on both portal and local Experiences, such as creation, saving, publishing, deletion, cloning, previewing, and more. Read more about it in this Guide and the API Reference. 

Publishing and viewing an Experience using the ArcGIS API for Python

Core API 

Like many libraries in the Python ecosystem, the ArcGIS API for Python relies on a number of dependencies behind the scenes.  In this release, a major effort for the team was upgrading several of these dependences to strengthen the security and overall performance of the API.  As an example, the upgrade to Pandas 2.0.0 makes the API compatible with all pandas dtypes, including the low-memory NumPy dtypes that make DataFrame indices more efficient.   

We have also added support for Python versions 3.9 – 3.11, so you can take advantage of the speed and performance improvements of the core Python language when using the ArcGIS API for Python. 

Administration 

GIS administrators are always looking for ways to automate and simplify complex operations, so we have added new classes, methods, and properties to help them do just that.  For ArcGIS Enterprise on Kubernetes deployments, administrators can now export() the organization logs based on desired parameters to help with troubleshooting, and manage access to external content with a new ExternalContentManager object.  

ArcGIS Online administrators can now also use the DataStoreMetricsManager to get resource usage information and a variety of different feature data store statistics. Administrators can also quickly duplicate the appearance of an entire organization with the clone() method of the UX class, allowing for immediate or offline staging of organizations without having to individually configure settings.  These are just a few examples from the long list of updates for administrators, so check out the admin submodule section of the 2.2.0 release notes for the full slate! 

Content Management 

We know that many of our customers use the Python API to help them quickly and efficiently manage their web GIS content.  This fundamental theme drives many of our development projects when considering new releases.  Here are a select few… 

Content migration has become more robust as Survey123, StoryMap, WebScene, ExperienceBuilder, and ArcGIS Dashboard items are now supported by the clone_items() method.  Additionally, we have added the new favorite property to help you organize and access your most frequently used items—think of this as a bookmark to your most routinely used content.  And for our customers who use the API for raster workflows, we have added more capabilities to work with STAC datasets in the RasterCollection.from_stac_api() and Raster.from_stac_item() methods. 

GIS Services  

One of the main roles of the Python API is to “be the API to your web GIS”.  As such, we pay close attention to updates and changes that occur within the larger ArcGIS system (e.g. ArcGIS Enterprise and Online), then add functionality to the API so you can leverage these updates and changes in a programmatic manner.  In this release, we’ve added support for new ArcGIS service datatypes such as BigInteger, TimeOnly, DateOnly, and TimestampOffset, and added a PlacesAPI class to support the new Places service beta feature.  Expect to see additional functions and methods in this class after the Places service is released into the market!  

ArcGIS Knowledge Graph support 

This release also addresses another recurring user request: the ability to automate management of Knowledge Graphs through the ArcGIS API for Python. Users can now perform a host of operations when connecting to their Knowledge Graph servers, including adding/ /editing/deleting entities and relationships, editing the data model, and performing advanced queries with bind parameters. More info can be found in our 3-part Guide and in the API Reference. Stay tuned for additional functionality and support in future Python API releases as the Knowledge Graph product grows. 

Analysis and Data Science 

The Spatially Enabled DataFrame (SeDF) allows you to easily convert your ArcGIS feature layers, feature classes, shapefiles, GeoJSON, etc. into pandas DataFrames, which makes it a powerful bridge between ArcGIS and the Python data science ecosystem.  Because of this, we listen to your feedback and work hard to hone its capabilities with each release.   

In version 2.2.0, we have added the ability to compare and test for equality between two SeDFs using an implementation of the pandas DataFrame.eq() function in the Python API’s GeoAccessor class.  This type of functionality can be handy for tasks such as comparing your copy of a SeDF to a master version, or checking to see if a new version of a SeDF has any updated cell values, new rows, or new columns.  We have also expanded our SeDF/big data integration story by adding the  GeoDaskSpatialAccessor and GeoDaskSeriesAccessor classes, which bring the parallel processing capabilities of Dask DataFrames to the Spatially Enabled DataFrame. 

As always, we continue to innovate and evolve in the area of GeoAI (machine learning and deep learning) by adding new functionality to the arcgis.learn module of the Python API.  Some highlights in this release include: 

SDK (Documentation, guides, and samples) 

New sample notebooks for GIS administration and content management workflows.

Community and Collaboration 

We encourage you to access our growing collection of resources that provide additional guidance for Python API and we also request that you continue to share your feedback with us.  You can use the ArcGIS API for Python Esri Community page to  ask specific questions, suggest ideas for enhancements and improvements, connect with other users, and read recent blogs.  You can also use the ArcGIS API for Python Public GitHub Repo to submit bugs, enhancement requests, and other issues.  The team really does monitor these pages very closely, and we use your feedback and suggestions to help us prioritize what we build into the API going forward.  So please use them!  

About the authors

Nick Giner is a Product Manager for Spatial Analysis and Data Science. Prior to joining Esri in 2014, he completed Bachelor’s and PhD degrees in Geography from Penn State University and Clark University, respectively. In his spare time, he likes to play guitar, golf, cook, cut the grass, and read/watch shows about history.

Connect:

Product Marketing Manager in the Imagery & Remote Sensing team at Esri with a passion for AI and big data analytics.

Connect:

Next Article

Empowering Communities with Open Data

Read this article