Description
Therun-python prompt provides a simple way to execute Python code in a container. It handles image selection and provides clear instructions for the execution.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
code | string | Yes | - | Python code to execute |
Generated Instructions
When invoked with:run with tag:python:3.11-slim image. If the image doesn’t exist, import it first.
Multi-line Script
With Package Usage
install-packages or prepare-environment.
Implementation Notes
The agent should:-
Check if
tag:python:3.11-slimexists withlist_images -
If not found, import it with
import_image -
Execute the code with
run:
See Also
- run-shell - Run shell commands
- sync-and-run - Run with local files
- install-packages - Install dependencies first