A Python package for connecting to Canvas LMS API
Project description
Canvas Connector
A Python package for easily connecting to the Canvas LMS API.
Features
- Easy authentication with Canvas API
- Fetch courses, assignments, and grades
- Get peer information
- Track upcoming assignments
- Discussion board interactions
- Submit assignments and post comments
- Built with Polars for fast data processing
Installation
Using uv (recommended)
uv pip install git+https://github.com/byuirpytooling/canvasconnector.git
Using pip
pip install git+https://github.com/byuirpytooling/canvasconnector.git
For development (contributing)
git clone https://github.com/YOUR-USERNAME/canvasconnector.git
cd canvasconnector
uv venv
uv sync
Setup
1. Get Your Canvas API Token
- Log into Canvas
- Go to Account → Settings
- Scroll to "Approved Integrations"
- Click "+ New Access Token"
- Copy the token (you won't see it again!)
2. Create a .env file
CANVAS_API_TOKEN=your_canvas_api_token_here
CANVAS_URL=https://byui.instructure.com
TIMEZONE=America/Denver
Important: Add .env to your .gitignore to keep your token private!
Quick Start
from canvasconnector import CanvasClient, get_courses_polars
from dotenv import load_dotenv
import os
load_dotenv()
client = CanvasClient(
api_key=os.getenv("CANVAS_API_TOKEN"),
canvas_url=os.getenv("CANVAS_URL"),
timezone=os.getenv("TIMEZONE")
)
courses = get_courses_polars(client, current_only=True)
print(courses)
Documentation
For detailed usage examples, see the Code Examples guide.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canvasconnector-0.0.2.tar.gz.
File metadata
- Download URL: canvasconnector-0.0.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61a5d3af966c37acd77b41124d930a10856d56abe843919af60a3c0a51c4a974
|
|
| MD5 |
abb6b8de592575a215352d5461407b00
|
|
| BLAKE2b-256 |
f38ae9b5a4b5cf6d492d1d5f2af8542eacfe7e9c440d4390377f682c872d6da6
|
Provenance
The following attestation bundles were made for canvasconnector-0.0.2.tar.gz:
Publisher:
publishpypi.yml on byuirpytooling/canvasconnector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canvasconnector-0.0.2.tar.gz -
Subject digest:
61a5d3af966c37acd77b41124d930a10856d56abe843919af60a3c0a51c4a974 - Sigstore transparency entry: 1165112107
- Sigstore integration time:
-
Permalink:
byuirpytooling/canvasconnector@ccd4e2e410128862f967f8b73c4c6dae213fd7c7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/byuirpytooling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishpypi.yml@ccd4e2e410128862f967f8b73c4c6dae213fd7c7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canvasconnector-0.0.2-py3-none-any.whl.
File metadata
- Download URL: canvasconnector-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21f1cec6fb46180dfc632c3ef59d01ba54e866736136ab4809eac0e403f636e2
|
|
| MD5 |
c4b0af67892553a82f71cd1bc1a55932
|
|
| BLAKE2b-256 |
c5e82379b4168c474c84f31495401ec10a3ff28f5f5617651fbbc8065a0f8f0b
|
Provenance
The following attestation bundles were made for canvasconnector-0.0.2-py3-none-any.whl:
Publisher:
publishpypi.yml on byuirpytooling/canvasconnector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canvasconnector-0.0.2-py3-none-any.whl -
Subject digest:
21f1cec6fb46180dfc632c3ef59d01ba54e866736136ab4809eac0e403f636e2 - Sigstore transparency entry: 1165112191
- Sigstore integration time:
-
Permalink:
byuirpytooling/canvasconnector@ccd4e2e410128862f967f8b73c4c6dae213fd7c7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/byuirpytooling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishpypi.yml@ccd4e2e410128862f967f8b73c4c6dae213fd7c7 -
Trigger Event:
workflow_dispatch
-
Statement type: