Share Package (Data Management)
Summary
Shares a layer or map package by publishing to ArcGIS online.
Usage
- To share a layer or map package on ArcGIS.com, your ESRI global account needs to be registered as a member of ArcGIS Online. To create an ESRI global account and register it, go to http://www.arcgis.com/home/signup.html
- To share a package online, a summary and one or more tags are required. The summary and tags, along with package description and credits, will be used when searching for packages online.
Syntax
Parameter | Explanation | Data Type |
in_package |
Input layer (.lpk) or map (.mpk) package file. | File |
username |
ESRI global account user name. | String |
password |
ESRI global account password. | Encrypted String |
summary |
Summary of package. The summary is displayed in the item information of the package on ArcGIS.com. | String |
tags |
Tags used to describe and identify the package. Individual tags are separated using either a comma or semicolon. | String |
credits (Optional) |
Credits for the package. This is generally the name of the organization that is given credit for authoring and providing the content for the package. | String |
public (Optional) |
Specifies if input package will be shared and available to everybody.
| Boolean |
groups [group_name,...] (Optional) |
List of groups to share package with. | String |
Code Sample
Find all the map packages that reside in a specified folder and share them on ArcGIS online.
# Name: SharePackageEx1.py # Description: Find all the map packages that reside in a specified folder and share them on ArcGIS online. # Author: ESRI # import system modules import os import arcpy from arcpy import env # Set environment settings env.overwriteOutput = True env.workspace = "C:/data/my_packages" # Loop through the workspace, find all the layer and map packages for mpk in arcpy.ListFiles("*.mpk"): print "Sharing " + mpk arcpy.SharePackage_management(mpk,"username","password","This is a summary","tag1, tag2","Credits","MYGROUPS","My_Group")