ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Creating a new Python toolbox

A Python toolbox (.pyt) is a simple text file that can be created, viewed, and edited in any text editor such as Notepad or VI, or any Python integrated development environment (IDE).

The toolbox is created as a class named Toolbox. In the Toolbox class' __init__ method, properties of the toolbox are defined, including the alias, label, and description. The name of the toolbox is defined by the name of the .pyt file. The tools property must be set to a list containing all tool classes defined in the toolbox.

Tip:

To ensure the Python toolbox is recognized correctly, the toolbox class name must remain Toolbox.

By default, the Python toolbox template creates a stubbed-out tool named Tool. The template code used to create the Python toolbox is shown in The Python toolbox template topic.

  1. In the Catalog window, right-click the folder in which you want to create the new Python toolbox, and click New > Python Toolbox.

Related topics

  • The Python toolbox template
  • Editing a Python toolbox
  • What is a Python toolbox?

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal