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.0.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.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

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

Hashes for sfapp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2d945d15caaf6d70a4cea01a22b8df10a4f80ac3998f19a2e0e35fcd71b978a1
MD5 e191b416883c1d2550609c88a84bf188
BLAKE2b-256 8e5b2ff625fadb531798fb2e7248bd6d2e0a2763a05b632f418a1a1e185c152a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfapp-1.0.0.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.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

Hashes for sfapp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21e10042e75b7d6aebefbcc353e2f515bbbea6b6c38bfe0a9478f8e012d2b375
MD5 b1848498934f00189d4c801f92a8ff8a
BLAKE2b-256 f726fe11be71a3559a09ed33edb1ee68756b715bf11b1159609e915fb73f658b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfapp-1.0.0-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