flask README

The project's README from github.com/pallets/flask. As one markdown file: README.md.

Flask

Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja, and has become one of the most popular Python web application frameworks.

Flask offers suggestions, but doesn't enforce any dependencies or project layout. It is up to the developer to choose the tools and libraries they want to use. There are many extensions provided by the community that make adding new functionality easy.

A Simple Example

# save this as app.py
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello, World!"
$ flask run
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Donate

The Pallets organization develops and supports Flask and the libraries it uses. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.

Contributing

See our detailed contributing documentation for many ways to contribute, including reporting issues, requesting features, asking or answering questions, and making PRs.

flask (pallets/flask)

Searching Database…

74.9K ·GitHub
这是什么东西?Flask 是一个轻量级的 Python WSGI 网络应用框架,设计目标是让上手又快又简单,同时也能扩展到复杂的应用。
它是需要安装运行的应用,还是用来开发的工具?是用来开发的:它是一个 Python 框架,你导入它并在上面编写自己的网络应用,而不是一个可以直接部署的成品。
怎么把它加到我的 Python 项目里?先用 pip install Flask 把这个包安装到你的环境里,然后按照 Flask 官方文档里的快速入门教程来构建你的第一个应用。
它会把我绑死在某些工具或项目结构上吗?不会——Flask 只提供建议,不强制任何依赖或项目结构;用哪些工具和库由开发者自己决定。
用 Windows、macOS 还是 Linux 有影响吗?没有——它是纯 Python,没有针对特定操作系统的要求,只要能运行 Python 的地方都能用,包括 Windows、macOS 和 Linux。
如果我需要登录、数据库或表单处理之类的功能怎么办?这正是扩展(extension)的用处:社区提供了大量扩展,让添加新功能变得很简单,因此核心可以保持精简。
Flask 底层是基于什么构建的?它最初只是 Werkzeug 和 Jinja 的一层简单封装,这对组合至今仍是整个技术栈的支柱:Werkzeug 负责 WSGI 层,Jinja 负责 HTML 模板渲染。
用它来做正经项目靠谱吗?它从 2010 年就开始开发,如今已是最流行的 Python 网络应用框架之一,由 Pallets 组织负责开发和维护。
What are similar projects?Slim, express, hapi, jinja, revel, echo, beego, Rocket
Creator
pallets
Size
11.9 MB
Stars
74.9K
Age
16y
Commits · 90 Days