SFApp is a module to bundle a Python package into a single file Python script.
Project description
sfapp
sfapp is a Python tool for building single-file Python applications from a package or directory. It analyzes source files, resolves imports, and generates a standalone Python script containing all necessary code.
Features
- Collects and analyzes Python source files in a package.
- Resolves and inlines internal imports.
- Outputs a single Python file for easy distribution.
- Supports custom package roots and output locations.
- Optionally suppresses log output.
Usage
You can use sfapp as a command-line tool:
python -m sfapp <root> [-o <output_file.py>] [-p <package_name>] [-s]
Arguments
root: Path to the root directory of your package (positional argument).
Options
-o,--output: Output file path for the generated single-file app (default: stdout, use-for stdout).-p,--package: Name of the package to build (defaults to the root directory name).-s,--silent: Suppress log output (optional).
Example
python -m sfapp ./myproject -p myproject -o myproject_single.py
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sfapp-1.0.0.tar.gz.
File metadata
- Download URL: sfapp-1.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d945d15caaf6d70a4cea01a22b8df10a4f80ac3998f19a2e0e35fcd71b978a1
|
|
| MD5 |
e191b416883c1d2550609c88a84bf188
|
|
| BLAKE2b-256 |
8e5b2ff625fadb531798fb2e7248bd6d2e0a2763a05b632f418a1a1e185c152a
|
Provenance
The following attestation bundles were made for sfapp-1.0.0.tar.gz:
Publisher:
deploy.yml on EtienneMR/sfapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sfapp-1.0.0.tar.gz -
Subject digest:
2d945d15caaf6d70a4cea01a22b8df10a4f80ac3998f19a2e0e35fcd71b978a1 - Sigstore transparency entry: 214837337
- Sigstore integration time:
-
Permalink:
EtienneMR/sfapp@35f5c1b43337cbecc6e8690274dd59703f502f97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EtienneMR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@35f5c1b43337cbecc6e8690274dd59703f502f97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sfapp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sfapp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e10042e75b7d6aebefbcc353e2f515bbbea6b6c38bfe0a9478f8e012d2b375
|
|
| MD5 |
b1848498934f00189d4c801f92a8ff8a
|
|
| BLAKE2b-256 |
f726fe11be71a3559a09ed33edb1ee68756b715bf11b1159609e915fb73f658b
|
Provenance
The following attestation bundles were made for sfapp-1.0.0-py3-none-any.whl:
Publisher:
deploy.yml on EtienneMR/sfapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sfapp-1.0.0-py3-none-any.whl -
Subject digest:
21e10042e75b7d6aebefbcc353e2f515bbbea6b6c38bfe0a9478f8e012d2b375 - Sigstore transparency entry: 214837338
- Sigstore integration time:
-
Permalink:
EtienneMR/sfapp@35f5c1b43337cbecc6e8690274dd59703f502f97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EtienneMR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@35f5c1b43337cbecc6e8690274dd59703f502f97 -
Trigger Event:
push
-
Statement type: