Skip to content

NasibuCodingHub/API-EndPoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-EndPoint

Students and Subjects API

A Flask-based REST API for managing student records and course subjects.

📌 Table of Contents

1.Branches
2.Branches
3.Setup
4.Endpoints
5.Running the App
6.Git Workflow

✨ Branches

✅ 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).

🌿 Branches

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

API Endpoints

Students API (students-endpoint Branch)

  • Endpoint: GET /students
  • Response: JSON list of students with name and program.

Subjects API (subjects-endpoint Branch)

  • Endpoint: GET /subjects
  • Response: JSON list of subjects grouped by year and status.

⚙️ Setup

Prerequisites

Python 3.8+

Flask (pip install flask)

PyMySQL (pip install pymysql)

MySQL (XAMPP recommended)

Database Setup

Create a database students_db in MySQL.

Import the provided students_db.sql file to set up tables and sample data.

🔌 Endpoints

1. /students

📝 Description: Fetches all student records.
🔹 Method: GET
📂 Response:

2. /subjects

📝 Description: Fetches subjects grouped by year and status.
🔹 Method: GET
📂 Response:

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages