Describe object properties

Summary

The Describe function returns the following properties for all Describe objects.

Properties

PropertyExplanationData Type
baseName
(Read Only)

The file base name.

String
catalogPath
(Read Only)

The path of the data.

String
children
(Read Only)

A list of sub elements.

If describing a workspace, the children property returns the contents of that workspace, including various data types such as feature classes, tables, rasters, and feature datasets.

Describe
childrenExpanded
(Read Only)

Indicates whether the children have been expanded.

Boolean
dataElementType
(Read Only)

The element type of the element.

String
dataType
(Read Only)

The type of the element.

String
extension
(Read Only)

The file extension.

String
file
(Read Only)

The file name.

String
fullPropsRetrieved
(Read Only)

Indicates whether full properties have been retrieved.

Boolean
metadataRetrieved
(Read Only)

Indicates whether the metadata has been retrieved.

Boolean
name
(Read Only)

The user-assigned name for the element.

String
path
(Read Only)

The file path.

String

Code sample

Describe object properties example

Display some Describe object properties for a file geodatabase.

import arcpy

# Create a Describe object
#
desc = arcpy.Describe("C:/Data/chesapeake.gdb")

# Print some Describe Object properties
#
if hasattr(desc, "name"):
    print("Name:        " + desc.name)
if hasattr(desc, "dataType"):
    print("DataType:    " + desc.dataType)
if hasattr(desc, "catalogPath"):
    print("CatalogPath: " + desc.catalogPath)

# Examine children and print their name and dataType
#
print("Children:")
for child in desc.children:
    print("\t%s = %s" % (child.name, child.dataType))