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.2.tar.gz (9.0 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.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sfapp-1.0.2.tar.gz
  • Upload date:
  • Size: 9.0 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.2.tar.gz
Algorithm Hash digest
SHA256 641fd0e49e8f561ed7b334900a83ef2a78de1382d5fc175908544cacf1ec7a2d
MD5 578731934459b3c6e5929b4ffd917962
BLAKE2b-256 98a97234ec83ad42e52d1e46638f500a287078238803c549de70969612254ad5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfapp-1.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: sfapp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 93a835c5b3576c0096a5d1a201f1da1d82aaefa1a6ad61ee0334c0c243a2f522
MD5 d246889229a1d915ea86f750d5888650
BLAKE2b-256 033f8ca024649bccdeced5dcd9fbb77080bfa5c045097b8540b2a7effb902b2b

See more details on using hashes here.

Provenance

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