pyEncripto — a tool for encrypting Python projects and securely running them with encrypted modules and assets
Project description
🔐 PyEncripto
PyEncripto is a tool for encrypting Python source code and resources (assets) with secure runtime decryption. It is designed to protect intellectual property and create encrypted Python packages.
🚀 Features
- 🔒 Encrypt
.pyfiles into.crptusing AES (CFB mode) - 📦 Package and encrypt resources (from
assets/folder) intoassets.pak - 🧹 Runtime loading of encrypted modules
- 🖼 Runtime loading and decryption of encrypted assets (images, sounds, etc.)
- 🔑 Support for encryption keys
- 🧪 Run encrypted projects with preserved
main.main()interface
📦 Installation
pip install pyencripto
💠 Usage
1. Encrypt a project
pyencripto encrypt <source_folder> <output_folder> --key <key>
Example:
pyencripto encrypt ./my_project ./my_project_crpt --key secret123
What happens:
- All
.pyfiles are encrypted and saved with.crptextension - The
assets/folder is encrypted and packed intoassets.pak
⚠️ The
.crptextension is mandatory! It is used by the module loader.
2. Run an encrypted project
pyencripto run <encrypted_project_folder> <key>
Example:
pyencripto run ./my_project_crpt secret123
The project must contain an encrypted
main.crptfile with amain()function.
📁 Project structure
Original project:
my_project/
├── main.py # contains main()
├── utils/
│ └── helper.py
└── assets/
└── image.png
After encryption:
my_project_crpt/
├── main.crpt
├── utils/
│ └── helper.crpt
└── assets.pak
🔧 Internal modules
encryptor.py— handles project encryptionsecure_runtime.py— loads.crptmodules and decrypts assets at runtimecli.py— CLI interface (pyencripto encrypt|run)
🧪 Requirements
- Python 3.10+
pycryptodome(automatically installed)
⚠️ Security notes
- Encryption makes reverse engineering harder but not impossible. Do not treat this as absolute protection.
- The key is stored only in memory but can be extracted during runtime.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyencripto-1.0.0.tar.gz.
File metadata
- Download URL: pyencripto-1.0.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fab3c83b58d23f3058289b1c33cbecdce0107fd26ef09f00ac83dc7513a149
|
|
| MD5 |
0699c917ef18c9c022902ec0185b2462
|
|
| BLAKE2b-256 |
33a99aca7aa8fd1680115a42d3ca6b0455030b279a509bfe763267731ef55ec9
|
File details
Details for the file pyencripto-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyencripto-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cda7b6cd78c759098ba2fafb1acfab2e41e40bdb46f043e78dab4c0ffb19484
|
|
| MD5 |
5ebc946890aaedf4aaef2c74ba76d5eb
|
|
| BLAKE2b-256 |
15f8196c85f244816d3c2b61602a40e6762fd143e9b6333c7ae353f064cf599f
|