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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file canvasgrader-1.0.2.tar.gz.

File metadata

File hashes

Hashes for canvasgrader-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7fd3e9bf7a36b8d510b0b789de8bcc79e3e028723f98fe11b4613517ebfe9414
MD5 614ace0d1b81ad5f79835fb8c1d6667c
BLAKE2b-256 4623c94dc9f563c66f6f95b94152f10694bfea9d39432ad2137cda4dd64ab95c

See more details on using hashes here.

File details

Details for the file canvasgrader-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for canvasgrader-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 67c2c2e5ff402ae36a93b10a7cb7a0da862e8789b17acc756f8d30962a1af00f
MD5 30e7b799a0c31d9eb6d1319a5e319de7
BLAKE2b-256 0f3ed92cf2642d9f5a60613bcadb8167277ebbabb93548e29f7438a9e0e9405d

See more details on using hashes here.

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