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

remoteframe-0.1.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

remoteframe-0.1.3-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file remoteframe-0.1.3.tar.gz.

File metadata

  • Download URL: remoteframe-0.1.3.tar.gz
  • Upload date:
  • Size: 8.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 remoteframe-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b8fb0b200e16b73fea8a4b43092e0f33c82c906bb2bcd3670fdfab7285a84c1f
MD5 d084f4a2e76908a20212168b0c906530
BLAKE2b-256 ca5e5c3946b4c03b6c086d736823f5a9bb60ee5ec8c1bb2c3b8cc0fa3cf476ab

See more details on using hashes here.

File details

Details for the file remoteframe-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: remoteframe-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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 remoteframe-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f342b25d9a1baa3cb27cc519b4891c1e38ae26d0e9ae284b86f09221f9dcf82e
MD5 6636c9c916096fd164c9c94e2001f062
BLAKE2b-256 eff1b437c9809262fa2b422c0ae0a41eba90afd2152dcae00fc46bd14870085f

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page