otter.api Reference

otter.api.export_notebook(nb_path, dest=None, debug=False, exporter_type=None, **kwargs)

Exports a notebook file at nb_path to a PDF with optional filtering and pagebreaks. Accepts other kwargs passed to the exporter class’s convert_notebook class method.

  • nb_path (str) – path to notebook

  • dest (str, optional) – path to write PDF

  • debug (bool, optional) – whether to run export in debug mode

  • exporter_type (str, optional) – the type of exporter to use; one of ['html', 'latex']

  • **kwargs – additional configurations passed to exporter

otter.api.grade_submission(ag_path, submission_path, quiet=False, debug=False)

Runs non-containerized grading on a single submission at submission_path using the autograder configuration file at ag_path.

Creates a temporary grading directory using the tempfile library and grades the submission by replicating the autograder tree structure in that folder and running the autograder there. Does not run environment setup files (e.g. or install requirements, so any requirements should be available in the environment being used for grading.

Print statements executed during grading can be suppressed with quiet.

  • ag_path (str) – path to autograder zip file

  • submission_path (str) – path to submission file

  • quiet (bool, optional) – whether to suppress print statements during grading; default False

  • debug (bool, optional) – whether to run the submission in debug mode (without ignoring errors)


the results object produced during the grading of the


Return type