ploomber.clients.ShellClient¶
- class ploomber.clients.ShellClient(run_template='bash {{path_to_code}}', subprocess_run_kwargs={'shell': False, 'stderr': - 1, 'stdout': - 1})¶
Client to run command in the local shell
- Parameters
run_template (str) – Template for executing commands, must include the {{path_to_code}} placeholder which will point to the rendered code. Defaults to ‘bash {{path_to_code}}’
subprocess_run_kwargs (dict) – Keyword arguments to pass to the subprocess.run when running run_template
Methods
close
()Close connection if there is one active
execute
(code)Run code
- close()¶
Close connection if there is one active
- execute(code)¶
Run code
Attributes
connection
Return a connection, open one if there isn’t any