not-kennethreitz/envoy

Python Subprocesses for Humans™.

Python

2,262

28 commits

updated Jan 15, 2017

See the code

README

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

**Note:** `Delegator <https://github.com/kennethreitz/delegator.py>`_ 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
    [<Response 'uptime'>]

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

not-kennethreitz/envoy

Python Subprocesses for Humans™.

Python

2,262

28 commits

updated Jan 15, 2017

See the code

README

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

**Note:** `Delegator <https://github.com/kennethreitz/delegator.py>`_ 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
    [<Response 'uptime'>]

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

Significant stargazers

(top 24 of 36)

Cory Benfield

1,406 followers · starred Jan 2012

Sergei Lebedev

579 followers · starred Aug 2011

Danilo Bargen

484 followers · starred Jan 2014

Thomas J. Fan

686 followers · starred Feb 2018