Overview
InstallerPack is a Python module designed to simplify updating and distributing Python applications. It mainly:
- Downloads application versions stored in OctaStore (a cloud-based version storage system).
- Determines the latest or requested version.
- Builds a standalone executable using PyInstaller.
- Optionally replaces an existing executable or places it in a specified folder.
Essentially, it’s a Python “installer/updater” helper.
Main Components
1. Initialization and Config
-
CAN_USEis a flag to indicate ifInstallerPackis ready to operate. -
OctaConfig: adataclassthat stores configuration for OctaStore:tokens,owners,repos— credentials and repos to access.branch,app_name,path_prefix— where the app versions are stored.encryption_key,use_cli_fallback— optional security and fallback options.
_OCTACONF: Optional[OctaConfig] = None # module-level config
init()— prints credits and setsCAN_USE = True.setocta(conf)— validates and sets the OctaStore configuration.
2. Version Handling
InstallerPack supports multiple versioning schemes:
- Semver:
1.2.3or1.2.3-alpha - Calver:
YYYY.MM.DDorYYYY.MM - Sequence version: numbers like
001,002 - Zero-based version (ZERVER)
Functions:
parse_semver(v),parse_calver(v),parse_seq(v)— convert version strings into tuples for comparison.version_key(v, style)— returns a sortable key based on version style.compare_versions(a, b, style)— compares two versions: returns-1,0, or1.
This allows InstallerPack to determine the latest version or prevent downgrades.
3. OctaStore Helpers
These functions interact with the cloud storage:
_build_repo_path_for_version(version, conf)— determines path in repo for a version._list_versions_via_api(conf)— tries to list versions using Python API._list_versions_via_cli(conf)— fallback using CLI if Python API fails._download_version_files(conf, version, dest)— downloads the version’s files locally, trying Python API first, then CLI.
Essentially, these functions make
InstallerPackcloud-aware, and able to fetch any version of your app automatically.
4. PyInstaller Helpers
InstallerPack can build standalone executables:
_generate_spec(main_script, dest_spec, ...)— creates a.specfile for PyInstaller automatically._run_pyinstaller(spec_path, main_script, ...)— runs PyInstaller, finds the executable, and returns its path.
This allows automatic building of a distributable .exe (or executable) from the downloaded version.
5. The update() Function
This is the main public function, designed to be linked to a GUI button or CLI action.
Steps performed by update():
-
Determine version style (
SEMVERby default). -
Ensure OctaStore configuration is set.
-
List available versions from OctaStore.
-
Choose the version to install:
"latest"→ pick the newest version.- Specific version → find closest match.
-
Compare with
currentverto prevent unnecessary upgrades/downgrades. -
Download the version files into a temporary directory.
-
Determine the main Python script to build:
- Looks for
<app_name>.py,main.py,app.py, or first.pyrecursively.
- Looks for
-
Optionally generate a PyInstaller
.specfile (buildspec=True). -
Run PyInstaller to produce executable.
-
Place or replace the executable in the target folder (
landingfolder). -
Clean up temporary files and spec files.
-
Return a summary dictionary with info:
{
"updated": True,
"version": "0.1.0",
"downloaded_to": "/tmp/installerpack_XXXX",
"main_script": "/tmp/installerpack_XXXX/main.py",
"exe": "/target/folder/MyApp.exe"
}
Key Design Choices
- Fallbacks: If Python API fails, CLI is used for listing/downloading versions.
- Safety: Prevents downgrades and checks existing versions.
- Heuristics: Tries to detect main script automatically.
- Temporary workspace: Downloads are isolated in temp directories.
Usage Example
from installerpack import init, setocta, OctaConfig, update
init()
setocta(OctaConfig(
tokens=["ghp_xxx"],
owners=["user"],
repos=["repo"],
branch="main",
app_name="MyApp",
path_prefix="apps"
))
update(currentver="0.1.0", newver="latest", buildspec=True, landingfolder="C:/MyApps")
This will fetch the latest version from OctaStore, build it, and place the executable in C:/MyApps.
✅ In short
InstallerPack is a Python cloud-aware installer/updater framework:
- Connects to OctaStore to get versions.
- Supports multiple versioning schemes.
- Automatically builds executables via PyInstaller.
- Handles version comparison, downloads, and installation intelligently.
- Provides both API and CLI fallbacks.
Metadata
Release files for installerpack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| installerpack-0.1.0.tar.gz | 12.9 kB | Without provenance | Details for installerpack-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| installerpack-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for installerpack-0.1.0-py3-none-any.whl |
Total release size: 26.7 kB
Release files / installerpack-0.1.0.tar.gz
| Download URL | installerpack-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc6df96f938f1b95d0cf115c4100f5147d2ac08a0ee0c3fbc9e6d11ee474af9e
|
|
BLAKE2b-256 checksum How to use checksums |
ceef6a70e3a75b57d22cd35f0fe8c29a554837e9079ca8101516a791c65a18df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / installerpack-0.1.0-py3-none-any.whl
| Download URL | installerpack-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6617bda479573ddefc9f26c8e68e00858e913f41d47a2f6ebc3522b4e718f3df
|
|
BLAKE2b-256 checksum How to use checksums |
1e9794f45099fca260a6ead672aba0e01115e7a3c3c8e4f3f22312ba6c08035d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for installerpack 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.