Skip to main content

Client library for McGill Minerva.

Project description

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
>>> pprint.pprint(transcript.get_courses())
[<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',
                                     subject='MATH', grade='A')
>>> pprint.pprint(courses)
[<Course: MATH 235 - Algebra 1>,
 <Course: MATH 318 - Mathematical Logic>]

Some useful bits:

# What grade did I get in MATH317? >>> transcript.get_courses(subject=’MATH317’)[0].grade u’A’

# Has the grade for COMP762 been posted yet? >>> transcript.get_courses(subject=’COMP762’)[0].grade is not None False

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

mcgill-minerva-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file mcgill-minerva-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcgill-minerva-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9acd40508e390d3f8129eee888f97a0086b04904c3dc63427198421c68da9494
MD5 2453bf826a088af20dfc751bcb825dcb
BLAKE2b-256 2c83f551d1fe3426535837502047c25467a53a33e75c291d5e5fa36179bb8393

See more details on using hashes here.

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