This is a little python library that makes it easier for McGill
students to programmatically access information from Minerva. As of this
writing, it only supports retrieving unofficial transcript information.
You need a McGill ID and PIN (or McGill email and password) to access
Minerva. You can pass these in to the `login()` function, or set the
`MINERVA_USER` and `MINERVA_PASS` environment variables (you still need to call
`login()` if you do this).
>>> import minerva
>>> isbadawi = minerva.login()
This retrieves your unofficial transcript.
>>> transcript = isbadawi.transcript()
>>> import pprint
[<Course: COMP 531 - Advanced Theory of Computation>,
<Course: COMP 547 - Cryptography & Data Security>,
... snip ...]
This transcript object can be queried to get courses satisfying certain
properties. You can search by semester, course title, section, grade,
average, or number of credits. For instance, this gets all Fall 2009 MATH
courses in which I got an A:
>>> courses = transcript.get_courses(semester='Fall 2009',
[<Course: MATH 235 - Algebra 1>,
<Course: MATH 318 - Mathematical Logic>]
Some useful bits:
# What grade did I get in MATH317?
# Has the grade for COMP762 been posted yet?
>>> transcript.get_courses(subject='COMP762').grade is not None
To install `minerva`, simply:
$ pip install mcgill-minerva
Note that one of the requirements is `lxml`, whose installation is sometimes
troublesome because it depends on `libxml` and `libxslt`. For more detailed
instructions regarding this, refer to [the `lxml` website](http://lxml.de/installation.html).
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.