Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A remote process launcher.

Project Description

yassh

Yassh is a python library used to run asynchronous, dependent remote and local tasks.

Usage

import logging
from yassh import Reactor, RemoteRun, RemoteConfiguration, LocalRun

logging.basicConfig(level=logging.DEBUG)

# Create a remote ; only host parameter is mandatory
remote = RemoteConfiguration(host='localhost', username='user')

# ssh_config(5) options can be set in RemoteConfiguration object
remote.set('Compression', 'yes')
remote.set('CompressionLevel', '9')

r = Reactor()
c1 = RemoteRun(r, remote, 'sleep 5')
c2 = LocalRun(r, 'echo ok')
c3 = RemoteRun(r, remote, 'echo "finished" && sleep 1')


def start_c2():
    # Start cmd2 when cmd1 complete
    c2.start()
c1.register_exit_monitor(start_c2)


def start_c3():
    # Start cmd3 when cmd2 complete
    c3.start()
c2.register_monitor(u'ok', start_c3)


def on_c3_finished():
    # Print dummy message when c3 is near terminaison
    print('c3 almost finished')
c3.register_monitor(u'finished', on_c3_finished)


# Start first task
c1.start()


# Infinite
timeout = -1
while r.run(timeout) > 0:
        pass

Installation

To install latest release:

pip install yassh

To install latest code:

pip install git+https://github.com/enyx-opensource/yassh.git

Testing

Run from project root:

behave

License

MIT License (see LICENSE)

Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

History Node

0.8.2

History Node

0.8.1

History Node

0.5.7

History Node

0.5.6

History Node

0.5.4

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0b1

History Node

0.4.1b1

History Node

0.4.0b1

History Node

0.2.0b1

History Node

0.1.0b3

History Node

0.1.0b2

History Node

0.1.0b1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
yassh-1.0.1-py2.py3-none-any.whl (10.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Apr 7, 2017
yassh-1.0.1.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Apr 7, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting