Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with asyncio #18

Open
matthias-k opened this issue Jan 23, 2020 · 0 comments
Open

compatibility with asyncio #18

matthias-k opened this issue Jan 23, 2020 · 0 comments

Comments

@matthias-k
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant