engrmarkk / quiz_api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quiz_Api



Contributors Forks Stargazers Issues Twitter Twitter



Table of Contents
  1. About the project
  2. Exposure
  3. Usage
  4. Contact
  5. Acknowledgments

back to top


About Quiz_Api

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.

back to top

Built With:

Python Flask SQLite

back to top


Exposure

Creating this project got me more exposed to:

  • Debugging
  • Team work
  • Collaboration
  • Database Management
  • Authentication
  • Authorization
  • Endpoint restriction

back to top


Usage

To get a local copy up and running, follow the steps below.

Prerequisites

Python3: Get Python

Installation

  1. Clone this repo
    git clone https://github.com/engrmarkk/Quiz_Api.git
  2. Navigate into the directory
    cd Quiz_Api
  3. Create a virtual environment
    python -m venv your_venv_name
  4. Activate the virtual environment on powershell or cmd
    your_venv_name\Scripts\activate.bat
    On Bash ('Scripts' for windows, 'bin' for linux)
    source your_venv_name/Scripts/activate.csh
  5. Install project dependencies
    pip install -r requirements.txt
  6. Run Flask
    flask run
  7. Open the link generated in the terminal on a browser
    http://127.0.0.1:5000/

Project structure

.
├── 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

User's endpoints


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
}

back to top



back to top


Contact

Adeniyi Olanrewaju - @iamengrmark - adeniyiboladale@yahoo.com
Gabriel Kalango - @GabrielKalango - kallythegreat11@gmail.com

Project Link: Quiz Api

back to top


Acknowledgements

This project was made possible by:

back to top


About

License:MIT License


Languages

Language:Python 99.6%Language:Shell 0.4%