Skip to main content

mini_bash

Summary: A lightweight Python package for executing bash commands programmatically with automatic error handling. Raises an exception if the shell command returns a non-zero exit code.

Installation

You can install mini_bash using pip:

pip install mini_bash

Usage

from mini_bash import mini_bash

# Execute a command and capture output
std_out_str, std_err_str = mini_bash('ls -ltr')

# The function returns a tuple of (stdout, stderr)
print(f"Output: {std_out_str}")
print(f"Errors: {std_err_str}")

Error Handling

If the command exits with a non-zero return code, a subprocess.CalledProcessError is raised:

from mini_bash import mini_bash

try:
    mini_bash('exit 1')
except Exception as e:
    print(f"Command failed: {e}")

Contribution & License

If you have any suggestions, improvements, or issues regarding mini_bash, feel free to open an issue or submit a pull request on GitHub.

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for mini_bash 0.1.2

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

Source distribution (sdist)

Source distribution for mini_bash 0.1.2
File Size Uploaded Provenance Actions
mini_bash-0.1.2.tar.gz 5.4 kB Without provenance Details for mini_bash-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / mini_bash-0.1.2.tar.gz

Download URL mini_bash-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
402e94eaeefa2d6edefe17f9d56285e3947bb434df00e00b2f6ca2a24af692fd
BLAKE2b-256 checksum
How to use checksums
990dff79b6d6af238c5cc5c97d00ed135134b498267230f4fb99ca9c6d001407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.9 Darwin/25.2.0

Release files / mini_bash-0.1.2-py3-none-any.whl

Download URL mini_bash-0.1.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5216b02562351486b0acd2a02f44a566ba27f281da7609f451dea8d832fc4784
BLAKE2b-256 checksum
How to use checksums
3affed9fae2592800af80e208d28e5a298940158efb97d345d15c48cd5284e2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.9 Darwin/25.2.0

Security for mini_bash 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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