Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvasgrader

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvasgrader

Simple grading interface with the Canvas API

  • 1.0.2
  • PyPI
  • Socket score

Maintainers
1

canvasgrader

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

Installation

.. code:: bash

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 <https://canvas.instructure.com/doc/api/file.object_ids.html>__ by which you want to identify students

.. code:: python

>>> 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:

.. code:: bash

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc