| Developer(s) | Ben Bangert, James Gardner |
|---|---|
| Initial release | September 2005[1] |
| Stable release | 0.9.7 / 2009-02-23 |
| Written in | Python |
| Operating system | Cross-platform |
| Type | Web application framework |
| License | BSD License |
| Website | http://www.pylonshq.com/ |
Pylons is an open source web application framework written in Python. It makes extensive use of the Web Server Gateway Interface standard to promote reusability and to separate functionality into distinct modules. It is strongly influenced by Ruby on Rails: two of its main components, Routes and WebHelpers, are Python reimplementations of Rails features.
Contents |
Structure
Pylons is well-known for having a near-complete stack of third-party tools, eschewing definitively the "not–invented–here" phenomenon[citation needed].
Installation, dependencies, and setup
The official installation method of Pylons is through EasyInstall via the Python Package Index (pypi), and most of the additional tools are typically installed the same way. EasyInstall also handles package dependencies when relevant. Some distributions could also package Pylons and Paste, but it is likely that any distribution's packages would lag the official distribution. Pylons may also be installed by hand by renaming its .egg file to .zip and extracting the contents.
Paste is used for project setup, testing, and deployment. Using the common INI configuration format, Paste allows for multiple "profiles", so that developers can run development and deployment setups from the same codebase without revealing sensitive parts of Pylons, such as the interactive debugger, to production users.
URL dispatch
Currently the only widely used URL dispatcher for Pylons is Routes, a Python reimplementation of Ruby on Rails' URL dispatching, although any WSGI-compatible URL dispatcher can be used. While Routes is a separate library, it was developed for use in Pylons and its development remains closely in sync with Pylons.
HTML generation
Another piece of Rails adapted for Pylons is WebHelpers, which provides URL mapping based on the Routes configuration. WebHelpers also provides some utility functions for generating JavaScript code making use of the script.aculo.us and Prototype libraries.
FormEncode and FormBuild are used for HTML form validation and generation; there has been some use of Mako for form generation using Mako's inheritance model.
Templating
Myghty was the default Pylons templating language, but as of version 0.9.6 it has been replaced by Mako.[2] Both templating languages are text-based (as opposed to XML-based), and support includes, inheritance and embedding arbitrary Python code.
Because of Pylons' loosely coupled layers, other templating languages can be used as well. Genshi, an XML-based templating language, can be used in lieu of either Mako or Myghty. [3]
Database abstraction and object-relational mapping
Pylons has no default database library. Both SQLObject and SQLAlchemy are known to be used.
See also
- Comparison of web application frameworks
- TurboGears - a derivative project, built on top of Pylons
Mailing List
Information taken from Google Groups as of May 15th, 2009:
- 1841 Members
- 310 Average messages per month (3 preceding months)
References
- The Pylons Book. Apress. January 25, 2009. doi:. ISBN 978-1-59059-934-1. http://pylonsbook.com/. Retrieved 2009-04-08.
- ^ History of Pylons
- ^ Haas, Christoph Beginning Pylons. Retrieved July 5, 2007
- ^ Genshi Wiki Pylons with Genshi Retrieved July 5 2007
External links
Packages used by the default Pylons installation, or popular additions:
- Mako - Default templating engine for Pylons
- Myghty - URL Dispatch, Controllers, Caching, Templating and more
- Python Paste - Project setup, testing, and deployment
- WebOb - Request and Response objects
- EasyInstall - Installation and package dependencies
- Routes - Routing implementation based on Rails routes
- FormEncode - Validation and form generation
- WebHelpers - HTML Helper functions
- SQLAlchemy - Object Relational Mapper
|
|||||
|
||||||||||||||||||||||||||||||||||||||
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




