极简的纯Python web框架:ObjectWeb

jopen 10年前

ObjectWeb 是一个快速,极简的纯Python web框架,不依赖任何的第三方库。它围绕Python进行设计,因为起初想要把它当做面向对象的编程语言来使用。ObjectWeb支持CGI和WSGI标准,而且有一个内建的开发服务器。 

特性
import ObjectWeb  # import the library.    class MainPage(object): # Any object can be a handler      "The main page handler."        def GET(self):          "The GET method handler."          return "Output content here..."        # Make the POST method mimic the GET method.      POST = GET    # Create the Application Object.  app = ObjectWeb.Application([      ("/", MainPage),              # Point the / path to be handled by MainPage  ], debug=False)                   # Set debug to False for production.

  • Pure Python 2.6/2.7 with reliance on third party libraries.
  • Supports CGI and WSGI standards. (&& Google App Engine... Maybe.)
  • A nice debug feature to help with 500 Internal Errors.
  • Allows the use of external libraries without interfering.
  • Map your URLS to request paths using regular expressions.
  • Easily extract information from the request.
  • Form API - form processing and validation module.
  • Built-in development server.


项目主页:http://www.open-open.com/lib/view/home/1426559844211