Skip to main content

RedExpect

Documentation Status

RedExpect makes automating remote machines over SSH very easy to do and is very fast in doing exactly what you ask of it. Based on ssh2-python (which provides libssh2 bindings for python) and made into an easy to use SSH library via RedSSH. If you're familiar with using expect but would like the easy of use and accessibilty of python, then look no further!

Installing

RedExpect can be installed via pip with pip install redexpect or the latest commit, which may not be the most stable, from git with pip install git://git@bitbucket.org/Red_M/RedExpect.git

Documentation

99% of questions around how to do something should be answered in the documentation. If something is not there please raise an issue so it can be added to the documentation. Now with autodocs!

Why not use ?

This is my experiences with other pieces of software to do something similar or the same as RedExpect. It mostly revolves around compatibility with remote servers, (lack of) state(less) based automation or lack of features.

I've had issues with other software in the past and sometimes I found that other software doesn't want to do what I want it to do. I should be able to open and close SSH tunnels at a whim, start up SCP/SFTP and access other lower level features of SSH at any time.

I've had issues with accessing non-Linux devices that have weird versions or custom compiles of the OpenSSH server or are completely custom SSH servers. Because of incompatibility in other libraries, RedExpect isn't designed with just Linux in mind, its meant to control everything you can think of that has SSH. If you can connect to it via your regular OpenSSH client then RedExpect/RedSSH should be able to connect as well.

I don't want to install an agent or have to manage state of a remote machine, if I want something done it should just be applied, I don't want extra things to manage or leave hanging around.

TO DO

  • Unit tests
  • More examples

Release files for redexpect 2.0.1

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

Source distribution (sdist)

Source distribution for redexpect 2.0.1
File Size Uploaded
redexpect-2.0.1.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for redexpect 2.0.1
File Interpreter ABI Platform
redexpect-2.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 28.6 kB

Release files / redexpect-2.0.1.tar.gz

Download URL redexpect-2.0.1.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9abe0735bd0e73daa5eeafb5a4ea4ae94784753501dbac531b56c29f894b792c
BLAKE2b-256 checksum
How to use checksums
8931d199976590a3cbc5aa7b58595262158882fbc86689765ac623fcf8e75e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / redexpect-2.0.1-py2.py3-none-any.whl

Download URL redexpect-2.0.1-py2.py3-none-any.whl
Size 19.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
dcc8a4adc81c8093a353bf6f7eeaef855ec519384dada25665875e51bcef288f
BLAKE2b-256 checksum
How to use checksums
bd2e2fc4092516585d2d06625192ea1cf93344abe86cdb26dddaa68ea6dd7e1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
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