- Features
- Installation guide
- Testing and Running Guide
- API Documentation
- Key Python Modules Used
- Reference Resources
-
create user
-
Confirm Email
-
Resend Email Confirmation link
-
Login (get refresh token and access token)
-
Get new Access Token from Refresh Token
-
Revoke tokens
-
change password
-
forgot password
-
CRUD Roles (Admin)
-
List, Read, Delete Users (Admin)
- User Activity Logs
- login with socials (google, fb, twitter, etc)
- Phone SMS login
- PIN Auth
- Finger-print Auth
- 2 Way Authentication
- Face Recognition auth
- Installing the application locally requires
- Python 3.7+ - download and install it.
- virtualenv - To create a virtual environment and activate it, run the following commands.
python3 -m venv venv source venv/bin/activate
- Install the project dependacies from requirements.txt by running the following command in shell:
pip install -r requirements.txt
- The project contains a
.env.sample
file at its root with the environment variables required to run the app. Copy the file and name it.env
, populating it with the correct values.
- This Flask application needs a PostgreSQL database to store data. Create a database for this project, get the Database Name, Port, host, username and password and add it to
.env
file as shown in.env.sample
file. - Run the following commands to set-up(create tables for the project) the database using Flask-Migrate:
flask db init
flask db migrate -m 'set-up the db'
flask db upgrade
- If this is your first time setting up, you will need initial data seeded to your database. Run the following command to-do so:
flask seed
- To activate the development server run:
export FLASK_DEBUG=True
flask run
At this point, the development server should be accessible at http://localhost:5000/
- Testing - To run all the tests:
python -m pytest -v
- SwaggerUI Docs: You can access, visualize and interact with your API resources via http://localhost:5000/apidocs
- Postman API Collection: You can access postman collection in postman_collection.json
- OpenAPI Specification Docs: http://127.0.0.1:5000/apispec_1.json
- Flask: micro-framework for web application development which includes the following dependencies:
- click: package for creating command-line interfaces (CLI)
- itsdangerous: cryptographically sign data
- Jinja2: templating engine
- MarkupSafe: escapes characters so text is safe to use in HTML and XML
- Werkzeug: set of utilities for creating a Python application that can talk to a WSGI server
- pytest: framework for testing Python projects
- Flask-SQLAlchemy - ORM (Object Relational Mapper) for Flask
- Flask-Migrate - An extension that handles SQLAlchemy database migrations for Flask applications using Alembic.
- Flask-RESTful - An extension for Flask that adds support for quickly building REST APIs.
- Marshmallow - A framework for Object/Model Validation, serialization and deserialization.
- Flask-JWT-Extended - An extension for managing JSON Web Tokens.
- psycopg2 - PostgreSQL database adapter for the Python programming language.
- flasgger, apispec - a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API.
- flake8 - static analysis tool