Wagon is a Python library and command-line tool designed to create self-contained Python Wheel-based archives. It bundles packages along with their dependencies into 'wagons' (files with a .wgn extension), simplifying their distribution and offline installation. The current stable version is 1.0.3, with an irregular release cadence focusing on stability and broader compatibility.
pip install wagonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically create a .wgn archive for a specified package (e.g., 'requests') using the `wagon.create` function. It creates the wagon in a temporary directory and then cleans up.
For projects requiring Python 2.6 or 3.3, use `wagon<0.7.0`. For example, `pip install 'wagon<0.7.0'`.
If manually parsing wagon metadata, update your code to look for `package_name` and `package_version`. Consider adding fallback logic for older wagons if necessary.
Expect `.wgn` files by default. If you require a `zip` format, use the `--format zip` flag in the CLI or equivalent in programmatic calls.
Always use the `-a` flag (e.g., `wagon create -s flask -a '--retries 5'`) for passing arbitrary pip arguments to both `create` and `install` commands, as it's supported since 0.3.0.
Install the library using `pip install wagon`.
Upgrade your Python environment to 3.4 or higher, or explicitly install an older compatible Wagon version like `pip install 'wagon<0.7.0'`.
Update your metadata parsing logic to check for `package_name` and `package_version`. If you need to support older wagons, add a fallback to `module_name` and `module_version`.
Use the unified `-a` flag instead. For example, `wagon create -s flask -a '--retries 5'` or `wagon install <wagon_file> -a '--no-deps'`.
No dependency data recorded yet.