Every now and then, one wants to know which tools and models are inside a Toolbox. A Python Toolbox behaves like a Python module. That means, for example, you can use inspect to list the individual classes, functions, and all attributes. But it is also easier to query the contained tools and models via __all__.<\/P>
import arcpy
def list_tools(toolbox_path: str)->list[str]:
"""
Returns the tool/model names of the specified toolbox.
:toolbox_path: path-like-object representing the full-qualified *.tbx file
"""
toolbox = arcpy.ImportToolbox(toolbox_path)
return toolbox.__all__
list_tools(r"..\ArcGIS\Projects\AIS\AIS.tbx")<\/code><\/pre> <\/P>What is inside your favorite Toolbox?<\/P>