skillfed

subprocess-tee

subprocess-tee

subprocess-tee v0.4.2 6.0M downloads/30d#1,990 on PyPI63
Permissive license MIT Active released

What it is and what it does

subprocess-tee wraps Python's standard subprocess module to solve a common problem: you want to see what a long-running command is doing in real-time, but you also need to capture its output for later use. It does both simultaneously by printing to the console while collecting stdout and stderr into the result object, mimicking the Unix tee utility. The package works on POSIX systems (Linux, macOS) and treats all output as text by default, which differs from the standard subprocess module.

The implementation is straightforward: import from subprocess-tee instead of subprocess, call it the same way, and get both live feedback and captured output. You can disable the tee behavior with tee=False if needed, and use check=True to raise exceptions on non-zero exit codes, just like the standard library version.

Use it for:

  • Monitor progress of build scripts or CI/CD pipelines while capturing logs for debugging.
  • Run installation or deployment commands and display output in real-time while saving it to a file.
  • Execute long-running tests or data processing jobs with live console feedback and complete output capture.
  • Stream command output for user feedback while preserving it for post-execution analysis.
  • Replace standard subprocess in existing tools to add real-time visibility without refactoring.

Worth the install?

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

A drop-in replacement for subprocess.run that captures output while printing it in real-time, similar to the Unix tee command.

Yes. The package solves a genuine pain point with zero dependencies, permissive licensing, active maintenance, and a simple API that drops into existing code. It ranks in the top 5000 PyPI packages by download volume and has no known vulnerabilities. Install it if you run subprocesses and want real-time feedback without losing the captured output.

Install

subprocess-tee on PyPI

pip

pip install subprocess-tee

uv

uv add subprocess-tee

poetry

poetry add subprocess-tee

Installing subprocess-tee

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent commits; last release was 2024-06-17 and the repository remains active.

License in practice

MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install subprocess-tee

from subprocess_tee import run
result = run("echo 123")
print(result.stdout)

Requires Python 3.8 or later; universal_newlines=True is implied (text mode only).

Verify before relying

  • Whether asyncio support mentioned in keywords is available via a separate API or integrated into the main run function.
  • Performance characteristics when handling very large output streams.
  • Behavior differences from subprocess.run beyond output capture (e.g., timeout handling, signal behavior).

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 788 days since the last release
Last repo commit
First released
Downloads 5,999,958/month — #1,990 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: subprocess_tee-0.4.2-py3-none-any.whl

Keywords: subprocess, asyncio

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Systems AdministrationTopic :: Utilities

Tags

subprocess output capture and printreal-time subprocess outputtee subprocess pythoncapture and display subprocesssubprocess run with outputlive subprocess streamingsubprocess progress feedback
subprocess-wrapperprocess-monitoring

More Utilities packages