sarge
A wrapper for subprocess which provides command pipeline functionality.
What it is and what it does
Sarge is a thin wrapper around Python's subprocess module that lets you write shell-like command pipelines in Python code using familiar POSIX syntax. Instead of building complex subprocess calls or shelling out to the OS, you write pipelines as strings with pipes (|), chains (;), background execution (&), and redirection, and sarge handles the cross-platform details.
It's designed for developers and system administrators who need to orchestrate external commands from Python without dropping into raw subprocess boilerplate or shell escaping headaches. The package has no runtime dependencies and works on Windows, macOS, and Unix variants, making it useful for portable automation scripts.
Use it for:
- Build automation scripts that chain multiple command-line tools with pipes and redirects without subprocess boilerplate
- System administration tasks that need to run shell-like pipelines portably across Windows and Unix
- Testing or CI workflows where you need to capture and chain command output without shell injection risk
- Data processing scripts that filter or transform output from external tools using familiar pipe syntax
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sarge wraps Python's subprocess module to provide POSIX-style command pipelines with chains, pipes, and redirection on Windows, macOS, and Unix.
Yes, if you need portable shell-like pipelines in Python. The package is stable (Production/Stable status), has zero dependencies, installs easily, and carries no known vulnerabilities. The aging maintenance status (206 days since last release) is a minor concern for a mature library, but the repository is active and the codebase is straightforward. Install it if subprocess boilerplate is slowing you down.
Install
sarge on PyPI
pip
pip install sargeuv
uv add sargepoetry
poetry add sargeInstalling sarge
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 206 days ago—but the repository is active and not archived, with recent commits as of 2026-01-20.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute sarge with minimal restrictions, provided you include the license notice.
Quickstart
pip install sarge
from sarge import run
run('echo hello | cat')
Verify before relying
- Whether the package actively maintains compatibility with Python 3.14 or if classifiers are aspirational
- Current test coverage and whether unit tests pass on all advertised Python versions
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 206 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 268,797/month — #8,268 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sarge-0.1.8-py2.py3-none-any.whl
Keywords: subprocess, wrapper, external, command
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
subprocess-multiteeMultiplexes subprocess stdout/stderr to…
unclear · top 15,000 on PyPI
plumbumPlumbum lets you write shell-script-like…
permissive · top 5,000 on PyPI
delegator.pyDelegator.py wraps subprocess execution with a…
permissive · top 15,000 on PyPI
runsRuns multiple subprocess commands from a text…
permissive · top 5,000 on PyPI
pipePipe enables shell-like infix syntax for…
permissive · top 15,000 on PyPI
mozprocessProvides utilities for spawning, managing, and…
copyleft · top 15,000 on PyPI
dagster-shellProvides shell operation support for Dagster…
permissive · top 15,000 on PyPI
EasyProcessEasyProcess wraps Python's subprocess module to…
permissive · top 5,000 on PyPI
bashProvides a Python wrapper for running bash…
copyleft · top 15,000 on PyPI
executorWraps Python's subprocess module to simplify…
permissive · top 15,000 on PyPI