📚 Student Management System using FastAPI

This is a simple Student Management System built using FastAPI. It supports basic CRUD operations such as adding, updating, viewing, and deleting student information. This system can be useful in educational institutes for managing student records.


website Live site: : @Student-Management-System


🚀 Features

  • Add a new student 📥
  • View all students 👀
  • View a specific student by ID 🔍
  • Update student information (partial updates) ✏️
  • Delete a student 🗑️

🛠️ Requirements

  • Python 3.7+
  • FastAPI
  • Uvicorn

📦 Setup and Installation

Follow these steps to run the project locally.

1. Clone the repository

git clone https://github.com/naimur-naiyimu/Student-Management-System-using-FastAPI.git
cd student-management-system

2. Create and activate a virtual environment

For Windows:

python -m venv venv
venv\Scripts\activate

For Linux/macOS:

python3 -m venv venv
source venv/bin/activate

3. Install the dependencies

pip install -r requirements.txt

4. Run the FastAPI application

uvicorn main:app --reload

Now open your browser and go to:

📋 API Endpoints

Method Endpoint Description
POST /students/ Add a new student
GET /students/ Retrieve all students
GET /students/{student_id} Retrieve a specific student by ID
PATCH /students/{student_id} Partially update student information
DELETE /students/{student_id} Delete a student

👨‍💻 Example Usage

1. Add a Student:

Request:

POST /students/

Request Body:

{
    "name": "John Doe",
    "age": 20,
    "gender": "Male",
    "Class": "10th Grade",
    "address": "123 Elm Street",
    "contact_info": "123-456-7890"
}

2. Get All Students:

Request:

GET /students/

3. Update a Student:

Request:

PATCH /students/1

Request Body (partial update):

{
    "address": "456 Oak Avenue"
}

📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.

🛡️ Contributions

Feel free to fork this repository and contribute by submitting a pull request. For major changes, please open an issue first to discuss what you would like to change.

📝 Contact

For any inquiries or issues, feel free to reach out at: