Metadata-Version: 2.1
Name: sshscript
Version: 0.992
Summary: write automation scripts for ssh and subprocess in python
Home-page: https://github.com/iapyeh/sshscript
Download-URL: https://github.com/iapyeh/sshscript/archive/refs/tags/0.94.tar.gz
Author: Hsin Yuan Yeh
Author-email: iapyeh@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/iapyeh/sshscript/issues
Keywords: pypi,sshscript,ssh,paramiko,subprocess,shell script
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Documentation
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6.7
Description-Content-Type: text/x-rst
License-File: LICENSE.txt

SSHScript
#########

The sshscript is an integration of subprocess and paramiko_ . 
It provides an unique interface to invoke commands locally and remotely. 
Something likes to embed shell commands in a python script. For example:

.. code:: 

    # execute a command on localhost and parse the output with python
    $ls -l
    for line in $.stdout.split('\n'):
        if line.startswith('d'): continue
        print(line)
    
    # execute a command on remote host and parse the output with python
    $.open('user@host')
    $ls -l
    for line in $.stdout.split('\n'):
        if line.startswith('d'): continue
        print(line)

More on github_



.. _paramiko : https://www.paramiko.org/

.. _github: https://github.com/iapyeh/sshscript
