Skip to content

bacon-delight/flask-authentication-simulator

Repository files navigation

Flask APIs

This repository contains a set of APIs used by multiple UI projects to demonstrate basic API usage. This is basically a sort of broker for the JSONPlaceholder APIs, adding a layer of authentication to them. While this repository has a limited number of routes at present, I'm occasionally working on expanding the scope of it.

Application Root Deployed at https://bacon-delight-demo-flask-apis.herokuapp.com/

Data Sourced from {JSON}Placeholder

Available Methods

  • GET
  • POST
  • PUT
  • DELETE
  • Basic Authentication
    • Access & Refresh Token Generation
    • Refreshing Access Tokens
  • Bearer Tokens
  • Params Support - coming soon

Examples

Resources

Getting Started

Environment Setup

  • Verify that you have Python and your pip -V command points to that version
  • Set up a new Python Virtual Environment using pip or Conda

Repository Setup

After cloning or downloading the repository,

  • Create a new file .flaskenv with the following contents (and feel free to change them according to your needs):
FLASK_APP=app
FLASK_ENV=development
FLASK_DEBUG=true
FLASK_RUN_PORT=8080
  • Run the flask server using flask run and the server will be up and running at the specified port in .flaskenv