Python Script
Execute Python code in an isolated virtual environment with automatic dependency management.
Plugin: python-executor
Group: Scripts
| Task Type | Alias |
|---|---|
dev.bringup.plugin.scripts.python.Script | Script mode |
dev.bringup.plugin.scripts.python.Commands | Commands mode |
Examples
Basic Python script
id: python-hello
namespace: examples
description: Run a simple Python script
tasks:
- id: hello
type: dev.bringup.plugin.scripts.python.Script
script: |
import platform
print(f"Hello from Python {platform.python_version()}!")
print(f"Running on {platform.system()}")
Properties
Common Task Properties
See Shell > Common Task Properties for id, type, description, disabled, timeout, retry, allow_failure, run_if, and worker_group.
Notes
- Each Python task creates its own isolated virtual environment, ensuring dependency isolation between tasks.
- The virtual environment is cleaned up after execution to avoid disk space issues.
- Template variables in the
scriptfield are resolved before execution. - For large dependencies, consider using a Docker task with a pre-built image instead.