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
Generate a new Access Token at https://<canvas-installation>/profile/settings
Grab your course ID from the web interface: https://<canvas-installation>/courses/<course-id>
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
Release history Release notifications | RSS feed
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.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for canvasgrader-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1d57cf803e3379894511d5496c45dcb2b0b600173600210d88d6edafebdf3c |
|
MD5 | 1e505b00dd7a3681fb878a675e1fcd4e |
|
BLAKE2b-256 | 4187a179da448088435a32170de5692fff32e7b32cca8fc0e8fe5b96ba52bb40 |