skillfed

runs

🏃 Run a block of text as a subprocess 🏃

runs v1.3.0 4.8M downloads/30d#2,223 on PyPI
Permissive license MIT AGING released

What it is and what it does

runs is a wrapper around Python's subprocess module that lets you execute multiple commands in a single call by passing a block of text. Instead of calling subprocess.run() once per command, you write your commands as a multi-line string (or list), and runs splits them, handles comments and line continuations, and returns results for each command. It provides drop-in replacements for subprocess.call(), check_call(), check_output(), and run(), all with UTF-8 encoding by default instead of bytes.

The main problem it solves is the friction of running sequential subprocess commands in Python: normally you either loop and call subprocess repeatedly, or manually split and parse command strings. runs handles the parsing, encoding defaults, and optional features like echo logging and exception handling in one place. It does not support shell features like pipes, redirection, or environment variable expansion—those still require shell=True and manual handling.

Use it for:

  • Run a sequence of shell commands from a Python script without looping subprocess calls.
  • Execute build or deployment steps (compilation, copying files, cleanup) as a text block.
  • Test harnesses that need to run multiple CLI tools and collect their output as strings.
  • Batch system administration tasks (disk checks, log rotation, service restarts) from Python.
  • Development scripts that chain multiple command-line tools and need UTF-8 output by default.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Runs multiple subprocess commands from a text block or list, with UTF-8 encoding by default, line continuations, comments, and optional logging and error handling.

Yes, if you frequently run multiple subprocess commands in sequence and want cleaner syntax and UTF-8 defaults. The low install friction and permissive license make it a low-risk add. However, the aging maintenance status (192 days since last release) means it is stable but not actively developed—suitable for stable use cases, not for packages expecting ongoing feature work or rapid bug fixes.

Install

runs on PyPI

pip

pip install runs

uv

uv add runs

poetry

poetry add runs

Installing runs

Before you install

Low install friction with a single pure-Python dependency (xmod). Maintenance status is aging—last release was 192 days ago—so expect no active development, though the package is stable for its current scope.

License in practice

MIT license permits commercial and private use with minimal restrictions, requiring only license and copyright notice retention.

Quickstart

import runs

runs('''
    echo "hello"
    ls -la
    echo "done"
''')

Requires Python 3.10 or later. Note that shell features like pipes, redirection, and environment variable expansion do not work—only direct command execution.

Verify before relying

  • Whether xmod dependency is actively maintained or has its own aging/stability concerns.
  • Real-world performance characteristics when running hundreds or thousands of commands in sequence.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — xmod
Maintenance aging — 192 days since the last release
First released
Downloads 4,810,269/month — #2,223 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: runs-1.3.0-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

run multiple subprocess commandsbatch subprocess executiontext block command runnersubprocess wrappershell command batchmultiline command executionsubprocess with utf-8
subprocess-wrapperbatch-execution

More Software Development packages