Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 58 lines (46 sloc) 2.792 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
7c79ce6 @rduplain Revise foreword and Becoming Big docs, #484.
rduplain authored
11 “Micro” does not mean that your whole web application has to fit into a single
12 Python file, although it certainly can. Nor does it mean that Flask is lacking
13 in functionality. The "micro" in microframework means Flask aims to keep the
14 core simple but extensible. Flask won't make many decisions for you, such as
15 what database to use. Those decisions that it does make, such as what
16 templating engine to use, are easy to change. Everything else is up to you, so
17 that Flask can be everything you need and nothing you don't.
8f568cf Split foreword into two files; edited lots.
Max authored
18
19 By default, Flask does not include a database abstraction layer, form
20 validation or anything else where different libraries already exist that can
7c79ce6 @rduplain Revise foreword and Becoming Big docs, #484.
rduplain authored
21 handle that. Instead, Flask supports extensions to add such functionality to
22 your application as if it was implemented in Flask itself. Numerous extensions
8f568cf Split foreword into two files; edited lots.
Max authored
23 provide database integration, form validation, upload handling, various open
7c79ce6 @rduplain Revise foreword and Becoming Big docs, #484.
rduplain authored
24 authentication technologies, and more. Flask may be "micro", but it's ready for
25 production use on a variety of needs.
8f568cf Split foreword into two files; edited lots.
Max authored
26
7c79ce6 @rduplain Revise foreword and Becoming Big docs, #484.
rduplain authored
27 Configuration and Conventions
8f568cf Split foreword into two files; edited lots.
Max authored
28 -----------------------------
29
7c79ce6 @rduplain Revise foreword and Becoming Big docs, #484.
rduplain authored
30 Flask has many configuration values, with sensible defaults, and a few
31 conventions when getting started. By convention templates and static files are
32 stored in subdirectories within the application's Python source tree, with the
33 names `templates` and `static` respectively. While this can be changed you
34 usually don't have to, especially when getting started.
35
36 Growing with Flask
37 ------------------
38
39 Once you have Flask up and running, you'll find a variety of extensions
40 available in the community to integrate your project for production. The Flask
41 core team reviews extensions and ensures approved extensions do not break with
42 future releases.
43
44 As your codebase grows, you are free to make the design decisions appropriate
45 for your project. Flask will continue to provide a very simple glue layer to
46 the best that Python has to offer. You can implement advanced patterns in
47 SQLAlchemy or another database tool, introduce non-relational data persistence
48 as appropriate, and take advantage of framework-agnostic tools built for WSGI,
49 the Python web interface.
50
51 Flask includes many hooks to customize its behavior. Should you need more
52 customization, the Flask class is built for subclassing. If you are interested
53 in that, check out the :ref:`becomingbig` chapter. If you are curious about
54 the Flask design principles, head over to the section about :ref:`design`.
55
56 Continue to :ref:`installation`, the :ref:`quickstart`, or the
8f568cf Split foreword into two files; edited lots.
Max authored
57 :ref:`advanced_foreword`.
Something went wrong with that request. Please try again.