Skip to main content

dashc

Tool to generate python -c bash scripts as if they were a package format.


About

dashc lets you bundle Python source code (a single file or an entire package) into a executable shell script. Instead of shipping loose files, you can hand over a bash command (or .sh script) that self-contains your Python logic and runs without needing to touch the filesystem.

Features:

  • Single file mode – wrap a single .py into a compressed string or plain text.
  • Module mode – zip up a package with __main__.py or a specified module:function entrypoint.
  • Bash-friendly – outputs either a plain (python -c '...') or a script with a shebang.
  • Validates syntax – checks both Python and Bash syntax before generating.

Installation

It is recommended to install with pipx:

pipx install dashc

This keeps dashc isolated in its own environment while making the CLI available globally.


Usage

Run with:

dashc [--version] [--verbose|--quiet|--dry-run] <command> [options]

Global options:

  • --version – show version
  • --verbose – debug logging
  • --quiet – suppress logs except errors
  • --dry-run – simulate actions without writing files

Commands

  • file – Compile a single .py into a script.
  • module – Package a directory and run __main__.py or a chosen entrypoint.

Example

Single file to script:

dashc file send_email.py --out run_send_email.sh
./run_send_email.sh --to test@example.com

Single file to script:

dashc file send_email.py --one-line
# -> prints a bash command like: python -c '...'

Module with __main__.py:

dashc module ./send_email --out run_pkg.sh
./run_pkg.sh --config config.yaml

Module with function entrypoint:

dashc module ./send_email --entrypoint send_email.cli:main --out run_cli.sh
./run_cli.sh --to test@example.com

Prior Art / Alternatives

  • zipapp (python -m zipapp) – Standard library tool for packaging Python code into .pyz archives runnable with Python.
  • shiv, pex – Build self-contained Python executables with full dependency resolution.
  • pyinstaller – Freezes Python programs into standalone executables.

Metadata

Release files for dashc 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dashc 0.1.1
File Size Uploaded Provenance
dashc-0.1.1.tar.gz 22.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dashc 0.1.1
File Interpreter ABI Platform
dashc-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / dashc-0.1.1.tar.gz

Download URL dashc-0.1.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f40a8f0290c944adbb947d2f2a13d03d46bc4988cd0bb4665f34d7eefcb00302
BLAKE2b-256 checksum
How to use checksums
e2907a9b3be9d44a312c3c5e77245343e2ff2f7745aa4983c5c84560d2369025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.

Transparency log

Release files / dashc-0.1.1-py3-none-any.whl

Download URL dashc-0.1.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76a444dabc2563f4a3251a3d066c2dc69b9e6a6d1adb2c1ee6bee740d02e2541
BLAKE2b-256 checksum
How to use checksums
b7b0fa8a931913611f166ebb3852bcd08bb440b0b837112c43607b3c88882b95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.

Transparency log

Security for dashc 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dashc-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page