Code Monkey home page Code Monkey logo

boilerplate-flask-for-rest-api-with-vscode-pipenv's Introduction

boilerplate-flask-for-rest-api-with-vscode-pipenv Build Status Coverage License: MIT

Boilerplate of Flask for REST API with VSCode and Pipenv.

Required

  • Docker installed

Let's begin developing

git clone https://github.com/keidrun/boilerplate-flask-for-rest-api-with-vscode-pipenv.git
cd boilerplate-flask-for-rest-api-with-vscode-pipenv
docker-compose up

Develop with debugging (Remote Debugging)

0. Prepare

It's necessary to insatll ptvsd locally for Remote Debugging.

pip install ptvsd

1. Turn on remote debugging mode

Set FLASK_ENV=debugging in docker-compose.yml.

...
    environment:
      - FLASK_ENV=debugging
...

FLASK_ENV

FLASK_ENV Description
puroduction Activate flask puroduction mode
development Activate flask development mode
debugging Use remote debugging config and no reload
testing Enable flask TESTING flag

2. Run Docker

docker-compose up

3. Attach to Docker Container from VSCode

Execute debugging in VSCode

Develop with testing

docker-compose -f docker-compose.test.yml up -d
docker-compose -f docker-compose.test.yml exec web pytest -sv --cov=src --cov-report term-missing test/

API endpoints

Method URI Data
POST /api/users name,age,gender,email
GET /api/users -
GET /api/users/:id -
PUT /api/users/:id name,age,gender,email
DELETE /api/users/:id -

boilerplate-flask-for-rest-api-with-vscode-pipenv's People

Contributors

dependabot[bot] avatar keidrun avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.