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.3.tar.gz (21.9 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.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canvaslms-1.3.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10

File hashes

Hashes for canvaslms-1.3.tar.gz
Algorithm Hash digest
SHA256 5b9156a2916eb372f8a274839fdbddd55c08957a4dc290935f75a0522d0e61ee
MD5 bc598ca4b43a12f3dd12c0a9c489d2e5
BLAKE2b-256 1f381e5b5c821a06419b74eda78cfa67b09300949b0dd3906ea5b1a97adb0d7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canvaslms-1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10

File hashes

Hashes for canvaslms-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1444413137186c3cddf4f793bb46cb58e8cac4bb7a05ad07ea82c36e7856dbb9
MD5 bddd2fcd54027d670b77ef200948b2ec
BLAKE2b-256 93d35ea0bd4f6931511ee530c4e2525dd09d87ebf76096c7d1c2d019c43fbf23

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