CanvasUtils
Utilities for interacting with Canvas using Python and the canvasapi.
Installation
pip install canvasutils
canvasutils depends on the ipywidgets packages. To make sure widgets render correctly in notebooks, you may need to enable the widgets extension in Jupyter following these instructions in the ipywidgets docs, in particular, follow these instructions if using Jupyter Lab.
Features
- Submit files to Canvas from within a Jupyter notebook with user-friendly widgets.
- Convert files to formats like
.htmlfrom with canvas. - Create assignments (coming)
- Create assignment rubrics (coming)
Dependencies
See the file pyproject.toml, under the section [tool.poetry.dependencies].
Usage
Assignment Submission in Jupyter
The submit module is made to be used within a Jupyter notebook (.ipynb file). See the provided example.ipynb. There are two available submission interfaces, widget-based drop-down menus, or text-based entries.
Widget Submission
api_url = "https://canvas.instructure.com/"
course_code = 123456
from canvasutils.submit import submit
submit(course_code, api_url=api_url, token=False) # token=False allows you to enter token interactively
Text-based Submission
submit(course_code, api_url=api_url, token=False, no_widgets=True)
Notebook Conversion in Jupyter
Note that this command will convert the most recently saved version of a notebook. You should save your notebook before executing this command in a cell.
from canvasutils.submit import convert_notebook
convert_notebook('example.ipynb', to_format="html")
Notebook successfully converted!
Contributors
Contributions are welcomed and recognized. You can see a list of contributors in the contributors tab.
Credits
This package was originally based on this repository created by Emily Gubski and Steven Wolfram.
Metadata
Release files for canvasutils 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canvasutils-0.4.1.tar.gz | 6.9 kB | Without provenance | Details for canvasutils-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canvasutils-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for canvasutils-0.4.1-py3-none-any.whl |
Total release size: 14.2 kB
Release files / canvasutils-0.4.1.tar.gz
| Download URL | canvasutils-0.4.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0c7475a6d01dbc4f7cf4fb3ef2bd63c0fcf10a7f03004fd9697434450552b55
|
|
BLAKE2b-256 checksum How to use checksums |
df3c4272c225cf21857e4a7bad28b5bf20d7182da3ba3e0b6dfd8bb7f2b62c88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.5 Darwin/18.7.0
|
Release files / canvasutils-0.4.1-py3-none-any.whl
| Download URL | canvasutils-0.4.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2a8a6cc3832d610cda11aed374ab5724fa5f9b99fa943ce2cd3ea24fb05b8ef
|
|
BLAKE2b-256 checksum How to use checksums |
110bb8c9578d26127102281829742eeb40851008237847960d84f29f18aa29b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.5 Darwin/18.7.0
|
Security for canvasutils 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.