Synchronise a local folder with one in a Canvas LMS course
Project description
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/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for canvaslms_sync-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56aae97e6db6075d19b9e8b23b9e80df3dcaf11323214697b9265ecd5c101f5b |
|
MD5 | c45b5a46ee7800b38ef8f960e9522b06 |
|
BLAKE2b-256 | 0b344304a3abd1360b32f62348f7955191251213849e8dac428c006d605ee634 |