This python package allows one to easily interact with the University of Waterloo’s QUEST system to easily add a course. It does so by continuously querying the QUEST servers to add you into the given course until it succeeds.
Both Python 2 and Python 3 are supported, although Python 3 support requires 2to3 but that will be handled automatically by setup.py on installation.
Install
There are currently two resources from which you can install UWaterloo AddCourse: the first is directly from the repository and the second is from PyPi.
WaterlooGo Recmmends:
pip install uwaterloo-addcourse
The Repository
You can install this package from source using:
git clone https://github.com/kcolford/uwaterloo-addcourse.git cd uwaterloo-addcourse python setup.py install
Note that when you install in this way, you will be getting the development version, not the official stable release (although it should still work as documented).
Usage
There are two ways to use this API: the command line and the python interpreter. Note that when using the interpreter, you have more control over the queries you would have when using the command line. Although the command line is far more user friendly.
Command Line
To add a class from the command line, simply invoke the helper script like so:
user@computer:~/$ addcourse Desired Course: cs246 QUEST ID: jsmith Password: ...
Optional command line arguments to addcourse are as follows
-h, --help show this help message and exit --version show program’s version number and exit -c COURSE, --course COURSE the course to try getting in to -u USERID, --userid USERID the userid to login as
Python Interpreter
Simply write a script like so:
#! /usr/bin/env python from addcourse import * addcourse('jsmith', 'password123', numbers('cs246'))
Note that the call to numbers fetches a list of class numbers that correspond to the given course code (in this case 'cs246'). You can then use a splicing or other list manipulations to delete classes you don’t want or add alternative classes that you do want. See pydoc addcourse for more information.