skillfed

delegator.py

Subprocesses for Humans 2.0.

delegator-py v0.1.1 116.9K downloads/30d#12,188 on PyPI1,743
Permissive license MIT Abandoned released

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-py

uv

uv add delegator-py

poetry

poetry add delegator-py

Installing 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

Programming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

subprocess wrapperrun shell commands pythoncommand chaining pipesinteractive process controlpexpect wrappernon-blocking command executionexpect-like functionality
subprocess-wrappershell-automationabandoned

More Utilities packages