Skip to main content

A Python wrapper for PyInstaller to programmatically generate an executable from a Python script

Project description

pyexecutable_gen

A lightweight, configurable PyInstaller wrapper for Python developers who want to package their scripts into standalone executables using Python code instead of CLI.

Author: its-me-abi
Date: May 14, 2025


📦 What is this?

pyexecutable_gen.py provides a builder class to programmatically invoke PyInstaller with custom configurations,
by doing it we can turn a python script into a executable file
supporting:

  • One-file / one-dir builds
  • Hidden imports
  • Data folder mapping
  • Custom icons and console toggling
  • Clean builds and custom PyInstaller flags

🤝 Documentation

full documentation is available in wiki

🛠 Installation

pip install pyexecutable_gen

or download this project by git comand (or download by browser as zip and extract )

git clone https://github.com/its-me-abi/pyexecutable_gen.git

🚀 Quick Start

from pyexecutable_gen import builder

b = builder("your_script.py")
b.set_console(True)
b.set_onedir(True)
b.set_icon("icon.ico")
b.set_loglevel("DEBUG")
b.set_data_folders("assets", "assets")
b.set_hidden_import("your_dynamic_module")
# b.set_extra_args("--heloo its_extra_argument")  # you can set more argumnts as string.only use when functionality not available by api
b.set_collect_all("a_big_package_with_submodules")
if b.build_executable():
    print("✅ Build succeeded!")
    print(f"✅ Build executable path is {b.get_executable_path()}")
else:
    print("❌ Build failed.")

🔧 Features

  • ✅ No CLI required
  • 📂 Cross-platform data folder support
  • 🪄 Hidden import handling
  • 🖼 Set icon with .ico file
  • 🧵 Toggle between GUI and console mode
  • 🔍 Control build verbosity via log levels
  • 🧹 Optional clean builds

🪪 License

MIT License – See LICENSE.md for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyexecutable_gen-0.0.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyexecutable_gen-0.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyexecutable_gen-0.0.3.tar.gz.

File metadata

  • Download URL: pyexecutable_gen-0.0.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pyexecutable_gen-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f23bb780bef0ba7d178405f170135529f804f7cd7ac4d806eac71b802e8f4eb1
MD5 be5a1519dff496cf95b63760f121a248
BLAKE2b-256 2b1cd7fcc656588b325f54efe60fea91bfa129ad8b4f1f55d4a0d0e3feffcea6

See more details on using hashes here.

File details

Details for the file pyexecutable_gen-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyexecutable_gen-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fb4040d40edf226f7b743d0676b83f18f1daef844b60845193a606e899a82fa4
MD5 61248e82a3aed38ada44728aed73f472
BLAKE2b-256 663dced40049e3c5d81f771bf4fbaf147efa7667a61b4373a7d03119cee4a247

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page