For faster navigation, this Iframe is preloading the Wikiwand page for Quixote (web框架).

Quixote (web框架)

Quixote
开发者Andrew Kuchling, Neil Schemenauer 和 Greg Ward
首次发布2000年8月12日,​23年前​(2000-08-12[1][2]
当前版本
  • 3.6 (2022年6月23日)[3]
编辑维基数据链接
原始码库 编辑维基数据链接
编程语言Python
操作系统跨平台
类型Web应用框架
许可协议MIT许可证
网站quixote.ca 编辑维基数据链接

Quixote是一个使用Python开发web应用软件框架。Quixote是“基于了简单的、灵活的设计,使得可以快速的书写应用,并受益于广泛的可获得的第三方Python模块。”[5]

Quixote应用典型的是个Python包,即组织入一个单一的目录树中的一组模块。Quixote接着映射一个URL至这个Python包内的一个函数方法;接着用这个HTTP请求的内容来调用这个函数,并将结果返回给客户端

演示代码

最小的Quixote演示程序。在安装了quixote包之后,可以如下这样运行它:$ python demo/mini_demo.py。这个伺服器缺省的监听localhost:8080。调试和错误输出会发送到终端。

from quixote.publish import Publisher
from quixote.directory import Directory, export

class RootDirectory(Directory):
    @export(name='')
    def index(self):
        return '''<html>
                    <body>Welcome to the Quixote demo.  Here is a
                    <a href="hello">link</a>.
                    </body>
                  </html>
               '''
    @export
    def hello(self):
        return '<html><body>Hello world!</body></html>'

def create_publisher():
    return Publisher(RootDirectory(),
                     display_exceptions='plain')

if __name__ == '__main__':
    from quixote.server.simple_server import run
    print('creating demo listening on http://localhost:8080/')
    run(create_publisher, host='localhost', port=8080)

参见

引用

  1. ^ CHANGES_24.txt. [2021-03-12]. (原始内容存档于2020-01-19). 
  2. ^ Quixote页面存档备份,存于互联网档案馆) is a web application framework developed and first released by the MNX in 2000 (or 2001).
  3. ^ Release 3.6. 2022年6月23日 [2022年10月26日]. 
  4. ^ The Quixote Web Framework. [2021-03-12]. (原始内容存档于2022-02-02). 
  5. ^ Quixote: a Python-Centric Web Application Framework页面存档备份,存于互联网档案馆), 22 July 2002, By Greg Ward, Linux Journal

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
Quixote (web框架)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?