skillfed

sarge

A wrapper for subprocess which provides command pipeline functionality.

sarge v0.1.8 268.8K downloads/30d#8,268 on PyPI35
Permissive license BSD-3-Clause AGING released

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 sarge

uv

uv add sarge

poetry

poetry add sarge

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Shells

Tags

subprocess wrappercommand pipelinesshell command chainscross-platform subprocesspipe and redirect commandsPOSIX shell syntax python
subprocess-wrappershell-pipelinescross-platform

More Libraries packages