A Flask-based REST API for managing student records and course subjects.
1.Branches
2.Branches
3.Setup
4.Endpoints
5.Running the App
6.Git Workflow
β
Students Endpoint β Retrieve student data (name, program).
β
Subjects Endpoint β Fetch course subjects grouped by year and status (Core/Elective).
β
MySQL Integration β Uses pymysql for database operations.
β
Branch-Based Development β Endpoints developed in separate Git branches (students-endpoint, subjects-endpoint).
| Branch | Description | File |
|---|---|---|
main |
Merged final version | app.py |
students-endpoint |
Only /students endpoint |
students_app.py |
subjects-endpoint |
Only /subjects endpoint |
subjects_app.py |
- Endpoint:
GET /students - Response: JSON list of students with name and program.
- Endpoint:
GET /subjects - Response: JSON list of subjects grouped by year and status.
Prerequisites
Flask (pip install flask)
PyMySQL (pip install pymysql)
MySQL (XAMPP recommended)
Create a database students_db in MySQL.
Import the provided students_db.sql file to set up tables and sample data.
π Description: Fetches all student records.
πΉ Method: GET
π Response:
π Description: Fetches subjects grouped by year and status.
πΉ Method: GET
π Response: