2026-08-30 04:30:06 +07:00
2026-08-30 04:30:06 +07:00
2026-08-30 03:39:26 +07:00
2026-08-30 03:39:26 +07:00

IPython demo

The application-facing API is:

from ipython_demo import App
from ipython_demo import CallOptions

app = App()
call = app.run_code(
    "print('hello'); 2 + 2",
    shell_name="new",
    options=CallOptions(collapsed=False),
)

call contains the submitted code, call_id, shell_name, typed options, a typed result, and ordered typed events. Event sequences are stable within a call, so a frontend can use (call_id, sequence) as its idempotency and React key pair.

For MIME output, retain the complete bundle and choose a renderer in the UI. The initial preference is text/html, JavaScript, text/latex, then text/plain, with image MIME types handled by their image renderers. HTML must be sanitized, and JavaScript should be treated as untrusted unless the host explicitly opts into a sandboxed execution policy.

Run the JSON showcase with:

uv run ipython-demo
S
Description
free monthly codex could get you how far
Readme
418 KiB
Languages
Python 100%