Table of Contents
This Student Management API is one of the projects I've been able to craft with my coding skills. It was built as an exam project for Backend Engineering track using Python Flask framework at AltSchool Africa.
This is a school management system API built with Flask and Flask_RestX built by according to this requirements. It is a simple API that allows an Admin to perform CRUD operations on students and courses. It also allows you to register students to courses and add grade for students.
Creating this API helped me learn and practice:
- API Development with Python
- App Deployment with PythonAnywhere
- Testing with pytest and Insomnia
- Documentation
- Debugging
- Routing
- Database Management
- Internet Security
- User Authentication
- User Authorization
To get a local copy up and running, follow the steps below.
Python3: Get Python
- Clone this repo
git clone https://github.com/ErikMidas/Student_Management_API.git
- Create a virtual environment
python -m venv env
- Activate the virtual environment
source env/Scripts/activate - Install project packages
pip install -r requirements.txt
- Run Flask
python runserver.py
- Open the link generated in the terminal on a browser or visit http://localhost:5000
To interact with the live version of this API, follow these steps:
-
Open the PythonAnywhere web app on your browser: https://erikmidas.pythonanywhere.com
-
Create an admin or student account:
- Click "admin" to reveal a dropdown menu of administration routes, then register an admin account via the "/admin/register" route
- Click "students" to reveal a dropdown menu of student routes, then register a student account via the "/students/register" route
-
Sign in via the "/auth/login" route to generate a JWT token. Copy this access token without the quotation marks
-
Scroll up to click "Authorize" at top right. Enter the JWT token in the given format, for example:
Bearer this1is2a3rather4long5hex6string
-
Click "Authorize" and then "Close"
-
Now authorized, you can create, view, update and delete students, courses, grades and admins via the many routes in "students", "courses" and "admin". You can also get:
- All students taking a course
- All courses taken by a student
- A student's grades in percentage (eg: 84.8%) and letters (eg: A)
- A student's CGPA, calculated based on all grades from all courses they are taking
-
When you're done, click "Authorize" at top right again to then "Logout"
Distributed under the MIT License. See LICENSE for more information.
Ayodeji Okulaja - @Koats14 - ayotoku@gmail.com
Project Link: PythonAnywhere
This project was made possible by:
