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

EncryptPYT

  • Summary
  • Discussion
  • Syntax
  • Code sample

Summary

Encrypts a Python toolbox file.

Caution:

The encryption of a Python toolbox is performed in place and will overwrite the original unencrypted .pyt file. It is recommended to back up the input file to avoid the loss of its contents in case the password is forgotten.

Discussion

A Python toolbox can also be encrypted by clicking on the toolbox within ArcMap.

Syntax

EncryptPYT (toolbox, password)
ParameterExplanationData Type
toolbox

The Python toolbox that will be encrypted in place.

String
password

The password used to lock the encrypted Python toolbox.

String

Code sample

EncryptPYT example

Encrypt a Python toolbox.

import arcpy

toolbox = 'd:/tools/analysis.pyt'
password = '<your password>'

arcpy.EncryptPYT(toolbox, password)

Related topics

  • DecryptPYT
  • Encrypting 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