Skip to main content

Command-line interface for 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-1.16.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

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

canvaslms-1.16-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canvaslms-1.16.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for canvaslms-1.16.tar.gz
Algorithm Hash digest
SHA256 3b23c151996487eb00814d1aa00309a3c10e817a0cb295310f50988a367d8749
MD5 86065059ee351b19dbeb0bc657e137ac
BLAKE2b-256 f13e2c77576e8d8aed4c2b51ea6e8d2b5bbeb96b55caf3e68ba65d1f8643d880

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canvaslms-1.16-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for canvaslms-1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3b91d539c1307eaa71af34fa81f74849617f42e39016080a272ddde2616286d4
MD5 6da7a4c60744cf819c9f9d43f037a588
BLAKE2b-256 6cc9b8f845d15ff2770622d86ef9453ea39374a96fd3ace97ad12c7136997fb9

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