Skip to main content

Simple API for running external processes.

Project description

This is a convenience wrapper around the subprocess module.

Usage

Run a command, get the response:

>>> r = subp.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 = subp.run('uptime | pbcopy')

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

   >>> r.history
   [<Response 'uptime'>]


Forked from: https://github.com/kennethreitz/envoy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
subp-0.1.1.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page