All Projects → biw → myCUinfo-API

biw / myCUinfo-API

Licence: MIT License
An API for the myCUinfo system at CU Boulder

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to myCUinfo-API

FAU-Einrichtungen
WordPress-Theme für zentrale Einrichtungen der Friedrich-Alexander-Universität Erlangen-Nürnberg
Stars: ✭ 15 (-28.57%)
Mutual labels:  university
xiyoucircle
🐧 西邮开源社 - 开源的西邮技术社群...!
Stars: ✭ 20 (-4.76%)
Mutual labels:  university
Notre-Dame-v3
The 3rd generation of ÉTSMobile, the main gateway between the École de technologie supérieure and its students on mobile devices
Stars: ✭ 13 (-38.1%)
Mutual labels:  university
XSYBBS
校园贴吧+校园BBS 基于Bmob+环信easeUI 主要难点在于,评论,回复,点赞 的数据库设计以及逻辑处理
Stars: ✭ 30 (+42.86%)
Mutual labels:  university
uf api
A list of documentation and example code to access the University of Florida's public (undocumented) API
Stars: ✭ 46 (+119.05%)
Mutual labels:  university
TUMGAD
Exercise generator and helpful materials for the Introduction to Algorithms and Data Structures 📚
Stars: ✭ 27 (+28.57%)
Mutual labels:  university
zotprime
Full packaged on-premise Zotero platform
Stars: ✭ 201 (+857.14%)
Mutual labels:  university
suchedule
A friendly schedule building interface for Sabancı University students.
Stars: ✭ 38 (+80.95%)
Mutual labels:  university
ML-University
Machine Learning Open Source University
Stars: ✭ 423 (+1914.29%)
Mutual labels:  university
Fake-News-Detection-Project
Fake News Detection Final Year College Project with Project Report, PPT, Code, Research Paper and Documents.
Stars: ✭ 16 (-23.81%)
Mutual labels:  university
GeckoDownloadManager
🐸 Gecko Download Manager is a Chrome Extension that improves downloading lectures 💾 from the Echo360 System.
Stars: ✭ 44 (+109.52%)
Mutual labels:  university
HackyHourHandbook
A handbook for those who want to start coordinating Hacky Hour events in their University/Institute
Stars: ✭ 43 (+104.76%)
Mutual labels:  university
Timetable
A super simple timetable app
Stars: ✭ 52 (+147.62%)
Mutual labels:  university
TeXProposal
如何有理有据地向自己的学校或就职机构提出使用LaTeX的提议?A Proposal Prototype for LaTeX Promotion in Chinese Universities Version 1.4
Stars: ✭ 27 (+28.57%)
Mutual labels:  university
getting-started
List of ideas for getting started with TimVideos projects
Stars: ✭ 50 (+138.1%)
Mutual labels:  university
modern-software-delivery-maturity-index
A resource to help teams evaluate and improve their software delivery.
Stars: ✭ 15 (-28.57%)
Mutual labels:  colorado
neuland.app
A free & open source, web-based replacement for the official app of the Technische Hochschule Ingolstadt built with React and Next.js.
Stars: ✭ 19 (-9.52%)
Mutual labels:  university
Winston
an AngularJS schedule builder for UAlberta students
Stars: ✭ 21 (+0%)
Mutual labels:  university
intern.plus
Upgrade your internship hunting experience.
Stars: ✭ 52 (+147.62%)
Mutual labels:  university
food-rescue-robot
A Rails App for Managing "Just in Time" Food Rescue, Developed by/for Boulder Food Rescue in Boulder, CO, USA
Stars: ✭ 47 (+123.81%)
Mutual labels:  boulder

myCUinfo-API

A python wrapper for the myCUinfo System at the University of Colorado Boulder.

NOTE: This project is not affiliated with the development of the myCUinfo system. This project has no endorsement by the University of Colorado.

Getting Started

First, install the Python Requests Library. To install Requests use the following command:

$ pip install requests

Then run the code with Python 2.7 or 3.x

Functions and Output

The API currently has a few functions that scrape the info off the myCUinfo site. They all use methods on an initialized CUSessions logged in user. This way the convoluted login process is only handled once.

CUSession(username, password) [initializer]

This is the initializer for the myCUinfo API class. It takes in a username & password of a myCUinfo user and returns a class object that is a logged in user.

import mycuinfo

user = "example001"
password = "secret001"
loginUser = mycuinfo.CUSession(user, password)

CUSession.info()

This method returns the basic user information. We will format the output with json.

userInfo = loginUser.info()
print json.dumps(userInfo, sort_keys=True, indent=4, separators=(',', ':'))
Example Output:
{
    "affiliation": "STUDENT",
    "classStanding": "UGRD",
    "college": "College Arts and Sciences",
    "eid": None, # Will include the Employee ID if the user has one
    "firstName": "Chip",
    "lastName": "Buffalo",
    "major": "Dance",
    "minor": None, # Will return a Minor if the user has one
    "sid": 000000001 # Student ID
}

CUSession.classes(term)

The method returns the class information of the user for the optional given term. We will format the output with json.

userClasses = loginUser.classes("Spring 2015") # we can also call loginUser.classes() and it will default to the current semester
print json.dumps(userClasses, sort_keys=True, indent=4, separators=(',', ':'))
Example Output:
[
    {
        "classCode": "1010", # Primary Class Code. Ex: SPRT 1010
        "section": "001", # Secondary Class Code. Ex: Section 001
        "credits": 4,
        "days": "MWF",
        "department": "SPRT",
        "endTime": "10:50 AM",
        "grade": "A", # will not show for current semester
        "instructor": "Ralphie Buffalo",
        "startTime": "10:00 AM",
        "status": "Enrolled", # Will show Waitlisted or Enrolled
        "name": "Intro to Spirit (Lecture)"
    },
    ..., # Will list all classes but example output has been truncated to two classes
    {
        "classCode": "1010", # Primary Class Code. Ex: SPRT 1010
        "section": "010", # Secondary Class Code. Ex: Section 010
        "credits": 0, # shows 0 credits because all credits go to Lecture class
        "days": "W",
        "department": "SPRT",
        "endTime": "03:50 PM",
        "grade": "A-", # will not show for current semester
        "instructor": "Ralphie Buffalo",
        "startTime": "03:00 PM",
        "status": "Enrolled", # Will show Waitlisted or Enrolled
        "name": "Intro to Spirit (Recitation)"
    },
]

CUSession.books(department, courseNumber, section, term)

The method returns the book information for a given class section for an optional given term. We will format the output with json.

department = "SPRT"
courseNumber = "1010"
section = "010"
userBooks = loginUser.books(department, courseNumber, section, term="Spring2015") # term is optional, will default to current semester.
print json.dumps(userBooks, sort_keys=True, indent=4, separators=(',', ':'))
Example Output:
[
    {
        "author": "BRYANT",
        "course": "SPRT1010-010",
        "isbn": "9780136102041",
        "new": 157.0, # price in USD
        "newRent": 102.25,
        "required": True,
        "title": "SCHOOL SPIRIT: A MASCOT'S PERSPECTIVE",
        "used": 116.5,
        "usedRent": 70.75
    }
]

CUSession.GPA()

The method returns the current GPA of the logged in student

gpa = loginUser.GPA()
print "The current GPA is " + gpa
Example Output:
The current GPA is 3.991

To Do

  • Python 2.7+ & 3.x support
  • Create read-only of class listings
  • Make API do writes

Contribution

I welcome all kinds of contribution.

If you have any problem using the myCUinfo-API, please file an issue in Issues.

If you'd like to contribute on the source, please upload a pull request in Pull Requests.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].