Skip to main content

Simple grading interface with the Canvas API

Project description

This package provides a simple interface with the Canvas grading API to save you the hassle of dealing with the web gradebook.

Installation

pip install canvasgrader

Usage

  1. Generate a new Access Token at https://<canvas-installation>/profile/settings

  2. Grab your course ID from the web interface: https://<canvas-installation>/courses/<course-id>

  3. Choose a key by which you want to identify students

>>> from canvasgrader import CanvasGrader
>>> api_key = 'your access token'
>>> canvas_grader = CanvasGrader(api_key=api_key, base_uri='umich.instructure.com',
                                 course_id=85425, id_key='sis_login_id')
>>> assignment_id = canvas_grader.create_assignment(name='Homework 01',
                                                    points_possible=4)
>>> canvas_grader.grade_assignment(assignment_id, {
        'mterwil': 4,
    })

Alternatively, you may place the API key in a dotfile:

$ echo "my api key" > ~/.canvasgrader
$ chmod 600 ~/.canvasgrader

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canvasgrader-1.0.2.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

canvasgrader-1.0.2-py2.py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page