Skip to main content

Describe object properties

Summary

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

Properties

Property Explanation Data 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))