Pyarmor is a command-line tool for obfuscating Python scripts, binding them to specific machines, and setting expiration dates on obfuscated code.
Pyarmor addresses the need to protect Python source code from inspection and unauthorized use. It works by renaming functions, methods, classes, variables, and arguments to make code unreadable, and optionally converts selected Python functions to C functions compiled into machine instructions for irreversible obfuscation. The tool produces standard .py files that can replace originals in most deployment scenarios. It supports binding obfuscated scripts to specific machines by hardware identifier and can enforce expiration dates, causing scripts to stop running after a set time. On Windows, it can additionally apply Themida protection to obfuscated code.
Pyarmor suits projects where source code confidentiality is a business requirement, such as commercial libraries, proprietary applications, or scripts containing sensitive logic. It works across Python 2 and Python 3 on Windows, Linux distributions including embedded systems and Raspberry Pi, and macOS on both Intel and Apple Silicon architectures. The tool offers multiple obfuscation modes to balance between security strength and runtime performance. Adoption requires understanding that the free trial version never expires but has feature limitations; full capabilities require a purchased license.
The project maintains active development with regular updates addressing compatibility across multiple Python versions and architectures. Documentation is extensive, covering getting started, detailed feature explanations, and troubleshooting resources. The maintainers provide multiple support channels including a learning system, FAQ, and direct email contact for business inquiries. A third-party AI assistant focused on Pyarmor questions is available, though responses from it do not represent official team positions.