Extracts the contents of a layer or map package to a specified folder. The contents of the output folder is updated with the contents of the input package.
Example: Extract a Layer Package
import arcpy
import os
package = arcpy.GetParameterAsText(0)
destinationFolder = arcpy.GetParameterAsText(1)
extracted = destinationFolder + os.sep + 'unpackedLayers'
arcpy.ExtractPackage_management(package, extracted)
arcpy.SetParameterAsText(2,extracted)