pyarmor
A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
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 pyarmoruv
uv add pyarmorpoetry
poetry add pyarmorInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pyarmor.cli.coreProvides prebuilt extension modules required by…
unclear · top 15,000 on PyPI
pyarmor.cli.core.alpinePyarmor CLI Core Alpine provides pre-built…
unclear · top 15,000 on PyPI
hashidsGenerates short, unique, non-sequential hashes…
permissive · top 5,000 on PyPI
jsbeautifierBeautifies, unpacks, and deobfuscates…
permissive · top 5,000 on PyPI
expiring-dictExpiringDict is a Python dictionary that…
permissive · top 15,000 on PyPI
pyragepyrage provides Python bindings to the Rust…
permissive · top 15,000 on PyPI
pyAesCryptEncrypts and decrypts files and binary streams…
permissive · top 15,000 on PyPI
django-session-timeoutAdds automatic session expiration to Django…
permissive · top 15,000 on PyPI
nono-pynono-py provides Python bindings for…
permissive · top 15,000 on PyPI