Skip to main content

A remote process launcher.

Project description

Build Status Coverage Status Code Climate Issue Count

yassh

This project contains a python library used to run asynchronous and dependent ssh tasks.

Usage

import logging
from yassh import Reactor, Command

logging.basicConfig(level=logging.DEBUG)

r = Reactor()
c1 = Command('cmd1', r, 'localhost', 'user', 'sleep 5')
c2 = Command('cmd2', r, 'localhost', 'user', 'echo ok')
c3 = Command('cmd3', r, 'localhost', 'user', 'echo "finished" && sleep 1')

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

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

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

# Start first task
c1.start()

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-SA/yassh.git

Testing

Run from project root:

behave

License

MIT License (see LICENSE)

Project details


Download files

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

Source Distributions

yassh-0.4.0b1.tar.gz (5.4 kB view details)

Uploaded Source

yassh-0.4.0b1.linux-x86_64.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file yassh-0.4.0b1.tar.gz.

File metadata

  • Download URL: yassh-0.4.0b1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yassh-0.4.0b1.tar.gz
Algorithm Hash digest
SHA256 50ad11456d94e8d5d048dee43c848abd4d1348343da06e647f4b2dc6b7cffdf6
MD5 ff2801028782ee759874e6f4be520590
BLAKE2b-256 fe27338163c080dfae996509c8e8580042ffb0acb8cf54f1f262604212a61dfb

See more details on using hashes here.

File details

Details for the file yassh-0.4.0b1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for yassh-0.4.0b1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 d6ee4ba1848fcdc5b565fd4c09f39a5e55a3bfd889376affa978c43a03ec61b4
MD5 60100759f3aec251e002a173a898dc27
BLAKE2b-256 e8e92c66c28a1e569d29a7c8bd3de436d5ef144f286ac7b074e9de14ddf45a97

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