Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (44 sloc) 2.404 kB
c78070d Wrapped paragraphs; changed some words.
Max authored
1 Foreword
3d719f3 @mitsuhiko Added docs, fixed some bugs I introduced last commit
authored
2 ========
3
c78070d Wrapped paragraphs; changed some words.
Max authored
4 Read this before you get started with Flask. This hopefully answers some
5 questions about the purpose and goals of the project, and when you
6 should or should not be using it.
3d719f3 @mitsuhiko Added docs, fixed some bugs I introduced last commit
authored
7
c78070d Wrapped paragraphs; changed some words.
Max authored
8 What does "micro" mean?
f3dd3da Copy edited and partially rewrote the foreword.
Matt Campbell authored
9 -----------------------
3d719f3 @mitsuhiko Added docs, fixed some bugs I introduced last commit
authored
10
8f568cf Split foreword into two files; edited lots.
Max authored
11 “Micro” does not mean that your whole web application has to fit into
12 a single Python file (although it certainly can). Nor does it mean
13 that Flask is lacking in functionality. The "micro" in microframework
14 means Flask aims to keep the core simple but extensible. Flask won't make
15 many decisions for you, such as what database to use. Those decisions that
16 it does make, such as what templating engine to use, are easy to change.
17 Everything else is up to you, so that Flask can be everything you need
18 and nothing you don't.
19
20 By default, Flask does not include a database abstraction layer, form
21 validation or anything else where different libraries already exist that can
22 handle that. Instead, FLask extensions add such functionality to your
23 application as if it was implemented in Flask itself. Numerous extensions
24 provide database integration, form validation, upload handling, various open
25 authentication technologies, and more. Flask may be "micro", but the
26 possibilities are endless.
27
28 Convention over Configuration
29 -----------------------------
30
31 Flask is based on convention over configuration, which means that many things
32 are preconfigured. For example, by convention templates and static files are
33 stored in subdirectories within the application's Python source tree. While
34 this can be changed you usually don't have to. We want to minimize the time
35 you need to spend in order to get up and running, without assuming things
36 about your needs.
37
38 Growing Up
39 ----------
40
41 Since Flask is based on a very solid foundation there is not a lot of code in
42 Flask itself. As such it's easy to adapt even for large applications and we
43 are making sure that you can either configure it as much as possible by
44 subclassing things or by forking the entire codebase. If you are interested
45 in that, check out the :ref:`becomingbig` chapter.
46
47 If you are curious about the Flask design principles, head over to the section
48 about :ref:`design`.
49
50 For the Stalwart and Wizened...
51 -------------------------------
52
53 If you're more curious about the minutiae of Flask's implementation, and
54 whether its structure is right for your needs, read the
55 :ref:`advanced_foreword`.
Something went wrong with that request. Please try again.