Skip to content

tisuela/CourseCake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

252 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python application Coverage Status

From developing a course planner to simply finding in-person classes, there's an easier, responsible, and more powerful way to get your university's course information.

We aim to create an API to access course data, where each college's course is unified under one schema. By making course data easier to responsibly access and more "edible" for programs, we hope CourseCake gives a smooth approach to build useful tools for students.

There are three main features to CourseCake to accomplish this goal:

UC Irvine -- Zot your courses easier and responsibly

Currently the only supported school in CourseCake, the motivation of CourseCake is to make it easier to develop tools like AntPlanner and Antscoper, and promote a responsible use of WebSoc by not abusing its resources.

All of the latest scraped data is stored in a local database, which avoids congesting WebSoc and allows successful requests even when WebSoc is down.

Endpoints that do directly query WebSoc are ratelimited and follow usage rates similar to other UCI Irvine course helper wesbites.

What is a Course?

Here is an example response using one of our courses endpoints. Full documentation available here. The response is a dictionary containing a list of course objects. The schema of a course is shown in this example.

{
  "courses": [
    {
      "building": "string",
      "code": "string",
      "department": "string",
      "departmentTitle": "string",
      "enrolled": 0,
      "instructor": "string",
      "location": "string",
      "max": 0,
      "name": "string",
      "requested": 0,
      "restrictions": "string",
      "room": "string",
      "school": "string",
      "status": "string",
      "time": "string",
      "title": "string",
      "type": "string",
      "units": 0,
      "updated": "datetime: string,null",
      "waitlisted": 0
    }
  ]
}

Documentation

RESTful API

Database docs coming soon

Scrapers

Installation

Clone repository

git clone https://github.com/nananananate/CourseScraper

Create Python virtual environment

There are a good amount of depencies for this project -- it will be good practice to use a virtual environment, albeit not necessary.

On macOS and Linux: python3 -m virtualenv env

On Windows: python -m venv env The second argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env.

Activate virtual encironment

On macOS and Linux: source env/bin/activate

On Windows Command Line: .\env\Scripts\activate.bat

One Windows Powershell .\env\Scripts\activate.ps1

Navigate to the repository folder and install packages

python -m pip install -r requirements.txt

Deploy Fast API Application locally

We are no longer using Flask!

Run Fast API using uvicorn

Install uvicorn if you haven't already (if you followed the previous step correctly, you should be gucci.

python -m pip install uvicorn

Run uvicorn.

uvicorn coursecake.fastapi_app.main:app --reload

You’ll see output similar to this:

←[32mINFO←[0m:     Uvicorn running on ←[1mhttp://127.0.0.1:8000←[0m (Press CTRL+C to quit)
←[32mINFO←[0m:     Started reloader process [←[36m←[1m38240←[0m] using ←[36m←[1mstatreload←[0m
←[32mINFO←[0m:     Started server process [←[36m13020←[0m]
←[32mINFO←[0m:     Waiting for application startup.
←[32mINFO←[0m:     Application startup complete.

donezo

Future features

  • More comprehensive university information on departments, course prerequisites, restricts, etc.
  • Prerequisite mapping to create a network of classes (along with a node graph GUI)
  • HTTPS only
  • IF ANYONE WANTS TO HELP LEMME KNOW PLSSSS ty

About

By serving course 📚 data that is more "edible" 🍰 for developers, we hope CourseCake offers a smooth approach to build useful tools for students.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages