@@ -48,138 +48,6 @@ We attempted to clean up the code base to reduce interdependencies
48
48
between modules, so you should (theoretically) be able to use any of the
49
49
modules independently in your project without using the whole package.
50
50
51
- Download and install
52
- --------------------
53
-
54
- .. raw :: html
55
-
56
- <p >
57
-
58
- Automatic installation: Tornado is listed in PyPI and can be installed
59
- with pip or easy\_ install. If you do not already have libcurl installed
60
- you may need to install it separately; see the prerequisites section
61
- below. Note that the source distribution includes demo applications that
62
- are not present when Tornado is installed using pip or easy\_ install
63
-
64
- .. raw :: html
65
-
66
- </p >
67
-
68
- .. raw :: html
69
-
70
- <p >
71
-
72
- Manual installation: Download tornado-1.2.1.tar.gz
73
-
74
- .. raw :: html
75
-
76
- </p >
77
- <pre ><code >tar xvzf tornado-1.2.1.tar.gz
78
- cd tornado-1.2.1
79
- python setup.py build
80
- sudo python setup.py install</code ></pre >
81
- <p >
82
-
83
- The Tornado source code is hosted on GitHub. On Python 2.6+, it is also
84
- possible to simply add the tornado directory to your PYTHONPATH instead
85
- of building with setup.py, since the standard library includes epoll
86
- support.
87
-
88
- .. raw :: html
89
-
90
- </p >
91
-
92
- .. raw :: html
93
-
94
- <h3 >
95
-
96
- Prerequisites
97
-
98
- .. raw :: html
99
-
100
- </h3 >
101
- <p >
102
-
103
- Tornado has been tested on Python 2.5, 2.6, and 2.7. To use all of the
104
- features of Tornado, you need to have PycURL (version 7.18.2 or higher)
105
- and (for Python 2.5 only) simplejson installed (Python 2.6 includes JSON
106
- support in the standard library so simplejson is not needed). Complete
107
- installation instructions for Mac OS X and Ubuntu are included below for
108
- convenience.
109
-
110
- .. raw :: html
111
-
112
- </p >
113
- <p style =" font-weight :bold " >
114
-
115
- Mac OS X 10.6 (Python 2.6+)
116
-
117
- .. raw :: html
118
-
119
- </p >
120
- <pre ><code >sudo easy_install setuptools pycurl</code ></pre >
121
-
122
- .. raw :: html
123
-
124
- <p style =" font-weight :bold " >
125
-
126
- Ubuntu Linux (Python 2.6+)
127
-
128
- .. raw :: html
129
-
130
- </p >
131
- <pre ><code >sudo apt-get install python-pycurl</code ></pre >
132
-
133
- .. raw :: html
134
-
135
- <p style =" font-weight :bold " >
136
-
137
- Ubuntu Linux (Python 2.5)
138
-
139
- .. raw :: html
140
-
141
- </p >
142
- <pre ><code >sudo apt-get install python-dev python-pycurl python-simplejson</code ></pre >
143
-
144
- Module index
145
- ------------
146
-
147
- The most important module is `tornado.web `
148
- which is the web framework that includes most of the meat of the Tornado
149
- package. The other modules are tools that make `tornado.web ` more useful. See
150
- `Tornado walkthrough <#tornado-walkthrough >`_ below for a detailed
151
- walkthrough of the `~tornado.web ` package.
152
-
153
- Main modules
154
- ~~~~~~~~~~~~
155
-
156
- - `tornado.web ` - The web framework on which FriendFeed is built. `web `
157
- incorporates most of the important features of Tornado
158
- - `tornado.escape ` - XHTML, JSON, and URL encoding/decoding methods
159
- - `tornado.database ` - A simple wrapper around ``MySQLdb `` to make MySQL
160
- easier to use
161
- - `tornado.template ` - A Python-based web templating language
162
- - `tornado.httpclient ` - A non-blocking HTTP client designed to work
163
- with ``web `` and ``httpserver ``
164
- - `tornado.auth ` - Implementation of third party authentication and
165
- authorization schemes (Google OpenID/OAuth, Facebook Platform, Yahoo BBAuth,
166
- FriendFeed OpenID/OAuth, Twitter OAuth)
167
- - `tornado.locale ` - Localization/translation support
168
- - `tornado.options ` - Command line and config file parsing, optimized for
169
- server environments
170
-
171
- Low-level modules
172
- ~~~~~~~~~~~~~~~~~
173
-
174
- - `tornado.httpserver ` - A very simple HTTP server built on which ``web `` is
175
- built
176
- - `tornado.iostream ` - A simple wrapper around non-blocking sockets to aide
177
- common reading and writing patterns
178
- - `tornado.ioloop ` - Core I/O loop
179
-
180
- Tornado walkthrough
181
- -------------------
182
-
183
51
Request handlers and request arguments
184
52
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
185
53
@@ -1061,7 +929,7 @@ standalone module in ``tornado.autoreload``, and is optionally used by
1061
929
the test runner in ``tornado.testing.main ``.
1062
930
1063
931
Performance
1064
- -----------
932
+ ~~~~~~~~~~~
1065
933
1066
934
Web application performance is generally bound by architecture, not
1067
935
frontend performance. That said, Tornado is pretty fast relative to most
@@ -1108,7 +976,7 @@ shouldn't add too much latency to your apps relative to most Python web
1108
976
development frameworks.
1109
977
1110
978
Running Tornado in production
1111
- -----------------------------
979
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1112
980
1113
981
At FriendFeed, we use `nginx <http://nginx.net/ >`_ as a load balancer
1114
982
and static file server. We run multiple instances of the Tornado web
@@ -1201,7 +1069,7 @@ running on ports 8000 - 8003:
1201
1069
}
1202
1070
1203
1071
WSGI and Google AppEngine
1204
- -------------------------
1072
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
1205
1073
1206
1074
Tornado comes with limited support for `WSGI <http://wsgi.org/ >`_.
1207
1075
However, since WSGI does not support non-blocking requests, you cannot
@@ -1237,7 +1105,7 @@ See the ``appengine`` example application for a full-featured AppEngine
1237
1105
app built on Tornado.
1238
1106
1239
1107
Caveats and support
1240
- -------------------
1108
+ ~~~~~~~~~~~~~~~~~~~
1241
1109
1242
1110
Because FriendFeed and other large users of Tornado run `behind
1243
1111
nginx <#running-tornado-in-production> `_ or Apache proxies, Tornado's
0 commit comments