- Notifications
You must be signed in to change notification settings - Fork0
peterhoang/flask-boilerplate
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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.
RequiresPython 3.9+.
- Flask-RESTX
- Flask-JWT-Extended
- pytest
- coverage
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 coverageSet the environment variables
$env:FLASK_APP='myapp'$env:FLASK_ENV='development'$env:PYTHONPATH='<PATH\TO\THIS\BOILERPLATE>'
Initialize the sqllite3 database
flask init-dbRun the app
flask runSwagger landing page
http://localhost:5000/apiUnit tests and coverage
pytestcoverage run -m pytestcoverage reportcoverage html
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" myappOpen swagger landing page in browser
http://localhost:5000/api- Integrate ORM package/library
- Cacheing
- Alternative DB
About
No description, website, or topics provided.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published