Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 162 lines (101 sloc) 6.269 kb
a6e2009 AaronSw
anonymous authored
1 ---
2 layout: default
ad4122b clinch
anonymous authored
3 title:
a6e2009 AaronSw
anonymous authored
4 ---
5
acdcf26 @aaronsw edit
aaronsw authored
6 ## About
a6e2009 AaronSw
anonymous authored
7
acdcf26 @aaronsw edit
aaronsw authored
8 **web.py** is a web framework for python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.
9
10 import web
11
12 urls = (
13 '/(.*)', 'hello'
14 )
15
16 class hello:
17 def GET(self, name):
18 i = web.input(times=1)
19 if not name: name = 'world'
20 for c in xrange(int(i.times)): print 'Hello,', name+'!'
21
22 if __name__ == "__main__": web.run(urls, globals())
23
ad4122b clinch
anonymous authored
24
acdcf26 @aaronsw edit
aaronsw authored
25 A complete web.py application
26
27 ## Get Started
28
29 web.py 0.21 was released 2007-05-28: [web.py-0.21.tar.gz][16]
30
a7fc182 @aaronsw edit
aaronsw authored
31 [16]: static/web.py-0.21.tar.gz
acdcf26 @aaronsw edit
aaronsw authored
32
33 To always have the latest version of web.py, run:
34
35 svn co http://webpy.org/svn/trunk/web/
36
37 Upgrading from an older version? Be sure to [read the upgrade guide][17].
38
39 [17]: http://webpy.infogami.com/upgrade_to_point2
40
41 ## Who uses web.py?
42
43 [reddit.com][20], one of the top 1000 sites according to Alexa, uses web.py to serve its millions of daily page views. "It's the anti-framework framework. web.py doesn't get in your way," explains founder Steve Huffman. (Disclosure: web.py creator Aaron Swartz was also a founder of reddit.)
44
45 [20]: http://reddit.com/
46
d4a5bcf @aaronsw edit
aaronsw authored
47 [colr.org](http://colr.org), a color scheme picking site, is built in web.py.
48
acdcf26 @aaronsw edit
aaronsw authored
49 [Yandex][21], a Russian traffic provider whose homepage alone receives 70 million daily page views, uses web.py for certain projects.
50
51 [21]: http://yandex.ru
52
53 [LShift][22] has used web.py to build websites for [Expro][23] and [publisher Dorling Kindersley][24]. "web.py allows us to do what we do best," they report. "It does the webapp thing brilliantly, and without requiring us to compromise on flexibility and originality."
54
55 [22]: http://www.lshift.net/
56 [23]: http://exproretail.com/
57 [24]: http://travel.dk.com/
58
3166efc @aaronsw edit
aaronsw authored
59 [micropledge][m], a web app that collects funding for software ideas, is built in web.py. "We've enjoyed fitting in with its minimalist approach," says developer Ben Hoyt.
60
61 [m]: http://micropledge.com/
62
acdcf26 @aaronsw edit
aaronsw authored
63 ## Buzz
64
65 "We completed our server rewrite a few days ago with web.py and it was everything we could have wished for."
66 - Sam Hsiung, [YouOS][25]
67
68 [25]: http://www.youos.com/
69
70 "Django lets you write web apps in Django. TurboGears lets you write web apps in TurboGears. Web.py lets you write web apps in Python."
71 - Adam Atlas
72
73 "very nicely written and concise (not to mention it's written by Aaron Swartz, whose coding skills are very trustable), and doesn't get in my way"
74 - Jonas Galvez, Blogamundo [#][26]
75
76 [26]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149
77
78 "the first framework ... where I could just scribble code and see something working without even having to try to understand the logic of it. A pleasure to integrate."
d5f9d78 @aaronsw edit
aaronsw authored
79 - [Delaunay Antoine][27], built [a photo gallery][28] ([source][29]) and [an agenda][34] ([source][35]) with it
acdcf26 @aaronsw edit
aaronsw authored
80
81 [27]: http://delaunay.org/antoine/
82 [28]: http://delaunay.org/antoine/i
d5f9d78 @aaronsw edit
aaronsw authored
83 [29]: http://hg.delaunay.org/hacking?mf=9fcf30dc6138;path=/webpy/ibrouteur/;style=gitweb
84 [34]: http://metagenda.org
85 [35]: http://hg.delaunay.org/hacking?mf=9fcf30dc6138;path=/webpy/glocal/;style=gitweb
acdcf26 @aaronsw edit
aaronsw authored
86
87 "Guido [van Rossum, creator of Python], you'll probably find that web.py best suits your style. ... If you don't like it, I can't imagine which of the other dozens of frameworks out there you *would* like."
88 - Phillip J. Eby, creator of the Python Web Server Gateway Interface (WSGI) [#][30]
89
90 [30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15
91
92 "... the [Cheetah] example I saw on web.py looks "right". (web.py itself OTOH gets an "F", for undocumented code with too much magic behavior. upvars(), bah.)"
93 - Guido van Rossum, creator of Python [#][31]
94
95 [31]: http://www.artima.com/weblogs/viewpost.jsp?thread=146503
96
97 "suffice to say I think Aaron is headed in the right direction."
98 - Harry Fuecks: [a simple wiki with web.py][32]
99
100 [32]: http://www.sitepoint.com/blogs/2006/01/06/a-simple-wiki-with-webpy/
101
102 "a very fascinating moment for me. The feelings just like the first time I wrote my php script ... it sure have let me learn python in the fun way. Good work aaron !"
103 - Kamal [simple blog in webpy, learning python the fun way][33]
104
105 [33]: http://www.k4ml.com/node/165
ad4122b clinch
anonymous authored
106
107 ### web.py documentation:
108
109 * [installation](/install)
110 * [english](/install)
111 * [mac os x](/install_macosx)
112 * [español](/install/es)
113
114 * [tutorials for version 0.2 (latest)](/tutorial2)
115 * [english](/tutorial2.en)
116 * [pусский 0.2](http://webpy.infogami.com/tutorial2.ru)
117 * [简体中文](http://www.dup2.org/files/web.py%200.2%20tutorial.html)
118 * [template.py tutorial](/templetor)
119 * [form.py (short) tutorial](/form)
120 * [upgrading from 0.1 to 0.2](http://webpy.infogami.com/upgrade_to_point2)
121
122 * [tutorials (old version)](/tutorial):
123 * [english](http://webpy.org/tutorial)
124 * [español](/tutorial/es)
125 * português: [1](http://www.writely.com/View.aspx?docid=bbcm927cd2fmj) [2](http://www.writely.com/View.aspx?docid=bbcnjdbhbfh6n) [3](http://www.writely.com/View.aspx?docid=bccxp4cgw36p3)
126 * [français](http://sunfox.org/tutoriel-web-py-fr/)
127 * [pусский](http://bobuk.infogami.com/webpytrans)
128 * [日本語](http://kinneko.googlepages.com/webpy_tutorial_ja)
129 * [简体中文](http://www.keli.info/static/webpy-tutorial.html)
130
131
132 * [code documentation](/docs)
133
134
135 * FAQ:
aaee60f clinch
anonymous authored
136 * [english](http://webpy.infogami.com/faq)
ad4122b clinch
anonymous authored
137 * [español](/faq/es)
138 * [русский](/faq/ru)
139 * [日本語](http://kinneko.googlepages.com/webpy_faq)
140
141 * [code samples](/src)
142
143 * [friendly hosts](/hosts)
144
145 * [related projects](/related)
146
147 * [tricks](/tricks)
148
149
0319f76 @aaronsw edit
aaronsw authored
150 ### web.py community
ad4122b clinch
anonymous authored
151
6a781ce @aaronsw edit
aaronsw authored
152 * [**mail list**](http://groups.google.com/group/webpy/ "web.py google group"): home of the web.py discussion
ad4122b clinch
anonymous authored
153
6a781ce @aaronsw edit
aaronsw authored
154 * [**irc channel**](irc://irc.freenode.net/webpy "#webpy on irc.freenode.net"): home of the web.py talk
ad4122b clinch
anonymous authored
155
156 ### web.py development:
157
0290e94 @berwynhoyt edit
berwynhoyt authored
158 * [subversion repository](http://webpy.org/svn/) | [follow commits](http://groups.google.com/group/webpy-commits/)
0993fb6 edit
anonymous authored
159
aca4e97 edit
Adam Atlas authored
160 * [launchpad site](http://launchpad.net/webpy)
bb1edc4 edit
Adam Atlas authored
161
d390251 AaronSw
anonymous authored
162 * [todo](/todo)
Something went wrong with that request. Please try again.