Skip to main content

Python package for querying Morgan State University course data.

Project description

Morgan Course Data API

A Python package for interacting with Morgan State University's course data. This package enables developers to query courses, retrieve instructor information, and perform various operations on course data efficiently.

Note: Data is updated at the beginning of each semester.


Features

  • Get All Courses: Find all courses and their course sections.
  • Get Courses by Subject Abbrevation: Retrieve all courses under a specified subject.
  • Get Course Sections by Instructor: Retrieve all course sections taught by a specific instructor.
  • Get All Instructors: List all instructors and the courses they teach.

Installation

To install this package, simply install the package from PyPi

pip install morgan_course_data

Usage

Initialize the Data Handler

Start by creating an instance of the MorganCourseData class

(Specify either FALL_2024 or SPRING_2025 as the term)

from morgan_course_data.api import MorganCourseData

morgan_data = MorganCourseData(term="FALL_2024")

Get all Courses

Retrieve all courses from the specified term

fall_courses = morgan_data.get_all_courses()

for course in fall_courses:
    print(course)

Get Courses by Subject Abbrevation

Retrieve all courses under a specified subject

cosc_courses = morgan_data.get_courses_by_subject("COSC")

for course in cosc_courses:
    print(course)

Get Course Sections by Instructor

Retrieve all course sections taught by a instructor

The instructor argument should be formatted as: 'lastName, firstName'

naja_mack_course_sections = morgan_data.get_course_sections_by_instructor("Mack, Naja")

for section in naja_mack_course_sections:
    print(section)

Get All Instructors

Retrieve a list of all instructors and the courses they teach:

instructors = morgan_data.get_all_instructors()

for instructor in instructors:
    print(instructor)

Data Models

Course Represents a course with its metadata and sections.

class Course:
    signature: str
    subject: str
    name: str
    number: str
    full_name: str
    sections: List[CourseSection]

CourseSection Represents an individual section of a course.

class CourseSection:
    title: str
    section: str
    type: str
    instructional_method: str
    instructor: str
    building: str
    campus: str
    room: str
    enrollment_actual: str
    enrollment_max: str
    enrollment_available: str
    start_time: str
    end_time: str
    days: List[str]
    start_date: str
    end_date: str

Instructor Represents an instructor and the courses they teach.

class Instructor:
    name: str
    course_titles: list[str]

Inquires

For any recommendations, questions, etc email me at cltandjong@gmail.com

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

morgan_course_data-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morgan_course_data-0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file morgan_course_data-0.1.tar.gz.

File metadata

  • Download URL: morgan_course_data-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.12

File hashes

Hashes for morgan_course_data-0.1.tar.gz
Algorithm Hash digest
SHA256 e788a09bb956558e675ad0803be3bdb4edd57984b4e3e28b1fe4f4c323ca8022
MD5 ca3324e6d14668fcb0de22c1c2092bd3
BLAKE2b-256 fe3681bd82540a3be4e2da4499d81080ffda160573eab8bff35777e1b2182493

See more details on using hashes here.

File details

Details for the file morgan_course_data-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for morgan_course_data-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09850dedae704fe50c634fbe4fded021295aa6aff74f39cf6f6c9104e1ba78f7
MD5 2a11c38d1c45652e15eac152e6a2214c
BLAKE2b-256 c635894769bbb7278da530dae0169b17fcbda54c4f90366b9b52a482a638ad33

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