Registry / devops / subprocess-run

subprocess-run

JSON →
library0.0.8pypypiunverified

subprocess-run is a Python library that extends the standard `subprocess` module, offering a simplified `run` function with opinionated defaults like `check=True` and stripped output. It provides a more convenient way to execute external commands compared to the standard library's `subprocess.Popen`. The current version is 0.0.8, with the last release approximately two years ago, indicating a maintenance-focused project rather than active development.

pip install subprocess-run
INSTALL
IMPORT
SIG · SUBPROCESS-RUN
S
subprocess-run
devopspythonv0.0.8
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run
from subprocess_run.run import run
from subprocess_run.run import run

This quickstart demonstrates how to use the `subprocess_run.run` function for basic command execution, handling failing commands (due to default `check=True`), and providing input data via stdin using `input_data`.

from subprocess_run import run # Execute a simple command print("Executing a simple command:") try: # run() returns (exit_code, stdout, stderr) by default with return_tuple=True exit_code, stdout, stderr = run(["echo", "Hello from subprocess-run!"]) print(f"Success: '{stdout.strip()}'") print(f"Exit code: {exit_code}") except Exception as e: print(f"Error: {e}") # Command failing with default check=True # 'false' is a common Unix command that always exits with a non-zero status. # On Windows, you might use ['cmd', '/c', 'exit 1'] print("\nAttempting to run a command that will fail (check=True by default):") try: run(["false"]) except Exception as e: print(f"Caught expected error for failing command: {e}") # e.g., CalledProcessError # Command with input data (stdin) # 'cat -' on Unix-like systems reads from stdin. # For cross-platform, a simple python script could echo stdin: # ['python', '-c', 'import sys; print(sys.stdin.read())'] print("\nExecuting a command with input data:") try: input_text = "Data for stdin" _, output, _ = run(["cat", "-"], input_data=input_text.encode('utf-8')) print(f"Input: '{input_text}', Output from stdin command: '{output.strip()}'") except Exception as e: print(f"Error with input_data: {e}")
Debug
Known issues
gotchaThe default behavior of `subprocess_run.run()` differs significantly from the standard library `subprocess.run()`. Key differences include: `check=True` by default (raises `CalledProcessError` on non-zero exit), `strip_result=True` by default (strips whitespace from stdout/stderr), `return_tuple=True` by default (returns `(exit_code, stdout, stderr)`), and it uses `input_data` for stdin instead of `input`.
fix
Always consult the `subprocess-run` documentation for specific parameter usage. Be aware of the default `check=True` and `strip_result=True` and explicitly set them to `False` if standard library behavior is desired.
affects: 0.0.1 - 0.0.8
gotchaThe `subprocess-run` library appears to be in maintenance mode, with the last release (0.0.8) and significant activity occurring over two years ago. This means it may not receive updates for new Python versions, security patches, or feature enhancements.
fix
Evaluate if the current feature set meets your needs. For projects requiring active development, newer Python compatibility, or specific bug fixes, consider the standard `subprocess` module or more actively maintained alternatives if `subprocess-run` specific features are not critical.
affects: 0.0.1 - 0.0.8
Upgrade
Version history
0.0.8latest on PyPI · released Nov 16, 2013
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
subprocess-run — pip install subprocess-run · libregistry