Skip to main content

rcontrol

https://travis-ci.org/parkouss/rcontrol.svg?branch=master https://coveralls.io/repos/parkouss/rcontrol/badge.svg?branch=master Documentation Status

rcontrol is a python library based on paramiko intended to work with remote machines via ssh.

Unlike fabric, it is intended to perform tasks in an asynchronous way, and to work with python >= 2.7 (including python 3).

Please note that this is under development! I am waiting for feedback, ideas and contributors to make this tool evolve.

Basic example:

from rcontrol.ssh import SshSession, ssh_client
from rcontrol.core import SessionManager

def log(task, line):
    print("%r: %s" % (task, line))

with SessionManager() as sessions:
    # create sessions on two hosts
    sessions.bilbo = SshSession(
        ssh_client('http://bilbo.domain.com', 'user', 'pwd'))
    sessions.nazgul = SshSession(
        ssh_client('http://nazgul.domain.com', 'user', 'pwd'))

    # run commands in parallel
    sessions.bilbo.execute("uname -a && sleep 3", on_stdout=log)
    sessions.nazgul.execute("uname -a && sleep 3", on_stdout=log)

This example just show you how rcontrol looks like. Look at the documentation on http://rcontrol.readthedocs.org/en/latest/ if you’re interested to see more!

What rcontrol can do

  • execute multiple commands on local and remote hosts in an asynchronous way (it is up to you to synchronize them)

  • define timeout and output timeout for the commands

  • attach callbacks when a line is read (stdout or stderr), on timeout and when the commands are finished

  • copy files and directories from one host to another

What rcontrol needs (contributors, you’re welcome!)

  • be able to stop (kill) a command (local or remote)

  • more file operations

  • love

How to install

Use pip.

pip install -U rcontrol

Changelog

See the CHANGELOG.rst file.

Metadata

Release files for rcontrol 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rcontrol 0.1.3
File Size Uploaded
rcontrol-0.1.3.tar.gz 10.9 kB Details

Release files / rcontrol-0.1.3.tar.gz

Download URL rcontrol-0.1.3.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
da8e9a3495a81fb2e61d55f9d969a69077243b6a3c8647ec27f3069d9a742288
BLAKE2b-256 checksum
How to use checksums
029be35b9c74a2701aae66765b47134d380537edfcf9428504210259f47dcb5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page