Skip to content

Flask CRUD API with JWT authentication and a CI/CD pipeline

Notifications You must be signed in to change notification settings

adnaanbheda/flask-crud

Repository files navigation

Flask CRUD with JWT Auth

Build Status

Basic Customers REST API created using Flask, SQLAlchemy, Marshmallow

Postman Collection

TODO

  • DB Setup
  • Variable Configuration Files
  • Customer Routes
  • Login/Signup Setup
  • JWT Auth
  • Travis CI
  • Tests
  • Create Docker Compose File

Documentation

To run this application, you'll require pipenv

  1. pip install pipenv
  2. Clone this repository, cd flask-crud
  3. pipenv install
  4. Run the application
    • Development Mode

      • export FLASK_ENV=development && flask run
    • Production Mode

      • flask run

API

Customers Schema

Field Type Description
name string Name
dob datetime.date Date of Birth
updated_at datetime Last Updated Date

Endpoints

Route Method Description Authentication Required Body
/login POST Login endpoint to receive the token No username, password
/signup POST Signup endpoint to receive the token No userame, password
/customer GET Lists all customers Yes -
/customer POST Lists all customers Yes name, dob
/customer/<id> PUT Add a customer Yes name, dob
/customer/<id> GET Fetch a customer Yes -
/customer/<id> DELETE Delete a customer Yes -
/customer/list/<n> GET List all customers sorted by dob Yes -

About

Flask CRUD API with JWT authentication and a CI/CD pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages