Table of Contents
This is a web application built with Flask and SQLAlchemy that allows admins or staff to manage students and their data. The Student Management API is a RESTful API which enables users particularly student to register accounts, register for a course and view thier grades of each course they registered. CRUD operations can be carried out on the student data, with an easy-to-use Swagger UI setup for testing and integration with the front end.
Admin creates the student regisration ID, each student is assigned a registration ID when they register their details. Admin perform majority of operations on this app. To be an admin, you will have to register as an admin
Admin can register either through the route or you clone this repository in your local machine and register in your terminal
This student management API was built with Python's Flask-RESTX by by Barakat Adisa during Backend Engineering 3rd Semester Exam at AltSchool Africa
Creating this API, I was able to learn and practice:
- API Development
- App Deployment with Heroku
- Testing
- Documentation
- Debugging
- Routing
- Database Management
- Internet Security
- User Authentication
- User Authorization
To use this API, follow these steps:
-
Open the Heroku app on your browser: https://student-managemment-system.herokuapp.com
-
Create an admin or student account
-
Click 'admin' to reveal a dropdown menu for admin route, you can register as an admin via the '/admin/create_admin/' route
-
To register as a student, click on 'auth' to reveal the dropdown menu for the authentication and authorization route. You can register as a student via the '/auth/signup/' 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 corner. Enter the JWT token in this given format:
Bearer thejwtaccesstoken
-
Click 'Authorize' and then 'Close'
-
Now authorized, you can create, view and update courses, students, admins as well as delete student and course via the routes in 'students', 'courses' and 'auth'. You can basically perform the CRUD (create, receive, update, delete) operation on the routes and each routes has its description for easy access. You can as well get:
- All students taking a course
- All courses taken by a student
- Grades and score of each course taken by a student
- You can as well check the GPA of student based on their grades on each course
- When you're done, click 'Authorize' at top right again to then 'Logout'
Note that to use this in production, you need to fork and clone this repository and create the admin user from your terminal and comment the '/admin/create_admin' route.
To create the admin from your terminal:
-
Fork the repo and clone
-
Create a new folder and cd into it from your terminal
-
Clone the repo into the folder you created by
git clone https://github.com/Adekemi02/NetBlog.git
- After cloning, activate your virtual environment by
python -m venv name_of_your_virtual_env
source name_of_virtual_env/Scripts/activate
macOS: source name_of_virtual_env/bin/activate
- Install flask if you don't have it
- Install project dependencies
pip install -r requirements.txt
- Create your database table/schema
flask shell
db.create_all()
- Create the admin user
python manage.py create_admin
-
This will prompt a user input in your terminal where you input your details and then create the admin user for you.
-
With this onlythe admin can create the admin user.
Distributed under the MIT License. See LICENSE for more information.
Barakat Adisa - @adisa_adekhemie - adisabarakatadekemi@gmail.com
Project Link: STUDENT MANAGEMENT API
This project was made possible by:
- AltSchool Africa School of Engineering
- Caleb Emelike's Pizza API
- GitHub Student Pack
- Altschool Africa Python Backend Community