Jumpstarter shell driver, for running controlled shell commands on the exporter.
Project description
Shell driver
jumpstarter-driver-shell provides functionality for shell command execution.
Installation
pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ jumpstarter-driver-shell
Configuration
Example configuration:
export:
shell:
type: jumpstarter_driver_shell.driver.Shell
config:
methods:
ls: "ls"
method2: "echo 'Hello World 2'"
#multi line method
method3: |
echo 'Hello World $1'
echo 'Hello World $2'
env_var: "echo $1,$2,$ENV_VAR"
# optional parameters
cwd: "/tmp"
log_level: "INFO"
shell:
- "/bin/bash"
- "-c"
API Reference
Assuming the exporter driver is configured as in the example above, the client methods will be generated dynamically, and they will be available as follows:
.. autoclass:: jumpstarter_driver_shell.client.ShellClient
:members:
.. function:: ls()
:noindex:
:returns: A tuple(stdout, stderr, return_code)
.. function:: method2()
:noindex:
:returns: A tuple(stdout, stderr, return_code)
.. function:: method3(arg1, arg2)
:noindex:
:returns: A tuple(stdout, stderr, return_code)
.. function:: env_var(arg1, arg2, ENV_VAR="value")
:noindex:
:returns: A tuple(stdout, stderr, return_code)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jumpstarter_driver_shell-0.6.0.tar.gz.
File metadata
- Download URL: jumpstarter_driver_shell-0.6.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b968a6fa7edbb6c3a7e2dd0cd936ccd041da7d61bdcc466036355ee4e4fcd103
|
|
| MD5 |
ab7538192e91424bde3177caf76ddb54
|
|
| BLAKE2b-256 |
25cfcebe66120b514c4d348822995e6544c853423032ec0d45f583efc52a4765
|
File details
Details for the file jumpstarter_driver_shell-0.6.0-py3-none-any.whl.
File metadata
- Download URL: jumpstarter_driver_shell-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1388f8d26de3f5e4f66c490503209a16a69f8fde83050533facab160566cd389
|
|
| MD5 |
1c8be305a2da63425b2709cd13cf73df
|
|
| BLAKE2b-256 |
464b50a508981d099f9610b2265134c963d1631b3faf97c2357ddca2d5319921
|