skillfed

pyarmor

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

pyarmor v9.2.6 649.7K downloads/30d#5,571 on PyPI5,168
License unclear Free To Use But Restricted Active released

What it is and what it does

Pyarmor is a command-line tool that transforms Python scripts into obfuscated versions that remain valid `.py` files but with renamed identifiers and optional C-compiled functions. It supports binding obfuscated scripts to specific machines or adding expiration dates, making it useful for protecting proprietary code before distribution.

The tool generates obfuscated output that can typically replace original scripts without modification. It offers multiple obfuscation strategies to balance security and performance, and supports Python 3.7–3.15 across Windows, Linux, macOS (Intel and Apple Silicon), and embedded systems. No runtime dependencies are required beyond the pyarmor command itself.

Use it for:

  • Obfuscate proprietary Python applications before shipping to customers or deploying to untrusted environments
  • Bind obfuscated scripts to specific machines to prevent unauthorized copying or redistribution
  • Add expiration dates to obfuscated scripts for time-limited licenses or trial periods
  • Convert performance-critical Python functions to compiled C code while protecting the overall codebase
  • Protect intellectual property in closed-source Python tools distributed as standalone executables

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pyarmor obfuscates Python scripts to protect source code, and can bind obfuscated scripts to specific machines or set expiration dates.

Yes, if you need to protect Python source code and the non-standard license terms are acceptable for your use case. The tool is actively maintained, has no dependencies, and installs easily. However, verify the 'Free To Use But Restricted' license carefully before using it in commercial or open-source projects, and test obfuscated output thoroughly in your target environment.

Install

pyarmor on PyPI

pip

pip install pyarmor

uv

uv add pyarmor

poetry

poetry add pyarmor

Installing pyarmor

Before you install

Low install friction with no runtime dependencies. Actively maintained with a recent release 22 days ago and ongoing repository activity.

License in practice

License is marked 'Free To Use But Restricted' with no SPDX identifier, meaning terms are non-standard and unclear—review the actual license before relying on this tool in commercial or open-source projects.

Quickstart

pip install pyarmor
pyarmor gen foo.py
python dist/foo.py

Verify before relying

  • Whether 'Free To Use But Restricted' license permits commercial distribution of obfuscated scripts
  • Whether obfuscated output maintains full compatibility with all Python 3.7–3.15 features in practice
  • Performance overhead of obfuscated scripts compared to originals

Package facts

License Free To Use But Restricted (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 22 days since the last release
Last repo commit
First released
Downloads 649,651/month — #5,571 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyarmor-9.2.6-2-py3-none-any.whl; pyarmor-9.2.6-3-py3-none-any.whl; pyarmor-9.2.6-4-py3-none-any.whl; pyarmor-9.2.6-py3-none-any.whl

Keywords: protect, obfuscate, encrypt, obfuscation, distribute

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: Free To Use But RestrictedOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: SecurityTopic :: Software Development :: Build ToolsTopic :: System :: Software DistributionTopic :: Utilities

Tags

python script obfuscationprotect python source codepython code encryptionmachine binding for pythonpython script expirationpython code protection toolirreversible python obfuscation
code-protectionobfuscationlicensing-unclear

More Utilities packages