API Reference
The public Python API is intentionally small. Instructors usually call
notebook_ta.load() from a notebook setup cell, and may use notebook_ta.get_registry() for
introspection.
notebook-ta public API.
- notebook_ta.load(global_config, exercises_config, *, notebook_path=None, llm_overrides=None, debug=False)
Load configuration files, register exercises, run auto-setup if needed, and register the %%notebook_ta IPython magic.
Must be called from within a Jupyter notebook cell.
- Parameters:
global_config (str | Path) – Path or URL to the global configuration TOML.
exercises_config (str | Path) – Path or URL to the exercises TOML.
notebook_path (str | Path | None) – Optional path to the
.ipynbfile. Required only when one or more exercises omitstatementfrom the TOML and the statement should instead be extracted from the notebook’s markdown cells (<div id="<exercise_id>">…</div>pattern). If not provided the system will try to detect the notebook path automatically; pass this argument explicitly when auto-detection fails.llm_overrides (dict[str, Any] | None) – Optional dict of LLM settings that override the values from global_config. Valid keys mirror
LLMConfigfields (e.g.model,base_url,provider,timeout).debug (bool) – When
True, enable DEBUG-level logging to the terminal and display the final LLM prompt in the notebook output as a collapsible widget before each LLM call. Defaults toFalse.
- Return type:
None
- notebook_ta.get_registry()
Return the active ExerciseRegistry for introspection.
- Return type:
ExerciseRegistry