Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 58 lines (46 sloc) 2.61 KB
3d719f3 @mitsuhiko Added docs, fixed some bugs I introduced last commit
1 Foreword
2 ========
4 Read this before you get started with Flask. This hopefully answers some
5 questions about the intention of the project, what it aims at and when you
6 should or should not be using it.
8 What does Micro Mean?
9 ---------------------
11 The micro in microframework for me means on the one hand being small in
12 size, complexity but on the other hand also that the complexity of the
13 applications that are written with these frameworks do not exceed a
14 certain size. A microframework like Flask sacrifices a few things in
15 order to be approachable and to be as concise as possible.
17 For example Flask uses thread local objects internally so that you don't
18 have to pass objects around from function to function within a request in
19 order to stay threadsafe. While this is a really easy approach and saves
20 you a lot of time, it also does not scale well to large applications.
21 It's especially painful for more complex unittests and when you suddenly
22 have to deal with code being executed outside of the context of a request
23 (for example if you have cronjobs).
25 Flask provides some tools to deal with the downsides of this approach but
26 the core problem of this approach obviously stays. It is also based on
27 convention over configuration which means that a lot of things are
28 preconfigured in Flask and will work well for smaller applications but not
29 so much for larger ones (where and how it looks for templates, static
30 files etc.)
32 But don't worry if your application suddenly grows larger than it was
33 initially and you're afraid Flask might not grow with it. Even with
34 larger frameworks you sooner or later will find out that you need
35 something the framework just cannot do for you without modification.
36 If you are ever in that situation, check out the :ref:`becomingbig`
37 chapter.
39 Target Audience
40 ---------------
42 Is Flask for you? Is your application small-ish (less than 4000 lines of
43 Python code) and does not depend on too complex database structures, Flask
44 is the Framework for you. It was designed from the ground up to be easy
45 to use, based on established principles, good intentions and on top of two
46 established libraries in widespread usage.
48 Flask serves two purposes: it's an example of how to create a minimal and
49 opinionated framework on top of Werkzeug to show how this can be done, and
50 to provide people with a simple tool to prototype larger applications or
51 to implement small and medium sized applications.
53 If you suddenly discover that your application grows larger than
54 originally intended, head over to the :ref:`becomingbig` section to see
55 some possible solutions for larger applications.
57 Satisfied? Then head over to the :ref:`installation`.
Something went wrong with that request. Please try again.