python-app-bundle-shield
The Python App Bundle Shield Script is a powerful, user-friendly tool designed to help developers create standalone protected applications and executable files based on Python scripts of varying complexity. This cross-platform solution, allowing you to package your Python code into self-contained executables for secure distribution.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords
Repository
The Python App Bundle Shield Script is a powerful, user-friendly tool designed to help developers create standalone protected applications and executable files based on Python scripts of varying complexity. This cross-platform solution, allowing you to package your Python code into self-contained executables for secure distribution.
Basic Info
- Host: GitHub
- Owner: alphabetanetcom
- License: other
- Language: Python
- Default Branch: main
- Homepage: https://alphabetanet.com
- Size: 14 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
Python App Bundle Shield Script Documentation
Version: 1.3 GUI
© 2024 αβ.net (alphabetanet.com) - Alpha Beta Network. All Rights Reserved.
Note: This project is currently in Beta Testing and available for free.
Table of Contents
- 1. Introduction
- 2. Key Features
- 3. Main Functions of the Script
- 4. Installation
- 5. User Interface and Command-Line Overview
- 6. Detailed Description of Each Function
- 7. Usage Instructions
- 7.1 Basic Packaging Using the GUI
- 7.2 Packaging with Full Python Runtime Using the GUI
- 7.3 Packaging with Cloud-Protected Scripts Using the GUI
- 7.4 Command-Line Usage Examples
- 7.4.1 Basic Packaging of a Source File
- 7.4.2 Packaging with Full Python Runtime
- 7.4.3 Packaging a Compiled Python File
- 7.4.4 Packaging with Additional Options
- 7.4.5 Full Example with All Options
- 8. Recommendations and Best Practices
- 9. Integration with Alpha Beta Network Tools
- Appendix A: Installation of Required Packages
- Appendix B: Cross-Platform Compatibility
- Appendix C: Contact Information
1. Introduction
The Python App Bundle Shield Script is a powerful, user-friendly tool designed to help developers create standalone protected applications and executable files based on Python scripts of varying complexity. This cross-platform solution supports Python versions 3.6 and above, allowing you to package your Python code into self-contained executables for secure distribution.
Key benefits of using this script include:
- Secure Code Sharing: Utilize advanced encryption and obfuscation methods to protect your Python code during distribution.
- Source Code Protection: Prevent unauthorized access to your code with multi-level protection mechanisms.
- Seamless Application Updates: Update your applications without requiring end-users to reinstall them when using Alpha Beta Network cloud platform protection tools.
- Usage Restrictions: Implement restrictions on each instance of your application, such as expiration dates, hardware-bound licensing, usage frequency limits, and more.
- Cross-Platform Compatibility: Create applications that work on Windows, macOS, Linux/Unix, and other operating systems where Python 3.6+ is installed.
- Ease of Use: Package applications with just a few clicks using a simple graphical interface or automate the process with command-line arguments, without the need for complex configurations.
By combining the Python App Bundle Shield with other tools from the Alpha Beta Network cloud platform, developers can achieve the widest and most flexible possibilities for secure distribution of their applications.
2. Key Features
Unique Code Analysis Technology: Automatically analyzes and collects data about imported modules and dependencies, allowing the use of obfuscated
.pycode and compiled.pycfiles from Python version 3.6 onwards.Automatic Embedding of Python Environment: Embeds your complete configured Python environment with all imported modules and packages installed via
pipinto the application build.Additional Protection Layers: Implements code obfuscation and encryption of created executable files for enhanced security.
Seamless Updating of Applications: Allows updating of created applications (fixing bugs, adding functionality) without the need to reinstall them when using Alpha Beta Network cloud protection tools like the Secure Python Code Manager Script.
Usage Restrictions: Enables the implementation of restrictions on the use of each instance of your program (by expiration date, allowed user hardware, usage frequency, and more) when using Python scripts with Alpha Beta Network cloud protection tools (Python Obfuscator Online and Secure Python Code Manager Script), as well as local protection tools that do not require internet access (Local Python Code Protector Script and Python Binary Optimization Compiler).
Support for Cloud-Protected Scripts: Provides extensive capabilities to use Python scripts protected by the Alpha Beta Network cloud platform, facilitating secure code sharing and source code protection.
Ease of Use: Features a simple, user-friendly graphical interface and command-line support that requires no complex configurations, allowing you to create secure standalone applications with minimal effort.
3. Main Functions of the Script
Packaging Python Scripts into Executables: Converts Python source files (
.py) and compiled files (.pyc) into standalone executables, making them runnable on systems without requiring Python installation. This can be done via a user-friendly graphical interface or through command-line arguments for automation and scriptability.Command-Line Interface Support: Provides flexible command-line arguments for advanced users who prefer automation or need to integrate the packaging process into scripts and build processes.
Embedding Full Python Runtime: Optionally embeds the entire Python runtime environment and all necessary dependencies into the executable, ensuring functionality even on systems without Python installed.
Code Obfuscation and Encryption: Applies multi-level protection with dynamic encryption and obfuscation techniques to enhance Python code security.
Integration with Cloud Protection Tools: Facilitates the use of scripts protected by Alpha Beta Network cloud platform tools, enabling seamless updates and implementation of usage restrictions.
4. Installation
Before using the Python App Bundle Shield Script, ensure that you have Python 3.6+ installed on your system.
4.1 Installing Required Packages
The script requires the following Python packages:
requestspsutilcryptographydecompyle3xdisastorpyinstallertkinter(usually included with Python)
You can install them using pip:
bash
pip install requests psutil cryptography decompyle3 xdis astor pyinstaller
Note: For Windows users,
tkintermay not be included by default. You may need to run the Python installer again and select the option to installtkinter.
Ensure that you are using the correct version of pip associated with your Python 3 installation. If you are using a virtual environment, activate it before installing the packages.
4.2 System Requirements
- Operating System: Windows, macOS, Linux/Unix, or any OS where Python 3.6+ is installed.
- Python Version: Python 3.6 or higher.
- Dependencies: As listed above.
5. User Interface and Command-Line Overview
The Python App Bundle Shield features both a graphical user interface (GUI) and command-line interface (CLI) to accommodate different user preferences.
5.1 Graphical User Interface (GUI)
The GUI includes the following components:
- File Selection: Browse and select the Python file (
.pyor.pyc) you wish to package. - Options:
- Auto embed full python runtime: Includes the full Python environment and all installed
pippackages in the build. Useful when your script uses additional modules or cloud-protected scripts. - Disable Console Window: Hides the console window when running the application (useful for GUI applications).
- Create a One-File Bundled Executable: Packages everything into a single executable file.
- Auto embed full python runtime: Includes the full Python environment and all installed
- Additional Modules: Specify any additional modules (comma-separated) that need to be included.
- Progress Display: Shows the progress of the packaging process.
- Messages: Displays logs and messages during the process.
5.2 Command-Line Interface (CLI)
The CLI offers the same functionality as the GUI but allows for automation and integration into scripts:
- Basic Usage:
bash
python python_app_bundle_shield.py -f <path_to_file> [options]
Options:
-f,--file: (Required) Path to the Python source file (.py) or compiled file (.pyc).-a,--autoembed: Auto embed the full Python runtime and all installedpippackages.-w,--windowed: Disable the console window for the packaged application.-o,--onefile: Create a one-file bundled executable.-m,--module: Specify additional modules to include (comma-separated).
6. Detailed Description of Each Function
6.1 Packaging Python Source Files
The script packages Python source files (.py) into standalone executables. This can be done via the GUI or command line. It performs the following steps:
- Code Analysis: Automatically analyzes the code to detect imported modules and dependencies.
- Code Obfuscation: Applies multi-level obfuscation and encryption to the code.
- Dependency Inclusion: Includes necessary modules and packages in the build.
- Executable Creation: Uses PyInstaller to create the executable file.
Command-Line Usage Example:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py
6.2 Packaging Compiled Python Files
The script can also package compiled Python files (.pyc), including those from Python version 3.6 onwards without available decompilers. It handles:
- Version Detection: Determines the Python version used to compile the
.pycfile. - Code Handling: Converts the
.pycfile back to a safe code representation and re-protects it. - Executable Creation: Packages the code into an executable, ensuring compatibility with the required Python version.
Command-Line Usage Example:
bash
python python_app_bundle_shield.py -f /path/to/your_compiled_script.pyc
6.3 Embedding the Full Python Runtime
By activating the Auto embed full python runtime option (either in the GUI or via the -a flag in the command line), the script:
- Includes Python Interpreter: Embeds the Python interpreter into the application build.
- Includes Installed Packages: Automatically includes all modules and packages installed via
pipin your current environment. - Creates Universal Environment: When using cloud-protected scripts, it creates a special universal environment to maximize functionality and ensure smooth interaction with imported modules.
Command-Line Usage Example:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -a
6.4 Additional Protection Layers
The script enhances security by:
- Code Obfuscation: Implements multi-level code obfuscation techniques.
- Encryption: Encrypts the code within the executable.
- Execution Restrictions: Supports usage restrictions when used in conjunction with Alpha Beta Network protection tools.
7. Usage Instructions
7.1 Basic Packaging Using the GUI
To package a Python source file into an executable using the GUI:
- Launch the Script: Run the
python_app_bundle_shield.pyscript. - Select Your File: Click "Browse" and select your
.pyfile. - Click "Start": The script will package your file into an executable in the
distdirectory.
7.2 Packaging with Full Python Runtime Using the GUI
If your script uses additional modules or packages installed via pip, or you are using cloud-protected scripts, it is recommended to embed the full Python runtime:
- Select Your File: As above.
- Enable "Auto embed full python runtime": Check the option.
- Optional: Specify any additional modules in the "Additional Modules" field. If your application requires additional modules that are not automatically detected, you can specify them (comma-separated) in the Additional Modules field.
- Click "Start": The script will package your file into an executable, including the full Python runtime.
7.3 Packaging with Cloud-Protected Scripts Using the GUI
When using scripts protected by Alpha Beta Network cloud tools:
- Obtain Cloud-Protected Script: Use the Python Obfuscator Online or Secure Python Code Manager Script to obtain your protected script.
- Select Your File: Choose the cloud-protected
.pyfile. - Enable "Auto embed full python runtime": Check the option.
- Click "Start": The script will create an executable optimized for cloud-protected scripts.
Note: If your cloud-protected script uses external programs (besides packages installed via pip), you can try copying these programs to the _internal directory of the created application and verify functionality.
7.4 Command-Line Usage Examples
The Python App Bundle Shield now supports operation via command-line arguments, enabling automation and scripting capabilities.
7.4.1 Basic Packaging of a Source File
To package a Python source file into an executable using the command line:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py
This command will package your_script.py into an executable in the dist directory.
7.4.2 Packaging with Full Python Runtime
If your script uses additional modules or requires the full Python environment:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -a
The -a or --autoembed flag instructs the script to embed the full Python runtime and all installed packages.
7.4.3 Packaging a Compiled Python File
To package a compiled Python file (.pyc):
bash
python python_app_bundle_shield.py -f /path/to/your_compiled_script.pyc
The script will handle version detection and packaging appropriately.
7.4.4 Packaging with Additional Options
You can combine multiple options to customize the packaging process:
- Disable Console Window:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -w
- Create a One-File Executable:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -o
- Specify Additional Modules:
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -m module1,module2
7.4.5 Full Example with All Options
bash
python python_app_bundle_shield.py -f /path/to/your_script.py -a -w -o -m requests,psutil
This command will:
- Package
your_script.pyinto a one-file executable. - Embed the full Python runtime (
-a). - Disable the console window (
-w). - Include the additional modules
requestsandpsutil(-m requests,psutil).
8. Recommendations and Best Practices
Use Separate Environments: When embedding the full Python runtime, it's recommended to use a separate environment configured specifically for your script to keep the build size compact.
Test on Clean Systems: Test your application's autonomy on a clean virtual machine or sandbox where only the operating system is installed.
Use Cloud Protection for Enhanced Security: Consider using the Alpha Beta Network cloud platform protection tools for advanced code encryption and secure distribution.
Match Operating Systems: Create standalone applications on the operating system where future use is planned and with the same architecture.
Use Appropriate Python Version: Use the tool in an environment with the Python version that is directly required for your script's operation.
Handle External Dependencies: If your script uses external programs, include them in the
_internaldirectory of the application build.Avoid Untrusted Scripts: Do not use this tool to create applications based on Python scripts from unreliable or unknown sources, as the code is automatically executed for analysis.
Leverage Command-Line Interface for Automation: Utilize the command-line interface for integrating the packaging process into your build automation scripts or continuous integration pipelines.
Combine with Alpha Beta Network Tools: Combine this script with other Alpha Beta Network tools for multi-layered protection.
9. Integration with Alpha Beta Network Tools
Combining the Python App Bundle Shield with other tools from the Alpha Beta Network cloud platform provides the widest and most flexible possibilities for secure distribution:
Python Obfuscator Online: Use for advanced cloud-based code obfuscation and protection.
Secure Python Code Manager Script: Manage licenses, implement usage restrictions, and seamlessly update applications.
Local Python Code Protector Script: Apply local protection without requiring internet access.
Python Binary Optimization Compiler: Compile Python code into native machine code executables for performance optimization and code protection.
By integrating these tools, you can enhance secure code sharing, enforce source code protection, and implement flexible licensing and usage restrictions.
Appendix A: Installation of Required Packages
Ensure the following packages are installed:
bash
pip install requests psutil cryptography decompyle3 xdis astor pyinstaller
If you encounter issues related to package versions or compatibility, consider creating a virtual environment for your project.
Appendix B: Cross-Platform Compatibility
The Python App Bundle Shield supports packaging applications for:
- Windows
- macOS
- Linux/Unix
Notes:
- Create the executable on the target operating system for best compatibility.
- For Windows, the executable will have a
.exeextension. - On macOS and Linux, you may need to run
chmod +xon the executable to make it runnable.
Appendix C: Contact Information
If you experience issues or have questions, please contact the Alpha Beta Network Research Team.
- Website: https://alphabetanet.com | https://αβ.net
- Official Telegram Channel: https://t.me/alphabetanetcom
Stay connected to receive updates, provide feedback, and get early access to extended functionality.
© 2024 αβ.net (alphabetanet.com) - Alpha Beta Network. All Rights Reserved.
Owner
- Name: Pavel Izosimov (Alpha Beta Network)
- Login: alphabetanetcom
- Kind: user
- Website: https://alphabetanet.com/
- Repositories: 1
- Profile: https://github.com/alphabetanetcom
🚀 Creator of αβ.net - Python Code Sharing Platform 🔒 Focused on Secure Code Transfer 🌐 Open Source Enthusiast 🔬 Research & Development in Code Security
Citation (CITATION.cff)
cff-version: 1.2.0
title: Python App Bundle Shield
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Pavel
family-names: Izosimov
affiliation: Alpha Beta Network
orcid: 'https://orcid.org/0009-0004-7126-6743'
website: 'https://alphabetanet.com'
repository-code: >-
https://github.com/alphabetanetcom/python-app-bundle-shield
url: 'https://alphabetanet.com/'
repository: >-
https://gitlab.com/alphabetanetcom/python-app-bundle-shield
repository-artifact: >-
https://github.com/alphabetanetcom/python-app-bundle-shield/releases
abstract: >-
The Python App Bundle Shield Script is a powerful, user-friendly
tool designed to help developers create standalone protected
applications and executable files based on Python scripts of
varying complexity. This cross-platform solution, allowing you
to package your Python code into self-contained executables for
secure distribution.
keywords:
- python security
- app protection
- code protection
- python executable
- standalone application
- python bundler
- cross platform development
- encryption tool
- license management
- secure distribution
version: v1.3-beta.1
date-released: '2024-12-27'
license-url: 'https://github.com/alphabetanetcom/python-app-bundle-shield/blob/main/LICENSE.md'
GitHub Events
Total
- Create event: 3
- Issues event: 1
- Release event: 1
- Watch event: 2
- Issue comment event: 1
- Push event: 12
- Gollum event: 4
Last Year
- Create event: 3
- Issues event: 1
- Release event: 1
- Watch event: 2
- Issue comment event: 1
- Push event: 12
- Gollum event: 4