CallOptions

This commit is contained in:
lda
2026-08-30 03:39:26 +07:00 Verified
parent 2587b07b4a
commit 282dc5b4e8
8 changed files with 59 additions and 65 deletions
+4 -3
View File
@@ -4,17 +4,18 @@ The application-facing API is:
```python
from ipython_demo import App
from ipython_demo import CallOptions
app = App()
call = app.run_code(
"print('hello'); 2 + 2",
shell_name="new",
collapsed=False,
options=CallOptions(collapsed=False),
)
```
`call` contains the submitted `code`, `call_id`, `shell_name`, `collapsed`
state, a typed `result`, and ordered typed `events`. Event sequences are
`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.