bash
Bash for Python
What it is and what it does
Bash is a lightweight wrapper around Python's subprocess module that simplifies running shell commands from Python code. It provides a chainable interface where you can call bash() on a result object to pipe commands together, and exposes stdout, stderr, and return codes as attributes. The library is designed to reduce boilerplate when you need to execute bash commands inline rather than spawning separate processes directly.
The package is abandoned and unmaintained since 2016-05-30. It uses shell=True internally, which the documentation explicitly warns makes it unsuitable for untrusted input. Install friction is high because it ships as a source tarball only (bash-0.6.tar.gz).
Use it for:
- Quick prototyping or scripting where you need to run simple shell commands from Python without subprocess boilerplate.
- Chaining multiple bash operations (pipes, redirects) in a single Python statement for readability.
- Accessing command output, error messages, and exit codes in a unified object interface.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python wrapper for running bash commands and piping their output, with a chainable interface for composing shell operations.
No. The package is abandoned (last release 2016-05-30, no commits since 2020-04-13), uses shell=True which is a documented security risk for untrusted input, and high install friction (source-only distribution). Only consider if you have legacy code already depending on it and cannot migrate to modern alternatives.
Install
bash on PyPI
pip
pip install bashuv
uv add bashpoetry
poetry add bashInstalling bash
Before you install
High install friction due to source-only distribution (bash-0.6.tar.gz). Package is abandoned—last release was 2016-05-30, with no commits since 2020-04-13. Not actively maintained.
License in practice
Licensed under LGPL (copyleft). Derivative works or distributions must comply with copyleft obligations; check your project's license compatibility before use.
Quickstart
pip install bash
from bash import bash
b = bash('ls . ')
result = b.bash('grep ".pyc"')
print(b.stdout)
Package uses shell=True under the hood, making it unsuitable for running untrusted or user-supplied commands due to shell injection risk.
Verify before relying
- Actual Python version support on modern interpreters: classifiers list 2.7, 3.4, 3.5, but requires_python is unspecified.
- Whether the source tarball builds successfully on current Python versions or systems.
- Security implications of shell=True beyond the documented injection warning.
- Whether this package or its dependencies have known vulnerabilities not yet catalogued in OSV.
Package facts
| License | UNKNOWN (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,728 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 79,303/month — #14,366 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bash-0.6.tar.gz
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
plumbumPlumbum lets you write shell-script-like…
permissive · top 5,000 on PyPI
pygnuutilsProvides pure Python implementations of GNU…
copyleft · top 15,000 on PyPI
pypyppyp lets you write Python expressions and…
permissive · top 15,000 on PyPI
subprocrunnerWraps Python's subprocess module to simplify…
permissive · top 15,000 on PyPI
subprocess.runProvides a simplified interface to run shell…
permissive · top 15,000 on PyPI
delegator.pyDelegator.py wraps subprocess execution with a…
permissive · top 15,000 on PyPI
bashkitBashkit is a sandboxed bash interpreter for…
permissive · top 15,000 on PyPI
EasyProcessEasyProcess wraps Python's subprocess module to…
permissive · top 5,000 on PyPI
subprocess-multiteeMultiplexes subprocess stdout/stderr to…
unclear · top 15,000 on PyPI
runezA zero-dependency utility library providing…
permissive · top 5,000 on PyPI