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: