Skip to main content

Wrappers for remote exec, local exec.

Project description

Remotelib



Various wrappers for subprocess, ssh, fabric.


REX: Remote execute:

REX( target, user = None, pass_ = None, port = None, audit_file = None, silent = True )

REX.rex("cmd", audit=True, bg=False, logfilename="deploy1.log")

Remotely execute the command specified by cmd. If bg=True, runs with nohup and returns immediately. If audit = True, writes the stdout of the command to the specified logfilename on the remote server.

REX.rex_push(local_path, remote_path): scp from the user over the active REX connection

REX.rex_pull(remote_path, local_path): scp a file towards the user over an active REX connection

SSHTunnel(object)

import import ssh_tunnel
tun = ssh_tunnel.SSHTunnel(
        <remote-site> [local_port(4444), remote_port(3306), 
        remote interface("localhost"), remote_user=<current_user>, spin=(True,False),
        foreground=(True,False), immediate=(True, False)
        )

RemoteDB(SSHTunnel):

-- Execute MySQL queries over a forwarded SSH connection

remote_db = ssh_tunnel.RemoteDB(
    db_hostname, db_user=<current_user>, db_pass=<None>, db_port=4444, database=<None>, **SSHTunnel(*, **)
    )

Tunnels(object):

-- Registry for SSH Tunnels; also allows iteration (for example, to kill the connection.) Allows iteration. -- To register a tunnel, use the register()

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

rxpipe-0.7.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rxpipe-0.7.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file rxpipe-0.7.0.tar.gz.

File metadata

  • Download URL: rxpipe-0.7.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for rxpipe-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9c378828e784b90ce5530086742bc7365ba2613a2dd9f6f0ed1e93f54bdf9c8a
MD5 e1c5a987634b5e5c060e663a413f8106
BLAKE2b-256 679486b0ca175149f0eaae6e23fe9496287e35a0491a8115a4729bf00de32f9f

See more details on using hashes here.

File details

Details for the file rxpipe-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: rxpipe-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for rxpipe-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f320c48abced3db0cbb480008fb927d9f7d823919d5a7d27256ca3f6b0e8fdd
MD5 714bdf3778f0ce11f8ed9bd93c4fd4df
BLAKE2b-256 1d8a28d9b860e81890dea68ead431fa9fb38c4644e6dbfb398bba2892b64ef68

See more details on using hashes here.

Supported by

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