Skip to content

EzCompiler

PyPI version Python versions PyPI status License CI Docs uv linter type checker

EzCompiler Logo

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

pip install ezcompiler

Or from source:

git clone https://github.com/neuraaak/ezcompiler.git
cd ezcompiler && pip install .

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 process
  • CLIInterface – Interactive command-line interface with rich output

Services Layer

  • CompilerService – Compiler selection and orchestration
  • ConfigService – Configuration loading and validation
  • TemplateService – Template processing and file generation
  • UploaderService – Upload orchestration and backend selection

Protocols Layer

Compilers:

  • CxFreezeCompiler – Cx_Freeze implementation for directory-based builds
  • PyInstallerCompiler – PyInstaller implementation for single-file executables
  • NuitkaCompiler – Nuitka implementation for optimized compilation

Uploaders:

  • DiskUploader – Local disk upload backend
  • ServerUploader – HTTP/HTTPS server upload backend

Utils Layer

  • FileUtils – File operations and validation
  • ConfigUtils – Configuration parsing (YAML/JSON)
  • TemplateUtils – Template processing utilities
  • ZipUtils – ZIP archive operations
  • Validators – 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.


EzCompiler – Professional Python project compilation and distribution. 🚀