EzCompiler¶

EzCompiler is a comprehensive Python framework for project compilation, version file generation, packaging, and distribution. It provides a clean and typed API suitable for professional and industrial Python applications.
✨ Key Features¶
- ✅ Multi-Compiler Support: Cx_Freeze, PyInstaller, and Nuitka compilation backends
- ✅ Version File Generation: Automatic version file creation for Windows executables
- ✅ Project Packaging: ZIP archive creation with configurable compression
- ✅ Upload Backends: Disk and HTTP server distribution support
- ✅ Template System: Template-based generation for configuration, setup, and version files
- ✅ Fully Typed API: Complete Python 3.11+ type hints for excellent IDE support
- ✅ Modular Validators: 9 specialized validation modules for robust input validation
- ✅ CLI Interface: Interactive command-line tool for automation and batch operations
- ✅ Production Ready: Battle-tested framework for professional applications
🚀 Quick Start¶
Installation¶
Or from source:
First Compilation¶
from ezcompiler import EzCompiler, CompilerConfig
# Create configuration
config = CompilerConfig(
version="1.0.0",
project_name="MyProject",
main_file="main.py",
include_files={"files": [], "folders": []},
output_folder="dist",
)
# Initialize compiler
ezcompiler = EzCompiler(config)
# Compile project
ezcompiler.compile_project(compiler="PyInstaller")
📚 Documentation Structure¶
| Section | Description |
|---|---|
| Getting Started | Installation, basic usage, and first steps |
| API Reference | Complete API documentation for all modules |
| CLI Reference | Command-line interface documentation |
| Examples | Practical examples and use cases |
| User Guides | In-depth guides for configuration and best practices |
🎯 Main Components¶
EzCompiler is organized into 4 main layers:
Interfaces Layer¶
EzCompiler– Main facade class for orchestrating the entire compilation processCLIInterface– Interactive command-line interface with rich output
Services Layer¶
CompilerService– Compiler selection and orchestrationConfigService– Configuration loading and validationTemplateService– Template processing and file generationUploaderService– Upload orchestration and backend selection
Protocols Layer¶
Compilers:
CxFreezeCompiler– Cx_Freeze implementation for directory-based buildsPyInstallerCompiler– PyInstaller implementation for single-file executablesNuitkaCompiler– Nuitka implementation for optimized compilation
Uploaders:
DiskUploader– Local disk upload backendServerUploader– HTTP/HTTPS server upload backend
Utils Layer¶
FileUtils– File operations and validationConfigUtils– Configuration parsing (YAML/JSON)TemplateUtils– Template processing utilitiesZipUtils– ZIP archive operationsValidators– Modular validation package (9 specialized modules)
For detailed documentation, see API Reference.
🔧 CLI Commands¶
EzCompiler provides a comprehensive CLI interface:
# Initialize project interactively
ezcompiler init
# Generate configuration files
ezcompiler generate config --project-name "MyApp"
# Generate setup.py
ezcompiler generate setup --config ezcompiler.yaml
# Generate version information
ezcompiler generate version --config ezcompiler.yaml
# Generate template files
ezcompiler generate template --type config --mockup
See the CLI Reference for complete documentation.
📦 Core Dependencies¶
- Python >= 3.11 – Modern Python with type hints support
- PyYAML >= 6.0 – YAML configuration support
- cx_Freeze / PyInstaller / Nuitka – Compilation backends (optional)
🎨 Architecture Layers¶
| Layer | Components | Description |
|---|---|---|
| Interfaces | EzCompiler, CLIInterface |
Public APIs and user-facing interfaces |
| Services | CompilerService, ConfigService, TemplateService |
Business logic and orchestration |
| Adapters | Compilers, Uploaders, FileWriters | Concrete adapter implementations |
| Utils | File, Config, Template, Zip, Validators | Utility functions and validation |
📝 License¶
MIT License – See LICENSE file for details.
🔗 Links¶
- Repository: https://github.com/neuraaak/ezcompiler
- PyPI: https://pypi.org/project/ezcompiler/
- Issues: https://github.com/neuraaak/ezcompiler/issues
- Documentation: https://neuraaak.github.io/ezcompiler/
EzCompiler – Professional Python project compilation and distribution. 🚀