Cookiecutter template to create new flask application to build a Web API.
Project Layout from miguelgrinberg/flasky: Companion code to my O'Reilly book "Flask Web Development", second edition.
│ .gitignore
│ cookiecutter.json
│ LICENSE
│ README.md
│
└─{{cookiecutter.application_name}}
│ .gitignore
│ config.py
│ README.md
│ {{cookiecutter.application_name}}.py
│
├─tests
│ __init__.py
│
└─{{cookiecutter.app_name}}
│ exceptions.py # your custom exceptions
│ __init__.py # create_app function here
│
├─main # your main blueprint
│ errors.py # web errors like 404, 403
│ views.py # just have index route
│ __init__.py
│
├─models # database models here
│ __init__.py
│
├─static # static file folder
│ .gitkeep
│
└─templates
403.html # forbidden page
404.html # not found page
500.html # internal server error page
base.html # base template to extends
index.html # home page
With Cookiecutter
pip install --upgrade cookiecutter
cookiecutter https://github.com/un4gt/Flask-MVC
With Flasky-Cli
pip install --upgrade flasky-cli
flasky-cli create
and choice Flask-API
template.
You can use tools like pdm, pipenv, poetry or rye to init and run your project.