Skip to main content

metuclass

CLI tool to sync ODTUClass course files to your local machine.

Downloads PDFs, slides, homeworks, and any other files from your enrolled courses. Tracks changes so subsequent syncs only download new or updated files.

Install

pip install metuclass

Requires Python 3.11+.

Quick start

# Log in with your METU credentials
metuclass login

# See your courses
metuclass courses

# Download everything
metuclass sync

Files are saved to ~/metuclass/ by default, organized by course and section:

~/metuclass/
  CENG 334 Section 1/
    Week 01 - Introduction/
      slides.pdf
    Week 02 - Processes/
      slides.pdf
      notes.pdf
  CENG 596 Section 1/
    General/
      syllabus.pdf
    ...

Commands

metuclass login

Authenticate with your METU username and password. Stores a session token locally — you only need to do this once (or again if your password changes).

metuclass login

metuclass courses

List all your enrolled courses.

metuclass courses

metuclass ls <course>

Show files available in a course. You can use the course shortname or ID.

metuclass ls "CENG 334 Section 1"
metuclass ls 3100

metuclass sync [course]

Download new and updated files. Omit the course to sync all courses.

# Sync a specific course
metuclass sync "CENG 334 Section 1"

# Sync all courses
metuclass sync

# Preview what would be downloaded
metuclass sync --dry-run

# Overwrite locally modified files
metuclass sync --force

# Download to a specific directory
metuclass sync --sync-dir ~/Documents/courses

metuclass config [key] [value]

View or change configuration.

# Show all config
metuclass config

# Set sync directory
metuclass config sync.directory ~/Documents/courses

Configuration

Config is stored at ~/.config/metuclass/config.toml.

Sync directory

Where files are downloaded to (default: ~/metuclass). Set it with any of these (highest priority first):

  1. --sync-dir flag
  2. METUCLASS_SYNC_DIR environment variable
  3. metuclass config sync.directory <path>

Environment variables

You can set these in a .env file (in your working directory or ~/.config/metuclass/.env):

METUCLASS_USERNAME=e123456
METUCLASS_PASSWORD=your_password
METUCLASS_SYNC_DIR=~/metuclass

When METUCLASS_USERNAME and METUCLASS_PASSWORD are set, metuclass login won't prompt for input — useful for automation.

How sync works

  1. Fetches the file list from ODTUClass for each course
  2. Compares against a local manifest (SQLite database) to find new/updated files
  3. Downloads changes concurrently, writing to temp files and renaming on success
  4. Files with local modifications are skipped as conflicts (use --force to overwrite)

Running metuclass sync a second time is a no-op if nothing changed on ODTUClass.

License

MIT

Release files for metuclass 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metuclass 0.2.0
File Size Uploaded
metuclass-0.2.0.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metuclass 0.2.0
File Interpreter ABI Platform
metuclass-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size:30.0 kB

Release files / metuclass-0.2.0.tar.gz

Download URL metuclass-0.2.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
32dca2425de6d5ef16046dfc2727dd785ecc1a0f3885c43dc1645555c44a36a8
BLAKE2b-256 checksum
How to use checksums
007316f374577b66321c2cdea0159c96caef7da2079347d35a02291d8849412b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / metuclass-0.2.0-py3-none-any.whl

Download URL metuclass-0.2.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e974f018bf398cbb255d00f23ed570b9916fb5ff5cfbc0cd931265a9f38747f
BLAKE2b-256 checksum
How to use checksums
52d14e25fa368112625632e9138cab18d66c586954436e66c11b0fe7dcf2a3cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page