Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Extended functionality for Esri's ArcPy site-package

Project description


arcpyext provides a collection of helper functions that make common tasks performed with the Esri ArcPy site-package
easier to accomplish. It was chiefly developed to service a command-line tool set (agstools) for managing ArcGIS
environments, but can readily be used within other scripts.


Currently, arcpyext has functionality for changing data sources for map document layers, preparing map documents for
publishing, and performing CRUD operations within an edit session on a geo-database.

The *data* module wraps the basic create, update and delete operations in an edit session, automatically starting/
stoping/aborting an edit operation as appropriate. The functions simply wrap the appropriate *arcpy.da* cursors, so
functionally they work identically. Also provided is a handy function for reading rows into a list.


.. code-block:: python

import arcpy

#WORKSPACE = "path/to/sde_database.sde"
WORKSPACE = "path/to/geodatabase.gdb"
TABLE = "Countries"

edit_session = arcpy.da.Editor(WORKSPACE)

try:, TABLE, "Name LIKE 'A%'", ('Name'))
except RuntimeError, re:

del edit_session

See the associated tests for more code examples.


The *mapping* module provides features for changing the data sources of a layer (or layers) in a map document. Data
source changes can be templated (with simple match criteria) and then applied across an entire map document.

See the associated tests for code examples.

The *publishing* modules provides features for publishing map, image and geo-processing services. This currently
includes functionality for creating and/or editing Service Definition Drafts for each service type.
The following classes are provided in order to edit most of the common Service Definition Draft settings:
- arcpyext.publishing.MapSDDraft
- arcpyext.publishing.ImageSDDraft
- arcpyext.publishing.GPSDDraft

See the associated test for code examples.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
arcpyext-0.5.30-py2-none-any.whl (62.8 kB) Copy SHA256 hash SHA256 Wheel py2

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page