Chris McDonough
2011-09-04 90737d6b24775cab3a3816b426c0dc65c03fe43d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
.. _index:
 
=================================================
The Pyramid Web Application Development Framework
=================================================
 
:app:`Pyramid` is a small, fast, down-to-earth Python web application
development framework.  It is developed as part of the `Pylons Project
<http://docs.pylonsproject.org/>`_.  It is licensed under a `BSD-like license
<http://repoze.org/license.html>`_.
 
Here is one of the simplest :app:`Pyramid` applications you can make:
 
.. literalinclude:: narr/helloworld.py
 
When saved to ``helloworld.py``, the above application can be run via:
 
.. code-block:: text
 
   $ easy_install pyramid
   $ python helloworld.py
   serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
 
And when you visit ``http://localhost:8080/hello/world`` in a browser, you
will see the text ``Hello, world!``.
 
See :ref:`firstapp_chapter` for a full explanation of how this application
works. Read the :ref:`html_narrative_documentation` to understand how
:app:`Pyramid` is designed to scale from simple applications like this to
very large web applications.
 
Front Matter
============
 
.. toctree::
   :maxdepth: 1
 
   copyright.rst
   conventions.rst
 
"What's New" Documents
======================
 
.. toctree::
   :maxdepth: 1
 
   whatsnew-1.2
   whatsnew-1.1
   whatsnew-1.0
 
.. _html_narrative_documentation:
 
Narrative documentation
=======================
 
Narrative documentation in chapter form explaining how to use
:app:`Pyramid`.
 
.. toctree::
   :maxdepth: 2
 
   narr/introduction
   narr/install
   narr/firstapp
   narr/configuration
   narr/project
   narr/startup
   narr/urldispatch
   narr/views
   narr/renderers
   narr/templates
   narr/viewconfig
   narr/assets
   narr/webob
   narr/sessions
   narr/events
   narr/environment
   narr/logging
   narr/paste
   narr/commandline
   narr/i18n
   narr/vhosting
   narr/testing
   narr/resources
   narr/muchadoabouttraversal
   narr/traversal
   narr/security
   narr/hybrid
   narr/hooks
   narr/advconfig
   narr/extending
   narr/router
   narr/threadlocals
   narr/zca
 
Tutorials
=========
 
Detailed tutorials explaining how to use :app:`Pyramid` to build
various types of applications and how to deploy :app:`Pyramid`
applications to various platforms.
 
.. toctree::
   :maxdepth: 2
 
   tutorials/wiki2/index.rst
   tutorials/wiki/index.rst
   tutorials/bfg/index.rst
   tutorials/gae/index.rst
   tutorials/modwsgi/index.rst
 
Reference Material
==================
 
Reference material includes documentation for every :app:`Pyramid` API.
 
.. toctree::
   :maxdepth: 2
 
   api
 
Detailed Change History
=======================
 
.. toctree::
   :maxdepth: 1
 
   changes
 
Design Documentation
====================
 
.. toctree::
   :maxdepth: 1
 
   designdefense
 
Sample Applications
===================
 
`cluegun <https://github.com/Pylons/cluegun>`_ is a simple pastebin
application based on Rocky Burt's `ClueBin
<http://pypi.python.org/pypi/ClueBin/0.2.3>`_.  It demonstrates form
processing, security, and the use of :term:`ZODB` within a :app:`Pyramid`
application.  Check this application out via:
 
.. code-block:: text
 
  git clone git://github.com/Pylons/cluegun.git
 
`virginia <https://github.com/Pylons/virginia>`_ is a very simple dynamic
file rendering application.  It is willing to render structured text
documents, HTML documents, and images from a filesystem directory.  An
earlier version of this application runs the `repoze.org
<http://repoze.org>`_ website.  Check this application out via:
 
.. code-block:: text
 
  git clone git://github.com/Pylons/virginia.git
 
`shootout <https://github.com/Pylons/shootout>`_ is an example "idea
competition" application by Carlos de la Guardia and Lukasz Fidosz.  It
demonstrates :term:`URL dispatch`, simple authentication, integration
with `SQLAlchemy <http://www.sqlalchemy.org/>`_ and ``pyramid_simpleform``.
Check this application out of version control via:
 
.. code-block:: text
 
  git clone git://github.com/Pylons/shootout.git
 
Older Sample Applications (repoze.bfg)
======================================
 
.. note::
 
   These applications are for an older version of :app:`Pyramid`, which was
   named :mod:`repoze.bfg`.  They won't work unmodified under Pyramid, but
   might provide useful clues.
 
`bfgsite <http://svn.repoze.org/bfgsite/trunk>`_ is the software which
runs the `bfg.repoze.org <http://bfg.repoze.org>`_ website.  It
demonstrates integration with Trac, and includes several
mini-applications such as a pastebin and tutorial engine.  Check a
buildout for this application out of Subversion via:
 
.. code-block:: text
 
  svn co http://svn.repoze.org/buildouts/bfgsite/ bfgsite_buildout
 
`KARL <http://karlproject.org>`_ is a moderately-sized application
(roughly 70K lines of Python code) built on top of :mod:`repoze.bfg`
and other Repoze software.  It is an open source web system for
collaboration, organizational intranets, and knowledge management, It
provides facilities for wikis, calendars, manuals, searching, tagging,
commenting, and file uploads.  See the `KARL site
<http://karlproject.org>`_ for download and installation details.
 
Support and Development
=======================
 
The `Pylons Project web site <http://pylonsproject.org/>`_ is the main online
source of :app:`Pyramid` support and development information.
 
To report bugs, use the `issue tracker
<http://github.com/Pylons/pyramid/issues>`_.
 
If you've got questions that aren't answered by this documentation,
contact the `Pylons-devel maillist
<http://groups.google.com/group/pylons-devel>`_ or join the `#pylons
IRC channel <irc://irc.freenode.net/#pylons>`_.
 
Browse and check out tagged and trunk versions of :app:`Pyramid` via
the `Pyramid GitHub repository <http://github.com/Pylons/pyramid/>`_.
To check out the trunk via ``git``, use this command:
 
.. code-block:: text
 
  git clone git@github.com:Pylons/pyramid.git
 
To find out how to become a contributor to :app:`Pyramid`, please see the
`contributor's section of the documentation
<http://docs.pylonsproject.org/index.html#contributing>`_.
 
Index and Glossary
==================
 
* :ref:`glossary`
* :ref:`genindex`
* :ref:`search`