
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
A lightweight, open-source tool for Python code obfuscation. CodeEnigma helps protect your logic from reverse engineering and unauthorized access, making it a practical alternative to PyArmor for securely distributing your Python applications
A lightweight, open-source tool for Python code obfuscation. CodeEnigma helps protect your logic from reverse engineering and unauthorized access, making it secure to distribute your Python applications.
After searching extensively for a free and open-source Python obfuscation tool, I realized that most available options were either paid, closed-source, or opaque in how they worked. I wasn't comfortable letting a black-box tool obfuscate my production code without knowing exactly what it was doing — especially when it had access to sensitive logic.
So I built CodeEnigma — a transparent, self-contained solution that gives you full control over the obfuscation process, with no hidden logic and no external servers involved.
This project is inspired by PyArmor but with a different approach.
The working principle of CodeEnigma is simple:
private.py
compile(code, str(file_path), "exec")
zlib.compress(compiled_code)
base64.b64encode(compressed_code)
AESGCM(SECRET_KEY).encrypt(NONCE, obfuscated, associated_data=None)
refer for more details:Using Poetry:
poetry add codeenigma
Using pip:
pip install codeenigma
CodeEnigma comes with a user-friendly command-line interface powered by Typer. The CLI provides helpful prompts and rich output.
To obfuscate a Python module:
codeenigma obfuscate /path/to/your/module
--expiration
, -e
: Set an expiration date for the obfuscated code (YYYY-MM-DD)--output
, -o
, --dist
: Specify output directory (default: 'dist')--verbose
, -v
: Show detailed outputObfuscate with an expiration date:
The following example will obfuscate the module and set the expiration date to December 31, 2025, at 23:59:59+0530 (IST).
codeenigma obfuscate /path/to/your/module -e "2025-12-31 23:59:59+0530"
Specify custom output directory:
codeenigma obfuscate /path/to/your/module -o custom_output
To check the installed version:
codeenigma version
Contributions are welcome! This is a complete free and open-source project. If you have any suggestions or find any bugs, please open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A lightweight, open-source tool for Python code obfuscation. CodeEnigma helps protect your logic from reverse engineering and unauthorized access, making it a practical alternative to PyArmor for securely distributing your Python applications
We found that codeenigma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.