A Flask template for cookiecutter. (Supports Python ≥ 3.6)
See this repo for an example project generated from the most recent version of the template.
# Basic usage (You will be prompted to provide basic information about your application)
$ ./cookiecutter-docker.sh
full_name [Steven Loria]:
# Additional arguments are available
$ ./cookiecutter-docker.sh --help
Usage: ./cookiecutter-docker.sh [OPTIONS]
Options:
-b, --build Build Docker image before running cookiecutter
-t, --template Specify custom cookiecutter template via a URI to a git repo
e.g. https://github.com/cookiecutter-flask/cookiecutter-flask.git
Defaults to template in current working directory
-h, --help Show this message and exit
If using standard instructions, Python ≥ 3.6 is required. A virtual environment is recommended (like virtualenv
).
pip3 install cookiecutter
cookiecutter https://github.com/cookiecutter-flask/cookiecutter-flask.git
You will be asked about your basic info (name, project name, app name, etc.). This info will be used in your new project.
After you have generated the project code, a few more steps must be taken before your new app will run. The README of the generated project shows you how to configure and run the application. (You can see the template README here).
MIT licensed.
YY.MINOR.MICRO
).Flask
according to the 0.11 docs. Thanks @aliavni.invoke test
command.lint
command on Travis builds.lint
, clean
, and urls
management commands.Thanks @andreoliw for these contributions.
BaseFactory
class.DbTestCase
.simple
branch does not use these.关于cookiecutter-flask Cookiecutter可以让你快速从模板中建立工程,cookiecutter-flask则是Flask的模板,可以快速生成Flask大型项目模板。 cookiecutter-flask生成的工程目录下有一个database.py文件,主要是对数据表功能的一个扩展。这篇文章是对这份代码简单分析。上代码 database.py # -*- coding: u
前言 Python必学的两大web框架之一Flask,俗称微框架。它只需要一个文件,几行代码就可以完成一个简单的http请求服务。 但是我们需要用flask来提供中型甚至大型web restful api服务的时候就需要我们来规划项目结构。 Django 框架有自身的生成项目结构的命令和生成app的命令,但是Flask没有。 这篇文章主要介绍使用工具帮助我们进行一些Flask rest api项目
Flask路由可以指定HTTP请求方法,并在请求函数中根据不同的请求方法,执行不同的逻辑。这样实现一个Restful的请求已经相当简单了 Flask还有更简便的方法,就是其Flask-RESTful扩展。首先,我们来安装这个扩展: pip install Flask-RESTful 安装完后,你就可以在代码中导入该扩展包 from flask import Flask, request from
在创建的虚拟环境中安装cookiecutter $VENV/bin/pip install cookiecutter $ $ENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch 此处输入你所创建项目的名称 project_name [Pyramid Scaffold]: proj
最近还是要写项目在CICC,做一个和前端交互的Flask项目,然后干脆学习一下怎么做架构师。 看看Flask项目全家桶的内容。 除了下面写的,在github上还有https://github.com/humiaozuzu/awesome-flask等awesome系列可以拿着用 flask已经集成的Flask-WTF,表单使用 Flask-Mail邮件插件,狗书里的内容 Flask-Cache :
Cookiecutter 是一款快速建立工程模板的Python命令行工具。它可以让你快速从模板中建立工程,目前有 Python、C、Common Lisp、JS、LaTeX/XeTeX、Berkshelf-Vagrant 和 HTML 的模板。 从 cookiecutter-pypackage.git 中的模板创建工程,你可以输入一些值, 然后它会在当前工作目录下为你创建一些 Python 包。
cookiecutter-flask-restful Cookiecutter template for flask restful, including blueprints, application factory, and more Introduction This cookie cutter is a very simple boilerplate for starting a REST
Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstartingproduction-ready Django projects quickly. Documentation: https://cookiecutter-django.readthedocs.io/en/l
Cookiecutter Django-Vue Powered by Cookiecutter,inspired by Cookiecutter Django. Features Docker 12 Factor Server: Nginx Frontend: Vue + vue-cli + PWA Backend: Django Database: PostgreSQL API: REST or
Table of Contents This article consists of the following sections. Table of Contents Features Introduction Requirements Quick start Initial directories and files Makefile targets Working with Docker c
cookiecutter-django-rest a factory for building bleeding edge, best practiced, scalable, rest apis You need to make a scalable api on a deadline. You deeply care about the quality of your work.cookiec