un4gt / Flask-API

cookiecutter template for flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask-API

Cookiecutter template to create new flask application to build a Web API.

Layout

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

How to use

Install Cookiecutter

pip install --upgrade cookiecutter

Create a new project

With cookiecutter

cookiecutter https://github.com/jennier0107/Flask-API
Install Flasky-Cli
pip install --upgrade flasky-cli
Create new project
flasky-cli create

and choice Flask-API template.

Initialize project and run

You can use tools like pdm, pipenv, poetry or rye to init and run your project.

About

cookiecutter template for flask

License:MIT License


Languages

Language:Python 100.0%