PyBryt Documentation#

PyBryt is an open source Python auto-assessment library for teaching and learning. Its goal is to empower students and educators to learn about technology through fun, guided, and hands-on content aimed at specific learning objectives. PyBryt is designed to work with existing auto-grading solutions and workflows, such as Otter Grader, OkPy, and Autolab.


Educators and institutions can leverage PyBryt to integrate auto-assessment and reference models into hands-on lab exercises and assessments. Some of the PyBryt benefits are:

  • Educators do not have to enforce the structure of the solution

  • Learners practice algorithm design, code design, and solution implementation

  • Learners receive quick and meaningful pedagogical feedback, which substantially contributes to the learning experience

  • Complexity of the learner’s solution can be analyzed

  • Plagiarism detection and support for reference implementations

  • Easy integration into existing organizational or institutional grading infrastructure

PyBryt’s core auto-assessment behavior operates by comparing a student’s implementation of a programming problem to a series of reference implementations provided by an instructor. A reference implementation defines a pattern of values and conditions on those values expected to be present in students’ implementation. By comparing student’s and reference implementations, PyBryt provides tailored feedback and advice to the student on how to bring their implementation closer to the reference one. PyBryt, instead of only comparing the output of their solution to the reference one, enables students to reconsider the design choices they made and improve their implementation in incremental steps.

A reference implementation is created by annotating the code written or found by an instructor and executing this code to create a ReferenceImplementation object. Annotations are created by creating instances of subclasses of the abstract Annotation class.