Request to add gevent using project to Wiki (parallel-ssh)

36 views
Skip to first unread message

Dan

unread,
Jun 8, 2016, 1:38:49 PM6/8/16
to gevent: coroutine-based Python network library
Hi there,

Firstly many thanks for all your work on gevent - have been using it on many projects over the years and it just keeps getting better.

Would like to add a gevent using project to the Wiki and posting here, following the instructions.

The project is parallel-ssh and it's an asynchronous parallel SSH client library.

For example:

pip install parallel-ssh

>>> from pssh import ParallelSSHClient
>>> hosts = ['myhost1', 'myhost2']
>>> client = ParallelSSHClient(hosts)
>>> output = client.run_command('ls -ltrh /tmp/', sudo=True)
>>> print output

{'myhost1': {'exit_code': None, 'stdout': <generator>, 'stderr': <generator>, 'channel': <channel>, 'cmd' : <greenlet>, 'exception' : None},
 
'myhost2': {'exit_code': None, 'stdout': <generator>, 'stderr': <generator>, 'channel': <channel>, 'cmd' : <greenlet>, 'exception' : None}}

>>> for line in output['myhost1']['stdout']:
>>>     print line
<..>
>>> print output['myhost1']['exit_code']
0



Jason Madden

unread,
Jun 8, 2016, 1:39:32 PM6/8/16
to gev...@googlegroups.com

> On Jun 8, 2016, at 11:57, Dan <pkit...@gmail.com> wrote:
>
> The project is parallel-ssh and it's an asynchronous parallel SSH client library.

Added. Thank you.

~Jason

Dan

unread,
Jul 12, 2016, 12:47:50 PM7/12/16
to gevent: coroutine-based Python network library
Many thanks!
Reply all
Reply to author
Forward
0 new messages