GitPedia

Pyarmor

A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

From dashingsoft·Updated June 23, 2026·View on GitHub·

Pyarmor is a command-line tool designed for obfuscating Python scripts, binding obfuscated scripts to specific machines, and setting expiration dates for obfuscated scripts. The project is written primarily in Python, distributed under the Other license, first published in 2017. It has gained significant community traction with 5,117 stars and 357 forks on GitHub. Key topics include: obfuscate, obfuscate-scripts, obfuscation, python, python-script.

Latest release: v9.2.5Release 9.2.5
May 20, 2026View Changelog →

Pyarmor

Pyarmor is a command-line tool designed for obfuscating Python scripts, binding obfuscated scripts to specific machines, and setting expiration dates for obfuscated scripts.

Key Features

  • Seamless Replacement: Obfuscated scripts remain as standard .py files, allowing them to seamlessly replace the original Python scripts in most cases.
  • Balanced Obfuscation: Offers multiple ways to obfuscate scripts to balance security and performance.
  • Irreversible Obfuscation: Renames functions, methods, classes, variables, and arguments.
  • C Function Conversion: Converts some Python functions to C functions and compiles them into machine instructions using high optimization options for irreversible obfuscation.
  • Script Binding: Binds obfuscated scripts to specific machines or sets expiration dates for obfuscated scripts.
  • Themida Protection: Protects obfuscated scripts using Themida (Windows only).

Supported Platforms

  • Python 2 and Python 31
  • Windows
  • Various Linux distributions, including embedded systems and Raspberry Pi
  • Apple Intel and Apple Silicon
  • Supported architectures: x86_64, aarch64, armv7, etc.2

For more information, check out the Pyarmor Environments.

Quick start

  1. Install Pyarmor:
shell
pip install pyarmor
  1. Obfuscate the foo.py script:
shell
pyarmor gen foo.py

This command generates an obfuscated script like this at dist/foo.py:

python
from pyarmor_runtime import __pyarmor__ __pyarmor__(__name__, __file__, b'\x28\x83\x20\x58....')
  1. Run the obfuscated script:
shell
python dist/foo.py

For more information, check out the getting started tutorial.

License

Pyarmor is published as shareware. The free trial version never expires, but has some limitations.

Refer to Pyarmor licenses for information on license types, features, limitations, and purchasing a Pyarmor license.

Please read the Pyarmor EULA.

Getting Help

There is also one third-party learn platform

  • Ask Pyarmor Guru, it is a Pyarmor-focused AI to answer your questions (not made by Pyarmor Team, the answer doesn't stand for Pyarmor Team's opinion)

Resources

中文资源

Changelog

Each major version comes with a separate changelog file, detailing fixed issues, new features, and compatibility issues between different versions.

Make sure to read the changelog carefully before upgrading Pyarmor:

Full changelogs at releases

Upcoming features at Pyarmor Release Plan

Footnotes

  1. Some features may be exclusive to Python 3.

  2. Some features may be exclusive to specific architectures.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from dashingsoft/pyarmor via the GitHub API.Last fetched: 6/24/2026