run_python_stream
Stream Python code execution output in real time, eliminating delays in monitoring long-running tasks like scraping or processing.
Instructions
Execute Python code with REAL-TIME STREAMING OUTPUT.
Perfect for long-running tasks where you want to see progress as it happens:
Web scraping multiple pages (see each page as it's scraped)
Data processing loops (see progress through large datasets)
API calls with retries (see each attempt)
File operations (see each file as it's processed)
Long computations (see intermediate results)
Output streams in real-time as the code executes, so you see results immediately instead of waiting for the entire execution to complete.
Args: code: Python code to execute. Use print() liberally for progress updates. description: Brief task description (for logging) timeout: Max execution time in seconds auto_install: Auto-install missing packages
Returns: Streaming output followed by execution summary, with any generated images
Example: code = ''' import time for i in range(5): print(f"Processing item {i+1}/5...") time.sleep(1) print("✓ Done!") '''
The output will appear line-by-line as the code runs, not all at once at the end.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| description | No | ||
| timeout | No | ||
| auto_install | No |