Skip to content

Setup Guide

Klein Panic edited this page Apr 3, 2026 · 1 revision

Setup Guide

Prerequisites

  • Python 3.11+ (3.11, 3.12, or 3.13)
  • pipx (recommended) or pip
  • Git with GPG signing configured
  • Canvas API token (see below)

Installation

Using pipx (recommended)

pipx install .

Using pip

pip install .

From source

git clone https://github.com/kleinpanic/CS3704-Canvas-Project.git
cd CS3704-Canvas-Project
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Configuration

Canvas API Token

  1. Log into Canvas (Virginia Tech: https://canvas.vt.edu)
  2. Go to Account → Settings → Approved Integrations
  3. Generate a new access token
  4. Copy the token (you won't see it again)

Environment Variables

export CANVAS_TOKEN="your_canvas_token_here"
export CANVAS_BASE_URL="https://canvas.vt.edu"  # optional, defaults to VT

Or create a .env file in the project root:

CANVAS_TOKEN=your_canvas_token_here
CANVAS_BASE_URL=https://canvas.vt.edu

Keyring Storage (optional)

For secure token storage, the app can use your system keyring:

pip install keyring
python -c "import keyring; keyring.set_password('canvas-tui', 'api_token', 'your_token')"

Running

canvas-tui

Or if installed from source:

python -m canvas_tui

Development Setup

Clone and Setup

git clone https://github.com/kleinpanic/CS3704-Canvas-Project.git
cd CS3704-Canvas-Project
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Run Tests

ruff check src tests  # linting
pytest -q              # unit tests
python -m build        # build package

Local Documentation

pip install mkdocs-material
mkdocs serve
# Visit http://localhost:8000

Troubleshooting

"Module not found: textual"

pip install textual

"Permission denied: .cache/..."

sudo chown -R $USER:$USER ~/.cache

Canvas API errors

  • Verify your token is correct
  • Check the base URL matches your institution
  • Ensure the token hasn't expired

Next Steps

Clone this wiki locally