Skip to content

zichdan/bliss_schools_management_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License Twitter

Bliss_schools_management_API


Table of Contents
  1. About Bliss Schools Management API
  2. Knowledge Acquired
  3. Project Scope
  4. Usage
  5. Installation On Local Machine
  6. Sample
  7. License
  8. Contact
  9. Acknowledgements

back to top


About Bliss Schools Management API

Bliss Schools Management API does the main function of a school and explains how it works. It enables the school to create an admin account. It allows the registration of students and lecturers. Also, the API allows the school admin to create courses and handling the grading system for the student.

CRUD operations can be carried out on the student data and the courses data, with an easy-to-use Swagger UI setup for testing and integration with the front end.

A Student account have limited access to the app, as a student can only change their profile details and view their profile, courses, grades and GPA.

This Student Management API was built with Python's Flask-RESTX by OKORIE DANIEL EZICHI during Backend Engineering third semester exam at AltSchool Africa. This was built as my third semester project in AltSchool Africa.

back to top

Built With:

Python Flask SQLite

back to top


Knowledge Acquired

Creating this API helped me learn and practice:

  • API Development with Python 'Flask Restx Framework'
  • Routing
  • Database Management
  • Error handling using 'Try and Except Block in Python'
  • Debugging
  • App Security
  • User Authentication and Authorization
  • Unit Testing using pytest and Insomnia
  • Swagger Documentation

back to top


Project Scope

The Student Management API handles the following:

  • Admin Registration
  • Teacher Registration
  • Student Registration
  • Getting Student Information and applying the CRUD operation
  • Course Creation
  • Getting a Course details and using the CRUD operation
  • Assigning a teacher to a course
  • Adding a Student Score
  • Calculating a Student GPA using the 4.0 Grading System.

The future Versions will cover more aspects and features as needed soon.


Usage

To explore and use this API, follow these steps:

  1. Open the web app on your browser: https://zichdan.pythonanywhere.com/

  2. Create an admin or student or Teacher account:

    • Click 'staff' to reveal a dropdown menu of the authentication routes, then register an admin account via the '/admin/signup/admin' route. Input your details and input 'admin' in the 'user-type' to create an admin account.
    • Click 'staff' to reveal a dropdown menu of the authentication routes, then register a teacher account via the '/admin/signup/teacher' route. Input your details and input 'teacher' in the 'user-type' to create a teacher account.
    • Click 'students' to reveal a dropdown menu of the authentication routes, then register a student account via the '/students/signup' route. Input your details and input 'student' in the 'user-type' to create a student account.
  3. Login via the '/auth/login' route to generate a JWT token. Copy the access token only without the quotation marks

  4. Scroll back up to click Authorize at top right. Enter the JWT token in the given format, for example:

    Bearer eyJhbtestXVCJ9.eyJbmMzd9.this_rQh8_tl2V1iDlsl_wAOMHcing5334
    
  5. Click Authorize and then Close.

  6. Now authorized, you can create, view, update and delete students, courses and grades via the routes in 'students' and 'courses'. You can also see the information about:

    • All students taking a course
    • All courses taken by a student
    • A student's score in percentage (example: 70.0) and student's grade in letters (eg:'A' , 'B' , 'C' , 'D')
    • A student's GPA, calculated using the 4.0 grading system based on all grades from all courses they are taking (example: 3.3)
  7. Go to the Course Namespace and create a new course before adding a student to the course

  8. Then go on ahead to perform other operations and test all the routes. Awesome!

  9. When you're done, click 'Authorize' at top right again to then 'Logout'. Also, head on to the '/auth/logout' route to log the user out and revoke the access token.

back to top


Installation On Local Machine

  • Clone the repository to your local machine.
  • Navigate to the project directory.
  • Create a virtual environment and activate it:
  • Install the dependencies:
  • Run the application:

To clone the repository

git clone https://github.com/zichdan/bliss_schools_management_API.git

Enter working directory

cd bliss_schools_management_API

OR If Renamed

cd "name of your folder"    

To create a virtual environment called 'env'

python -m venv env                 

Activating Virtual environments

For Unix or MacOS

source env/bin/activate    

For Windows

source env/scripts/activate         

To Install Dependencies

pip install -r requirement.txt

To create your database locally.

flask shell          # press enter
db                   # press enter
User                 # press enter
Admin                # press enter
Student              # press enter
Course               # press enter
StudentCourse        # press enter
Score                # press enter
db.create_all()      # press enter
exit()               # press enter

Finally, To run the application.

python runserver.py

Sample


bliss schools management API


back to top


License

Distributed under the MIT License. See LICENSE for more information.

back to top


Contact

You can contact me with my social media handles:

LinkedIn | Twitter | Github | Email: zichdan1999@gmail.com

Project Link: bliss_schools_management_API

back to top


Acknowledgements

This project was made possible by:

back to top


About

A Student Management API built with Flask-Restx framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages