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
canvasconnector-0.0.1.tar.gz
(11.2 kB
view details)
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.1.tar.gz.
File metadata
- Download URL: canvasconnector-0.0.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa15c30b8b6bb3991f9f332bcf90915054a0021596c3bf94bd17a6c7f81688ff
|
|
| MD5 |
48cf36b8276717c3570f60d5617f80fe
|
|
| BLAKE2b-256 |
f31a6c541d6f8400c03333010a7a267203c4cf027275eaf987bb86a4868872cf
|
File details
Details for the file canvasconnector-0.0.1-py3-none-any.whl.
File metadata
- Download URL: canvasconnector-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d27eba3f73b45c09ae584809fdf469cb537de9262ab99eb7b0c0ca5903e27ae
|
|
| MD5 |
dc170552a56e66133be1a7501430b2af
|
|
| BLAKE2b-256 |
bd41cf500904087490950795775b944925034ef539ce1e60145668e65c1b329e
|