Skip to main content

pyi-autobundle

Automatic hook and data file bundler for PyInstaller — a tool to help generate hooks, collect package assets, and produce PyInstaller spec files automatically so you can build portable binaries with a single command.

Key Features

  • Static AST import scanning and basic dynamic import detection.
  • Optional runtime import tracing to capture imports that only appear at runtime.
  • Package inspection to collect datas (images, JSON, templates, ML models) and native binaries.
  • Automatic generation of PyInstaller hook-*.py files and a working .spec file.
  • One-command CLI: pybundle (entrypoint: pyi_autobundle.cli:main).
  • Centralized configuration via pyproject.toml under [tool.pyi-autobundle].
  • .buildignore support to exclude files, directories, or patterns from inclusion.
  • Built-in hidden-imports database for common problematic packages (numpy, pandas, torch, PIL).
  • --dry-run mode to audit what would be included without building.

Installation

Install in editable/development mode or as a package in your Python environment:

python -m pip install -e .
python -m pip install pyinstaller

CLI Usage

Basic one-command build:

pybundle path\to\main.py --trace

Common flags:

  • --trace : run the runtime import tracer in addition to static scanning
  • --onefile : build a single-file executable (PyInstaller --onefile)
  • --windowed : create a windowed app (no console)
  • --hooks-dir : directory to write generated hooks (default: .pyi-hooks)
  • --buildignore : path to a .buildignore file to exclude assets
  • --dry-run : list files/modules that would be included and exit

Configuration (pyproject.toml)

You can set default build options in pyproject.toml under the tool.pyi-autobundle table. Example:

[tool.pyi-autobundle]
onefile = true
windowed = false
name = "myapp"
icon = "assets/app.ico"

The CLI will merge values from this config with any flags you pass on the command line.

.buildignore

Place a .buildignore file in your project root to exclude files or patterns from being collected. Lines starting with # are treated as comments. Example:

# exclude tests and dataset
tests/
data/raw/
*.log

Resource discovery

If your code uses a helper like get_resource_path("assets/icon.png"), the static scanner attempts to detect literal calls and automatically include referenced files in the build.

Dry-run audit

Use --dry-run to print a report of datas, binaries, and hiddenimports that would be included by the build process without invoking PyInstaller.

Metadata

Release files for pyi-autobundle 0.1.851

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyi-autobundle 0.1.851
File Size Uploaded
pyi_autobundle-0.1.851.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyi-autobundle 0.1.851
File Interpreter ABI Platform
pyi_autobundle-0.1.851-py3-none-any.whl Python 3 none any Details

Total release size: 35.6 kB

Release files / pyi_autobundle-0.1.851.tar.gz

Download URL pyi_autobundle-0.1.851.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1f79980f0468402ed8fa80f0d898d8e43fdc59649fdae783dc5076a47aa0ea8c
BLAKE2b-256 checksum
How to use checksums
f77c74b3777c9a7717f0e76eb881f593f57b3e470a14d15a595b60ae6242b846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / pyi_autobundle-0.1.851-py3-none-any.whl

Download URL pyi_autobundle-0.1.851-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d76fef2d5a1ae5e515dc352ec9edc826f38adfad04968ebb112db12e9f9de0f
BLAKE2b-256 checksum
How to use checksums
511fcbe4e1ba022f61aa66a8211631e5b1243a26e7162de667e6025dc26b9294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.851 This release

2 release files

0.1.85

2 release files

0.1.84

2 release files

0.1.83

2 release files

0.1.82

2 release files

0.1.81

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page