https://prefect.io logo
Title
d

David Hogarty

04/03/2020, 6:40 PM
is there anything builtin for making shell execution and ssh execution more convenient, or would I just leverage the best I can find in terms of python libraries for that?
d

Dylan

04/03/2020, 6:43 PM
Hey @David Hogarty, welcome! I know that we have a ShellTask, but I’m not sure if we have something in our task library for ssh. https://docs.prefect.io/api/latest/tasks/shell.html#shelltask
d

David Hogarty

04/03/2020, 6:44 PM
cool, if push comes to shove I can always use the shell stuff to do ssh
👍 1
n

nicholas

04/03/2020, 7:09 PM
hey @David Hogarty, the ShellTask is really easily extendible like such:
class ExtendShell(ShellTask):
    def run(self):
        # Set the command arg here so you can dynamically build the command string
        self.command = f"some shell command"
        super(ExtendShell, self).run()
I haven't tried this for
ssh
but should make shell execution in general more convenient!
:marvin: 1