Added more information about credentials to README

This commit is contained in:
alex-bellon 2021-03-16 22:20:56 -05:00
parent a0be61b2ef
commit 572660cce2
1 changed files with 26 additions and 14 deletions

View File

@ -46,11 +46,23 @@ Then run from the command line:
## Configuration
These are the configuration parameters for the program:
- Canvas API URL
- Canvas API key
- Canvas User ID
- Canvas API URL - this is the URL of your institution, for example `https://example.instructure.com`
- Canvas API key - this can be created by going to Canvas and navigating to `Account` > `Settings` > `Approved Integrations` > `New Access Token`
- Canvas User ID - this can be found at `https://example.instructure.com/api/v1/users/self` in the `id` field
- Directory in which to download course information to (will be created if not present)
- List of Course IDs that should be skipped
### Loading credentials from a file
To avoid manually entering credentials every time you run the program, you can create a `credentials.yaml` file in the same directory as the script that has the following fields:
```yaml
API_URL: < URL of your institution >
API_KEY: < API Key from Canvas >
USER_ID: < User ID from Canvas >
```
You can then run the script as normal:
`python export.py`
# Contribute
I would love to see this script's functionality expanded and improved! I welcome all pull requests :) Thank you!