Envoy

raw JSON →
0.0.3 verified Mon Apr 27 auth: no python deprecated

Envoy is a simple API for running external processes in Python, wrapping subprocess with easy-to-use commands. Current version 0.0.3, released in 2013. The library is effectively abandoned and not recommended for new projects.

pip install envoy
error AttributeError: module 'envoy' has no attribute 'run'
cause Due to a naming conflict with another package or incorrect installation.
fix
Uninstall the conflicting package and install envoy from PyPI: pip install envoy --upgrade
error ImportError: No module named envoy
cause Envoy must be installed via pip.
fix
Run: pip install envoy
gotcha Envoy uses subprocess shell=True by default, which can be a security risk if command strings include untrusted input.
fix Use subprocess.run with list arguments instead, or sanitize inputs thoroughly.
deprecated Envoy is no longer maintained; use subprocess.run (Python 3.5+) or the sh library instead.
fix Replace envoy.run with subprocess.run(cmd, shell=True, capture_output=True, text=True) for equivalent behavior.
gotcha envoy.run returns a Response object, but .std_out/.std_err are byte strings in Python 2, not decoded text.
fix Decode explicitly: r.std_out.decode('utf-8') if needed.

Runs a shell command and captures output.

import envoy
r = envoy.run('echo Hello, World!')
print(r.std_out)