Skip to main content
Help us improve Python packaging – donate today!

A command line tool used to import or run encrypted python scripts.

Project Description

Pyarmor is a command line tool used to import or run obfuscated python scripts. Only by a few extra files, pyarmor can run and imported obfuscated files in the normal python environments.

Pyarmor just likes an enhancement by which python could run or import obfuscated scripts.

Main Features

  • Run obfuscated script or import obfuscated module
  • Expire obfuscated files
  • Bind obfuscated files to harddisk, mac address, ip address etc.

Support Platforms

  • Python 2.5, 2.6, 2.7 and Python3
  • Prebuilt Platform: win32, win_amd64, linux_i386, linux_x86_64, darwin_x86_64
  • Embeded Platform: Raspberry Pi, Banana Pi, ts-4600

Installation

Got source package from pypi/pyarmor

Pyarmor is a command line tool, main script is pyarmor.py. After you got source package, unpack it to any path, then run paramor.py as common python script

python pyarmor.py

Basic Usage

The following examples show how to obfuscate a python package pybench, which locates in the examples/pybench in the source of pyarmor.

Obfuscate package pybench:

python pyarmor.py obfuscate --src examples/pybench --entry pybench.py \
                            "*.py" "package/*.py"

# Note that quotation mark is required for file patterns, otherwise
# it will be expanded base on current path by shell.
#
# This command will create a extra file .pyarmor_capsule.zip in the
# --src path, and save all the obfuscated scripts to default output
# path "dist" in the current path
#
cd dist

# Check obfuscated script
cat pybench.py

# Run obfuscated script
python pybench.py

Use project to manage obfuscated scripts:

mkdir projects
python pyarmor.py init --src examples/pybench --entry pybench.py \
                       projects/pybench

# This command will create 2 files: .pyarmor_config, .pyarmor_capsule.zip
# in the project path "projects/pybench"
cd projects/pybench

# And there is a shell script "pyarmor" is created at the same time.
# (In windows, the name is "pyarmor.bat")
#
# Now run command "build" to obfuscated all the scripts
#
./pyarmor build

# Check obfuscated script
cd dist
cat pybench.py

# Run obfuscated script
python pybench.py

Start a webui to manage project:

# For windows
webui/manager.bat

# For linux
webui/manager.sh

Here is online demo Pyarmor Demo

More usage, refer to user-guide.md in the source package.

How to obfuscate python scripts by Pyarmor, refer to mechanism.md in the source package.

For more information, refer to Pyarmor Homepage

Release history Release notifications

History Node

3.9.0

History Node

3.8.10

History Node

3.8.9

History Node

3.8.8

History Node

3.8.7

History Node

3.8.6

History Node

3.8.5

History Node

3.8.4

History Node

3.8.3

History Node

3.8.2

History Node

3.8.1

History Node

3.8.0

History Node

3.7.5

History Node

3.7.4

History Node

3.7.3

History Node

3.7.2

History Node

3.7.1

History Node

3.7.0

History Node

3.6.2

History Node

3.6.1

History Node

3.6.0

History Node

3.5.1

History Node

3.5.0

This version
History Node

3.4.3

History Node

3.4.2

History Node

3.4.1

History Node

3.4.0

History Node

3.3.1

History Node

3.3.0

History Node

3.2.1

History Node

3.2.0

History Node

3.1.7

History Node

3.1.6

History Node

3.1.5

History Node

3.1.4

History Node

3.1.3

History Node

3.1.2

History Node

3.1.1

History Node

3.0.1

History Node

2.6.1

History Node

2.5.5

History Node

2.5.3

History Node

2.5.2

History Node

2.5.1

History Node

2.4.1

History Node

2.3.4

History Node

2.3.3

History Node

2.3.2

History Node

2.3.1

History Node

2.2.1

History Node

2.1.2

History Node

2.1.1

History Node

2.0.1

History Node

1.7.7

History Node

1.7.6

History Node

1.7.5

History Node

1.7.4

History Node

1.7.3

History Node

1.7.2

History Node

1.7.1

History Node

1.7.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyarmor-3.4.3.zip (1.2 MB) Copy SHA256 hash SHA256 Source None Feb 5, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page