Skip to main content

Canvas LMS folder sync

This is a command-line tool and Python package to synchronise a local folder with one in a Canvas LMS course.

In order to use this, you need a Canvas API token linked to an account which has permission to create files in your target course's Files section. See the Canvas API documentation for instructions on how to get a token.

Installation

Python 3.8 or newer is required.

To install the package, run:

pip install canvaslms_sync

This provides a shell command canvas_sync.

Usage

canvas_sync local_folder remote_url -t CANVAS_API_TOKEN

You can store your Canvas API token in a file like this:

[Canvas]
canvas_api_token = TOKEN

By default, the script looks for this file in credentials.ini in the current working directory, but you can specify a different path with the -c option.

Hidden files and folders (those whose names start with .) are ignored by default. You can include them with the --include-hidden option.

Development

I followed the Python packaging tutorial to make this package.

To build this package, you need twine and build:

python3 -m pip install twine build

First, build the distributable files:

python3 -m build

That produces .tar.gz and .whl files in ./dist. You can try installing the package in a different virtualenv with pip install dist/canvaslms_sync-$VERSION-py3-none-any.whl.

To upload to PyPI:

python3 -m twine upload --repository pypi dist/*

Metadata

Release files for canvaslms-sync 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canvaslms-sync 1.0.0
File Size Uploaded
canvaslms-sync-1.0.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for canvaslms-sync 1.0.0
File Interpreter ABI Platform
canvaslms_sync-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / canvaslms-sync-1.0.0.tar.gz

Download URL canvaslms-sync-1.0.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
91d95275bf13bceb8fb4868a6c193dca2c55530692cfc45000cb1c7bdcbaaaa6
BLAKE2b-256 checksum
How to use checksums
ba60a613e86c20a5b4b7e8c6b856f8fbde8764df9b9fcf6bfbe69865ec004a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / canvaslms_sync-1.0.0-py3-none-any.whl

Download URL canvaslms_sync-1.0.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56aae97e6db6075d19b9e8b23b9e80df3dcaf11323214697b9265ecd5c101f5b
BLAKE2b-256 checksum
How to use checksums
0b344304a3abd1360b32f62348f7955191251213849e8dac428c006d605ee634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page