Table of Contents
The Quiz API project is a cutting-edge platform that provides a comprehensive solution for creating and delivering quizzes. This Quiz API offers a range of features, such as database of questions on a variety of topics, and the ability to track results and progress. It also ensures that users won't be able to take the quiz twice, providing a secure and reliable experience.
Creating this project got me more exposed to:
- Debugging
- Team work
- Collaboration
- Database Management
- Authentication
- Authorization
- Endpoint restriction
To get a local copy up and running, follow the steps below.
Python3: Get Python
- Clone this repo
git clone https://github.com/engrmarkk/Quiz_Api.git
- Navigate into the directory
cd Quiz_Api
- Create a virtual environment
python -m venv your_venv_name
- Activate the virtual environment on powershell or cmd
On Bash ('Scripts' for windows, 'bin' for linux)
your_venv_name\Scripts\activate.bat
source your_venv_name/Scripts/activate.csh
- Install project dependencies
pip install -r requirements.txt
- Run Flask
flask run
- Open the link generated in the terminal on a browser
http://127.0.0.1:5000/
.
├── README.md
├── app.py
├── .env
├── .gitignore
├── LICENSE
├── quiz
│ ├── __init__.py
│ ├── auth
│ │ ├── __init__.py
│ │ ├── users.py
│ └── config
│ │ ├── __init__.py
│ │ ├── configuration.py
│ └── extensions
│ │ ├── __init__.py
│ └── models
│ │ ├── __init__.py
│ │ ├── answers.py
│ │ ├── is_answered.py
│ │ ├── options.py
│ │ ├── questions.py
│ │ ├── users.py
│ └── resources
│ │ ├── __init__.py
│ │ ├── answer.py
│ │ ├── options.py
│ │ ├── questions.py
│ └── schemas
│ │ ├── __init__.py
│ │ ├── answer.py
│ │ ├── option.py
│ │ ├── question.py
│ │ ├── user.py
├── your_venv_name
├── requirements.txt
└── run.py
POST (Register) http://127.0.0.1:5000/user/register
REQUEST
{
"email": "mark@mark.com",
"password": "password",
"first_name": "mark",
"last_name": "mark",
"username": "mark"
}
RESPONSE
{
"id": 1,
"email": "mark@mark.com",
"first_name": "mark",
"last_name": "mark",
"username": "mark"
}
POST (Login) http://127.0.0.1:5000/users/login
REQUEST
{
"username": "mark",
"password": "password"
}
RESPONSE
{
"access_token": "eyJhbGciOiJIUzIEyMjMtNj...................",
"refresh_token": "eyJhbGciOiJIUzLyADmyXA...................."
}
GET (Get all users) http://127.0.0.1:5000/user/users
RESPONSE
[
{
"id": 1,
"email": "mark@mark.com",
"first_name": "mark",
"last_name": "mark",
"username": "mark",
"scores": 0,
"is_admin": false,
"taken": false
}
]
GET (Get specific user) http://127.0.0.1:5000/user/user/1
RESPONSE
{
"id": 1,
"email": "mark@mark.com",
"first_name": "mark",
"last_name": "mark",
"username": "mark",
"scores": 0,
"is_admin": false,
"taken": false
}
Adeniyi Olanrewaju - @iamengrmark - adeniyiboladale@yahoo.com
Gabriel Kalango - @GabrielKalango - kallythegreat11@gmail.com
Project Link: Quiz Api
This project was made possible by:
- AltSchool Africa School of Engineering
- Gabriel Kalango's Contribution
- Othneil Drew's README Template
- Ileriayo's Markdown Badges