Skip to main content

A Python package for connecting to Canvas LMS API

Project description

Canvas Connector

Canvas Connector

A Python package for easily connecting to the Canvas LMS API.

Documentation Site

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

  1. Log into Canvas
  2. Go to Account → Settings
  3. Scroll to "Approved Integrations"
  4. Click "+ New Access Token"
  5. 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


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.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvasconnector-0.0.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

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

Hashes for canvasconnector-0.0.2.tar.gz
Algorithm Hash digest
SHA256 61a5d3af966c37acd77b41124d930a10856d56abe843919af60a3c0a51c4a974
MD5 abb6b8de592575a215352d5461407b00
BLAKE2b-256 f38ae9b5a4b5cf6d492d1d5f2af8542eacfe7e9c440d4390377f682c872d6da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for canvasconnector-0.0.2.tar.gz:

Publisher: publishpypi.yml on byuirpytooling/canvasconnector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file canvasconnector-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for canvasconnector-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21f1cec6fb46180dfc632c3ef59d01ba54e866736136ab4809eac0e403f636e2
MD5 c4b0af67892553a82f71cd1bc1a55932
BLAKE2b-256 c5e82379b4168c474c84f31495401ec10a3ff28f5f5617651fbbc8065a0f8f0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for canvasconnector-0.0.2-py3-none-any.whl:

Publisher: publishpypi.yml on byuirpytooling/canvasconnector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page