Canvas Grouping Python Script
Project description
CanvasGroupy
Automate project group management across Canvas LMS and GitHub.
CanvasGroupy helps instructors manage project groups across Canvas LMS and GitHub. Create student groups on Canvas, set up GitHub repositories with the right permissions, and automate grading workflows — all from Python.
Features
- Canvas Group Management — Create group categories, assign students to groups, and send notifications via Canvas API
- GitHub Repository Setup — Create repos from templates, add collaborators, manage team permissions
- Group Assignment — Load group rosters from CSV or DataFrame and sync to Canvas + GitHub
- Grading Workflow — Parse scores from GitHub issue templates and post grades back to Canvas
- Batch Feedback — Release feedback to all groups via GitHub Issues from markdown templates
Installation
pip install CanvasGroupy
Quick Start
1. Set up credentials
Create a credentials.json file:
{
"Canvas Token": "your-canvas-api-token",
"GitHub Token": "your-github-personal-access-token"
}
- Canvas Token: Generate at
Canvas > Account > Settings > New Access Token - GitHub Token: Generate at
GitHub > Settings > Developer settings > Personal access tokens
2. Create groups on Canvas
from CanvasGroupy import CanvasGroup
cg = CanvasGroup(credentials_fp="credentials.json",
API_URL="https://canvas.ucsd.edu",
course_id=12345)
# Create a group category and assign students
cg.create_group_category({"name": "Project Groups"})
cg.assign_canvas_group(
group_name="Team Alpha",
group_members=["student1", "student2", "student3"],
in_group_category="Project Groups"
)
3. Load groups from CSV and create GitHub repos
from CanvasGroupy import AssignGroup, GitHubGroup, CanvasGroup
ghg = GitHubGroup(credentials_fp="credentials.json", org="MyOrg")
cg = CanvasGroup(credentials_fp="credentials.json",
API_URL="https://canvas.ucsd.edu",
course_id=12345)
ag = AssignGroup(ghg=ghg, cg=cg)
# Load from CSV (columns: group_name, student_id)
ag.load_groups("groups.csv")
# Create groups on Canvas
ag.create_canvas_group(in_group_category="Project Groups")
4. Grade projects via GitHub Issues
from CanvasGroupy import Grading, GitHubGroup, CanvasGroup
grading = Grading(ghg=ghg, cg=cg)
repo = ghg.get_repo("MyOrg/team-alpha")
grading.grade_project(
repo=repo,
component="checkpoint",
assignment_id=67890,
canvas_group_category="Project Groups",
post=True # Set False for dry run
)
Documentation
Full documentation: FleischerResearchLab.github.io/CanvasGroupy
License
Apache-2.0 — see LICENSE for details.
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 canvasgroupy-0.1.0.tar.gz.
File metadata
- Download URL: canvasgroupy-0.1.0.tar.gz
- Upload date:
- Size: 115.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ab26ab25c69dca19eadddf9ee2be92d6ba79d00a66ecb92b43ba7455777ffb2
|
|
| MD5 |
129a62ed82de5464524e30d90e8ecb3e
|
|
| BLAKE2b-256 |
e362b920948b9e3d19d2cdcb7c04d72afef9022f9fdb65948ebf0a111acd28b2
|
File details
Details for the file canvasgroupy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: canvasgroupy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64baa1cd84e5db98a4c2a17fa4118a0d7c888d737b6793d564aa851965b59e8a
|
|
| MD5 |
f214ff8fd48a268135a75543dc1748a4
|
|
| BLAKE2b-256 |
181146aa0546c95b22713e7f195d1e8d28e24c1869f03b416c622f50bd1542e0
|