Pylons

维基百科,自由的百科全书
跳转至: 导航搜索
Pylons
Pylons index page.jpg
開發者 Ben Bangert, James Gardner
穩定版本 1.0/
2010 年 5 月 28 日
程式語言 Python
作業系統 跨平台
類型 Web应用框架
許可協議 BSD License
網站 www.pylonshq.com

Pylons 是一个开放源代码Web应用框架,使用 Python 语言编写。它对 WSGI 标准进行了扩展应用,提升了重用性且将功能分割到独立的模块中。

Pylons是最新的Web应用框架中的典型,类似于 DjangoTurboGears。Pylons 受 Ruby on Rails 影响很深:它的两个组件,RoutesWebHelpers 是 Rails 特性的 Python 实现。

目录

结构 [编辑]

安装和依赖 [编辑]

Pylons的官方安装方法是从 Python CheeseShop 下载使用 EasyInstall 完成,而大部分的附加工具也通常以相同方式安装。

URL dispatch [编辑]

目前,Pylons普遍使用的URL dispatcher是Routes,实际是 Ruby on Rails 的 URL dispatching 的 Python重 新实现,其他的 URL dispatcher 只要是 WSGI 兼容也可以使用,例如 Selector

HTML 生成 [编辑]

另一块 Rails Pylons 化的部分是 WebHelpers,它提供了基于路径 的URL映射。WebHelpers 也提供了一些实用的功能来生成基于 script.aculo.usPrototype 库的 JavaScript 代码。

模板 [编辑]

数据库抽象和对象关系映射 [编辑]

Pylons 没有默认的数据库程序库。可以使用比较有名的 SQLObjectSQLAlchemy

外部链接 [编辑]

Packages used by the default Pylons installation, or popular additions:

  • Myghty - URL Dispatch, Controllers, Caching, Templating and more
  • Mako - Alternative template engine to Myghty
  • Python Paste - Project setup, testing, and deployment
  • EasyInstall - Installation and package dependencies
  • Routes - Routing implementation based on Rails routes
  • FormEncode - Validation and form generation
  • WebHelpers - HTML Helper functions

邮件列表 [编辑]

Information taken from Google Groups as of Jan 10th, 2008:

  • 1211 Members
  • 284 Average messages per month (3 preceding months)

另见 [编辑]

参考 [编辑]

Template:Python Web Application Frameworks