Skip to content

Hello World: Interactive Runner

This page runs the Hello World GraphReduce example on the same machine as the docs API server and streams stdout live into the docs UI.

One-time local setup

Run these commands from a repository checkout:

pip install -e ".[dev]"
pip install -r docs/requirements.txt
pip install -r docs/api/requirements.txt

This Hello World runner uses the pandas backend, so optional extras like [spark], [daft], or [duckdb] are not required.

Start the stream API (terminal 1)

python docs/api/modal_stream_server.py

Start the docs (terminal 2)

mkdocs serve

Then open this page and click Run Hello World.

Production deployment

  1. Deploy docs to GitHub Pages as usual.
  2. Deploy the API server (docs/api/modal_stream_server.py) on your own host (DigitalOcean, Render, Fly, etc.) behind HTTPS.
  3. Set backend CORS env var to your docs origin:
export GRAPHREDUCE_ALLOWED_ORIGINS="https://<your-gh-pages-or-custom-domain>"
  1. In this page, set the backend URL in the input (for example https://runner.yourdomain.com) and click Save API URL.

Notes

  • Everything for this implementation lives under docs/*.
  • The browser UI is static; command execution happens through docs/api/modal_stream_server.py.
  • The API runs python examples/hello_world_local_runner.py locally on the server host.
  • API base URL defaults to http://127.0.0.1:8001 and can be overridden in the input.