Skip to main content

Command-line interface to Canvas LMS

Project description

canvaslms: A CLI to Canvas LMS.

This program provides a command-line interface for Canvas. The command is canvaslms and it has several subcommands in the same style as Git. canvaslms provides output in a format useful for POSIX tools, this makes automating tasks much easier.

Let's consider how to grade students logging into the student-shell SSH server. We store the list of students' Canvas and KTH IDs in a file.

canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv

Then we check who has logged into student-shell.

ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
  > logged-in.csv

Finally, we check who of our students logged in.

for s in $(cut -f 2 students.csv); do
  grep $s logged-in.csv && \

Finally, we can set their grade to P and add the comment "Well done!" in Canvas. We set the grades for the two assignments whose titles match the regular expression (Preparing the terminal|The terminal).

    canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
      -u $(grep $s students.csv | cut -f 1) \
      -g P -m "Well done!"
done

Installation

Just install the PyPI package:

python3 -m pip install canvaslms

Some subcommands use pandoc, so you will likely have to install pandoc on your system manually.

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

canvaslms-2.15.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvaslms-2.15-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file canvaslms-2.15.tar.gz.

File metadata

  • Download URL: canvaslms-2.15.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-45-generic

File hashes

Hashes for canvaslms-2.15.tar.gz
Algorithm Hash digest
SHA256 ef3a354d43d33539cf38aab4c254d4d4acd3f73855e5a10325e11cad48b4467c
MD5 d1bb397feddaa62778e676cf6d4d1ac1
BLAKE2b-256 8c69d810499258fe071ba7b53af210fd3d14e08ce6c7d8e9ff46d34387cc7a30

See more details on using hashes here.

File details

Details for the file canvaslms-2.15-py3-none-any.whl.

File metadata

  • Download URL: canvaslms-2.15-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-45-generic

File hashes

Hashes for canvaslms-2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 5db5a598d6e545f2211c5bdf56250822066c93392ad0dadfc5c48f097bb3e8ee
MD5 905a1aa8a91bbece830ff3c9e01c6318
BLAKE2b-256 62248013ec07fb49b4df40e17de18d5e35c1a2edebe09ee3c832bda0cac2e992

See more details on using hashes here.

Supported by

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