Skip to content

bajcmartinez/flask-api-starter-kit

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
api
May 21, 2020 22:54
May 21, 2020 22:38
May 21, 2020 22:22
May 21, 2020 21:47
May 21, 2020 22:22
May 21, 2020 22:22
July 8, 2021 10:41

Flask API Starter Kit

Sample API layout structure to be used as a baseline for other apps

Dependencies

  • flask: Python server of choise
  • flasgger: Used to generate the swagger documentation
  • flask-marshmallow: My favourite serializer
  • apispec: Required for the integration between marshmallow and flasgger

Set Up

  1. Check out the code

  2. Install requirements

    pipenv install
    
  3. Start the server with:

    pipenv run python -m flask run
    
  4. Visit http://localhost/api for the home api

  5. Visit http://localhost/apidocs for the swagger documentation

Tests

The code is covered by tests, to run the tests please execute

pipenv run python -m unittest