{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/15"}],"enrichment":{"capability":"Runs shell commands with formatted output, detailed error reporting, and built-in retry logic, wrapping subprocess.run() with customizable print functions and exception handling.","skillfed_tags":["subprocess-wrapper","error-handling","retry-logic"],"use_cases":["Build scripts or CI/CD pipelines that need formatted, real-time command output with automatic retry on transient failures.","Testing frameworks that run external tools and need detailed error messages with exit codes and signal names.","System administration tools that execute commands and must capture combined stdout/stderr with custom logging.","Cross-platform applications (Windows, macOS, Unix) that need consistent subprocess error reporting with OS-specific details.","Long-running processes where retry logic with exponential backoff reduces flakiness without manual intervention."],"what_it_does":"fancy-subprocess is a wrapper around Python's subprocess.run() that enforces a stricter, more user-friendly interface for running shell commands. It always captures and prints command output line-by-line, combines stdout and stderr into a single stream, and treats text output as the default. On failure, it raises a detailed RunError exception that includes the command, exit code, and on Windows, recognized NTSTATUS error names or hex codes; on Unix, signal names. It supports customizable print functions for both informational messages and command output, allowing integration with logging systems or UI frameworks.\n\nThe package adds retry capabilities with exponential backoff, environment variable overrides, working directory changes, and configurable exit code success criteria. It handles OSError exceptions (e.g., executable not found) by converting them to RunError, and provides fine-grained control over output handling\u2014trimming whitespace, replacing Unicode replacement characters, and capping output size. The return value is a RunResult object with exit_code and output properties, making it straightforward to inspect results programmatically.","worth_installing":"Yes. The package solves a genuine pain point\u2014subprocess.run() requires boilerplate for output capture, error handling, and retry logic. It is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and supports current Python versions (3.10\u20133.14). Install friction is low. Use it if you run external commands and want cleaner error messages, formatted output, or built-in retries."},"id":"fancy-subprocess","links":{"html":"https://skillfed.io/packages/fancy-subprocess","md":"https://skillfed.io/packages/fancy-subprocess.md","pypi":"https://pypi.org/project/fancy-subprocess/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-17","license_spdx":"MIT","license_treatment":"permissive","name":"fancy-subprocess","python_support":"supports_current","summary":"subprocess.run() with formatted output, detailed error messages and retry capabilities"},"popularity":{"monthly_downloads":147648,"position":11056,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0"}
