python-executor
python-executor copied to clipboard
compatibility with asyncio
Hi!
Is there a way to use executor in the context of async awaits with python's asyncio library? I'm aware of executor.ssh.client.foreach, but in my case I need to call a lot of remote commands via many nested functions, so foreach is not easily applicable here. It would be awesome to be able to write
async def get_data(target):
cmd = RemoteCommand(target, 'somecommand')
cmd.start()
await cmd.wait()
return cmd.output
Thank you for this incredibly helpful library!