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
│ config.py
│ README.md
│ {{cookiecutter.application_name}}.py
│
├─tests
└─{{cookiecutter.application_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
With Cookiecutter
pip install --upgrade cookiecutter
cookiecutter https://github.com/jennier0107/Flask-API
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.