Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isbadawi/minerva
python client library for McGill Minerva
https://github.com/isbadawi/minerva
Last synced: 22 days ago
JSON representation
python client library for McGill Minerva
- Host: GitHub
- URL: https://github.com/isbadawi/minerva
- Owner: isbadawi
- License: mit
- Created: 2012-03-15T23:20:44.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-07-06T19:18:39.000Z (over 2 years ago)
- Last Synced: 2024-08-11T10:07:07.491Z (3 months ago)
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
minerva
=======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).```python
>>> import minerva
>>> isbadawi = minerva.login()
```This retrieves your unofficial transcript.
```python
>>> transcript = isbadawi.transcript()
>>> import pprint
>>> pprint.pprint(transcript.get_courses())
[,
,
... 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:```python
>>> courses = transcript.get_courses(semester='Fall 2009',
subject='MATH', grade='A')
>>> pprint.pprint(courses)
[,
]
```Some useful bits:
```python
# What grade did I get in MATH317?
>>> transcript.get_courses(subject='MATH317')[0].grade
u'A'
``````python
# Has the grade for COMP762 been posted yet?
>>> transcript.get_courses(subject='COMP762')[0].grade is not None
False
```Installation
------------To install `minerva`, simply:
```bash
$ 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).