Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

peterhoang/flask-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Minimum Boilerplate is a minimal boilerplate for prototyping a backend appliation with Flask and python.

FeaturesFlask-RESTX forSwagger support;Flask-JWT-Extended for JSON Web Token support; pytest and coverage for testing

This project is for educational purposes.

Compatibility

RequiresPython 3.9+.

Dependencies

Quickstart (Windows)

Run python in virtual environemnt

py -3 -m venv venvvenv\Scripts\activate

Install the dependencies via pip

pip install flask-restx flask-jwt-extended pytest coverage

Set the environment variables

$env:FLASK_APP='myapp'$env:FLASK_ENV='development'$env:PYTHONPATH='<PATH\TO\THIS\BOILERPLATE>'

Initialize the sqllite3 database

flask init-db

Run the app

flask run

Swagger landing page

http://localhost:5000/api

Unit tests and coverage

pytestcoverage run -m pytestcoverage reportcoverage html

Docker

Build the image

docker build -t myapp .

Run image in development mode

docker run -dp 5000:5000 -v "$(pwd):/app" -v "$(pwd)/instance:/app/instance" myapp

Open swagger landing page in browser

http://localhost:5000/api

Improvements

  • Integrate ORM package/library
  • Cacheing
  • Alternative DB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp