delegator.py
Subprocesses for Humans 2.0.
What it is and what it does
Delegator.py is a lightweight subprocess wrapper that simplifies running shell commands from Python. It provides two main functions: run() for executing individual commands (blocking or non-blocking) and chain() for piping multiple commands together using the standard Unix pipe syntax. The library wraps pexpect to add expect-like functionality for interactive processes—you can send input, wait for output patterns, and control process signals.
The package is designed for developers who want a simpler alternative to the standard subprocess module for common command-execution patterns. It supports both string commands and list-based parameterization, environment variable injection, and direct access to stdout/stderr pipes. However, the project has been abandoned since 2018, with no releases or active maintenance, so it should be considered legacy code.
Use it for:
- Running shell commands from Python scripts with simple blocking or non-blocking control.
- Chaining multiple Unix commands with pipes without manual shell string construction.
- Automating interactive CLI tools that require sending input and reading prompts.
- Wrapping long-running processes and checking their status or output asynchronously.
- Building simple command-line automation scripts that need subprocess control without subprocess boilerplate.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Delegator.py wraps subprocess execution with a simple API for running commands blocking or non-blocking, chaining commands with pipes, and sending input to interactive processes via pexpect.
No, not for new projects. While the package is lightweight and has no known vulnerabilities, it has been abandoned since 2018 with no maintenance or updates. Modern Python's subprocess module and libraries like click or invoke are actively maintained and provide comparable or superior functionality. Use delegator.py only if maintaining legacy code that already depends on it.
Install
delegator-py on PyPI
pip
pip install delegator-pyuv
uv add delegator-pypoetry
poetry add delegator-pyInstalling delegator.py
Before you install
Low install friction with a single runtime dependency (pexpect). However, the package is abandoned—last release was 2018-09-17 and last commit 2022-12-01—so it will not receive bug fixes or security updates going forward.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions.
Quickstart
pip install delegator.py
import delegator
c = delegator.run('ls')
print(c.out)
# Non-blocking with expect
c = delegator.run('long-running-process', block=False)
c.expect('prompt')
c.send('input')
c.block()
Requires pexpect, which depends on ptyprocess; may have platform-specific behavior on Windows.
Verify before relying
- Whether pexpect's current versions remain compatible with delegator.py's 0.1.1 codebase.
- Current stability and compatibility with modern Python versions (package classifiers list up to 3.6).
- Whether the abandoned status affects real-world reliability for new projects.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pexpect |
| Maintenance | abandoned — 2,888 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 116,883/month — #12,188 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: delegator.py-0.1.1-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
sargeSarge wraps Python's subprocess module to…
permissive · top 15,000 on PyPI
bashProvides a Python wrapper for running bash…
copyleft · top 15,000 on PyPI
plumbumPlumbum lets you write shell-script-like…
permissive · top 5,000 on PyPI
subprocrunnerWraps Python's subprocess module to simplify…
permissive · top 15,000 on PyPI
pexpect-serialExtends pexpect to work with serial ports by…
permissive · top 15,000 on PyPI
pipePipe enables shell-like infix syntax for…
permissive · top 15,000 on PyPI
pytest-forkedA pytest plugin that runs each test in a forked…
permissive · top 5,000 on PyPI
invokeInvoke is a Python library for defining and…
permissive · top 1,000 on PyPI
mozprocessProvides utilities for spawning, managing, and…
copyleft · top 15,000 on PyPI