Skip to content

Commit 5442ac3

Browse files
committed
增加 CherryPy
1 parent 97edd39 commit 5442ac3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

libs/python.wiki

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,28 @@ Wikipedia:[https://en.wikipedia.org/wiki/TurboGears 英文]、[https://zh.wiki
364364

365365
又一个重型的 Web 开发框架,名气仅次于 Django。
366366

367+
它跟 Django 一样,都是“Full-Stack Frameworks”。
368+
369+
<h4>CherryPy</h4>
370+
371+
Home:[http://www.cherrypy.org/]
372+
373+
Wikipedia:[https://en.wikipedia.org/wiki/CherryPy 英文]
374+
375+
轻量级的 Web 框架。某些 Web 框架(比如前面提到的 TurboGears)使用它作为底层。
376+
377+
代码示例——Hello world
378+
<source lang="python">
379+
import cherrypy
380+
381+
class HelloWorld(object):
382+
def index(self):
383+
return "Hello World!"
384+
index.exposed = True
385+
386+
cherrypy.quickstart(HelloWorld())
387+
</source>
388+
367389
<h4>web.py</h4>
368390

369391
Home:[http://webpy.org/]

0 commit comments

Comments
 (0)