A simple, beginner-friendly command-line Student Management System built with Python 3, Object-Oriented Programming, and JSON file storage.
- ➕ Add student
- 👀 View students
- 🔎 Search student
- ✏️ Edit student
- 🗑️ Delete student
- 📊 Calculate student average marks
- 🏆 Find top-performing student
- 📚 Store marks for multiple subjects
- 💾 Persistent JSON storage
- 🛡️ Input validation
- 🖥️ Menu-driven interface
- Python 3
- Object-Oriented Programming
- JSON
- File Handling
- Classes and Objects
- Lists
- Dictionaries
- Loops
- Functions
- Exception Handling
studentmanager/
├── main.py # Entry point - menu-driven CLI
├── student.py # Student class (one student's data)
├── student_manager.py # StudentManager class (CRUD + JSON storage)
├── students.json # Saved student data (auto-created/updated)
└── README.md
Make sure you have Python 3 installed, then from inside the studentmanager
folder run:
python3 main.pyYou'll see a menu like this:
==========================================
STUDENT MANAGER
==========================================
1. Add Student
2. View All Students
3. Search Student
4. Edit Student
5. Delete Student
6. Calculate Student Average
7. Find Top-Performing Student
8. Exit
==========================================
Just type the number of the action you want and follow the prompts.
All changes are automatically saved to students.json, so your data
is still there the next time you run the program.
student.pydefines theStudentclass. Each student has a roll number, a name, and a dictionary of subject marks (e.g.{"Math": 90}). It also knows how to calculate its own average and convert itself to/from a plain dictionary for JSON storage.student_manager.pydefines theStudentManagerclass, which holds a list ofStudentobjects and handles all the logic: loading from and saving tostudents.json, adding, searching, editing, deleting, and computing statistics.main.pyis the program you actually run. It shows the menu, takes input from the user, validates it, and calls the rightStudentManagermethod.
- Add sorting (e.g., by name or average marks)
- Export student data to a CSV file
- Add a "class average" feature across all students
- Add unit tests with
unittestorpytest
Free to use for learning and practice.