Courses API is a tool to scrape course information from the University of Adelaide website and provide course data to other CS Club Open Source Team projects via an API endpoint.
To get started, please follow these steps:
-
Install
uvif not already installed:Linux, macOS, Windows (WSL)
curl -LsSf https://astral.sh/uv/install.sh | shWindows (Powershell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Install dependencies:
uv sync pre-commit install
-
Make a
.envfile and copy.env.exampleinto it
-
Start the FastAPI server:
uv run fastapi dev src/server.py
-
Open http://localhost:8000/docs with your browser to see the API documentation and to test the available endpoints.
Start the scraper (Note: Scraping all the courses may take over an hour):
uv run python3 src/scraper.pyThe output level of the logger can be configured in the .env. Set DEFAULT_LOGGING_LEVEL to your desires level such as DEBUG and ERROR. DEBUG outputs all logs into a file, including errors. ERROR only logs errors into a log file.
We welcome contributions to enhance Courses API! If you find any issues, have suggestions, or want to request a feature, please follow our Contributing Guidelines.
This project is licensed under the MIT License. See LICENSE for details.