Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/switchswap/usc-schedule
USC Schedule of Classes API wrapper
https://github.com/switchswap/usc-schedule
class-schedule python python-library python3 usc usc-schedule
Last synced: 20 days ago
JSON representation
USC Schedule of Classes API wrapper
- Host: GitHub
- URL: https://github.com/switchswap/usc-schedule
- Owner: switchswap
- License: apache-2.0
- Created: 2019-12-25T04:17:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T08:00:25.000Z (over 4 years ago)
- Last Synced: 2024-07-06T06:47:39.792Z (6 months ago)
- Topics: class-schedule, python, python-library, python3, usc, usc-schedule
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# USC-Schedule
USC Schedule of Classes API wrapper![GitHub Workflow Status](https://img.shields.io/github/workflow/status/switchswap/usc-schedule/Python%20package?style=for-the-badge)
![PyPI](https://img.shields.io/pypi/v/usc-schedule?style=for-the-badge)## Introduction
This library provides a python interface for the USC Schedule of Classes api. It works for Python versions from 3.6 onwards.## Installation
`$ pip install usc-schedule`## Usage
### Setup
```python
from uscschedule import Schedule
schedule = Schedule()
```### Get department
```python
csci_department = schedule.get_department(department_id="CSCI", semester_id=20201)
# Alternatively: schedule.get_department("CSCI", 20201)
print(csci_department.department)
print(csci_department.abbreviation)
print(csci_department.department_url)# Prints:
# Computer Science
# CSCI
# http://www.cs.usc.edu/```
### Get course details
```python
csci_course = schedule.get_course(course_id="CSCI-201", semester_id=20201)
# Alternatively: schedule.get_course("CSCI-201", 20201)
print(csci_course.title)
print(csci_course.units)
print(csci_course.description)# Prints:
# Principles of Software Development
# 4.0
# Object-oriented paradigm for programming-in-the-large in Java; writing sophisticated concurrent
# applications with animation and graphic user interfaces; using professional tools on team project.
# Prerequisite: CSCI 104L.
```