Skip to main content

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


Download files

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

Source Distribution

sfapp-1.0.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

sfapp-1.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file sfapp-1.0.1.tar.gz.

File metadata

  • Download URL: sfapp-1.0.1.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

Hashes for sfapp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3080c96673888dc770aa1752004a62e9c15479c230e8e9bdaf4cbee0c985ac6b
MD5 a5c0594070342f9c704404535339a722
BLAKE2b-256 828f7273546890dcf1d55c89b621d7bae0c1616c4edce6ee886837c4712d9029

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfapp-1.0.1.tar.gz:

Publisher: deploy.yml on EtienneMR/sfapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sfapp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sfapp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sfapp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e62a5c0bb45416df680ecb95a4887049eda25e2ee68c3380a77983b6a4714e
MD5 cbb2af22cdad563b655e01bdcc19dd41
BLAKE2b-256 b237292e2df2b9e9eecc5fc680a151064d2eac7175edd9d38726c3e7b432d398

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfapp-1.0.1-py3-none-any.whl:

Publisher: deploy.yml on EtienneMR/sfapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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