Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kennethreitz/envoy

Python Subprocesses for Humans™.
https://github.com/kennethreitz/envoy

Last synced: 3 months ago
JSON representation

Python Subprocesses for Humans™.

Awesome Lists containing this project

README

        

Envoy: Python Subprocesses for Humans.
======================================

**Note:** `Delegator `_ is a replacement for Envoy.

This is a convenience wrapper around the `subprocess` module.

You don't need this.

.. image:: https://github.com/kennethreitz/envoy/raw/master/ext/in_action.png

But you want it.

Usage
-----

Run a command, get the response::

>>> r = envoy.run('git config', data='data to pipe in', timeout=2)

>>> r.status_code
129
>>> r.std_out
'usage: git config [options]'
>>> r.std_err
''

Pipe stuff around too::

>>> r = envoy.run('uptime | pbcopy')

>>> r.command
'pbcopy'
>>> r.status_code
0

>>> r.history
[]