Skip to content

Ze-Austin/ze-school

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License Twitter

Ze School


Table of Contents
  1. About Ze School
  2. Lessons Learned
  3. Usage
  4. Sample
  5. License
  6. Contact
  7. Acknowledgements

back to top


About Ze School

Ze School is a REST API which enables school staff to register accounts and manage student data on the PythonAnywhere-powered web app. 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.

Students have limited access to the app, as a student can only change their profile details and view their profile, courses, grades and CGPA.

This student management API was built with Python's Flask-RESTX by Ze Austin as the third semester exam project for a Diploma in Backend Engineering from AltSchool Africa.

back to top

Built With:

Python Flask SQLite

back to top


Lessons Learned

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

back to top


Usage

To use this API, follow these steps:

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

  2. 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
  3. Sign in via the '/auth/login' route to generate a JWT token. Copy this access token without the quotation marks

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

    Bearer this1is2a3rather4long5hex6string
    
  5. Click 'Authorize' and then 'Close'

  6. 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
  7. When you're done, click 'Authorize' at top right again to then 'Logout'

Note: When using this API in production, please fork this repo and uncomment the @admin_required() decorator in line 51 of the admin views file. This will ensure that students and other users will not be authorized to access the admin creation route after the first admin is registered.

back to top


Sample


Ze School Screenshot


back to top


License

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

back to top


Contact

Dr Austin Wopara - @Ze_Austin - austinwopara@gmail.com

Project Link: Ze School

back to top


Acknowledgements

This project was made possible by:

back to top


About

A Student Management API built with Python (Flask)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published