Skip to main content

runner.py Run, Attach, Schedule, Repeat, Chain and React to commands.

Project description


.. image:: https://badge.fury.io/py/run.py.svg
:target: https://pypi-hypernode.com/project/runner.py/

.. image:: https://travis-ci.org/mariocesar/run.py.svg?branch=master
:target: https://travis-ci.org/mariocesar/run.py

Install and Use
---------------

Install with pip.

.. code-block:: console

pip install runner.py

A simple example on how to use it.

.. code-block:: python

import asyncio

from runnerpy.runner import Runner

if __name__ == '__main__':
loop = asyncio.get_event_loop()

runner = Runner(loop)
runner.run('python manage.py runserver')
runner.run('celery -A project worker -l INFO')

runner.start()

Now a Django app will run along the celery worker. Hit ctrl+c to stop both.

Some examples: Creating a backup

.. code-block:: python
import asyncio

from runnerpy.runner import Runner

if __name__ == '__main__':
loop = asyncio.get_event_loop()

runner = Runner(loop)
runner.run('cp -ar dist/static public/static')
runner.run('pg_dump --all')

runner.start()

Some examples: Creating a backup

.. code-block:: python
import asyncio

from runnerpy.runner import Runner

if __name__ == '__main__':
loop = asyncio.get_event_loop()

runner = Runner(loop)
runner.run('tail -f /var/log/syslog)
runner.run('ls -al /home')

runner.start()

Project details


Download files

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

Source Distribution

runner.py-0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

runner.py-0.4-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file runner.py-0.4.tar.gz.

File metadata

  • Download URL: runner.py-0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for runner.py-0.4.tar.gz
Algorithm Hash digest
SHA256 d620e300f537b099b823d64c2a180f70d923de211c6592974731701f8b8420d6
MD5 e7f4359867a6044edecf820945748243
BLAKE2b-256 b20152fd715d4078c96e8d266aae52d835687d144c0e7e0c32f5186785d220e1

See more details on using hashes here.

File details

Details for the file runner.py-0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for runner.py-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 84a41464099acf841ec7dc9ee5fe7a1046092509189fbcabf4ff658bf56b193a
MD5 8514699ce4587724b349f24fcb70d16a
BLAKE2b-256 e1b386a8a9a62ff4b210044963dd32b34206abb44a5d9d4a317375f431425027

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page