Pylons project#Pylons Web Framework
{{Short description|Collective for Python open source developers}}
{{Infobox website
| name = Pylons Project
| logo = Pylons Project logo on transparent background.png
| logocaption =
| screenshot =
| collapsible =
| collapsetext =
| caption =
| url = {{Official URL}}
| commercial = No
| type = Python framework development
| registration = None
| language = English
| num_users =
| content_license =
| owner = Open source
| author =
| editor = Anonymous
| launch_date = {{Start date|2010|12|27}}
| alexa =
| revenue =
| current_status = Active
| footnotes =
}}
Pylons Project is an open-source organization that develops a set of web application technologies written in Python. Initially the project was a single web framework called Pylons, but after the merger with the repoze.bfg framework under the new name Pyramid, the Pylons Project now consists of multiple related web application technologies.
Pyramid
{{Infobox software
| name = Pyramid
| logo = Pyramid web framework logo on transparent background.png
| logo upright = yes
| developer = Chris McDonough, Ben Bangert, Michael Merickel, Delta Regeer, Steve Piercy
| released = {{Start date and age|2008|07|08}}{{cite web| url= https://www.docs.pylonsproject.org/projects/pyramid/en/latest/changes.html| title= Pyramid Change History — The Pyramid Web Framework v2.0| website= docs.pylonsproject.org| access-date= 2021-04-26}}
| latest release version = {{wikidata|property|edit|reference|Q2342759|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|Q2342759|P348|P577}}}}
| latest preview version =
| latest preview date =
| repo = {{URL|{{wikidata|property|Q2342759|P1324}}}}{{EAW|qid=Q2342759|pid=P1324}}
| programming language = Python
| operating system = Cross-platform
| genre = Web application framework
| license = BSD-like{{cite web| url= https://www.docs.pylonsproject.org/projects/pyramid/en/latest/copyright.html| title= Copyright, Trademarks, and Attributions — The Pyramid Web Framework v2.0| website= docs.pylonsproject.org| access-date= 2021-04-26}}
| website = {{URL|{{wikidata|property|Q2342759|P856}}}}{{EAW|qid=Q2342759|pid=P856}}
}}
Pyramid is an open source web framework written in Python and is based on WSGI. It is a minimalistic web framework inspired by Zope, Pylons and Django.{{cite web|title=repoze.bfg introduction|author=Chris McDonough|url=http://docs.repoze.org/bfg/current/narr/introduction.html|access-date=2010-09-21|archive-url=https://web.archive.org/web/20131230021947/http://docs.repoze.org/bfg/current/narr/introduction.html|archive-date=2013-12-30|url-status=dead}}
Originally called "repoze.bfg", Pyramid gathered attention mostly in the Zope{{cite web |url=http://codesinger.blogspot.com/2010/09/zope-summit-dzug-repozebfg.html |title=Zope Summit, DZUG, repoze.bfg |author=Gary Poster |date=2010-09-17 |access-date= 2010-09-21}} and Plone community as the Open Society Institute's KARL project migrated from Plone to BFG.{{cite video |people=Thomas Moroz, Chris Rossi & Calvin Hendryx-Parker |date=2009-10-28 |title=KARL – large-scale Knowledge Management |url=http://plone.blip.tv/file/3037005/ |publisher=Plone Conference 2009 |location=Budapest, Hungary |access-date=2010-09-23 |archive-url=https://web.archive.org/web/20100602004608/http://plone.blip.tv/file/3037005 |archive-date=2010-06-02 |url-status=dead }} In 2010 it was announced that the Pylons framework will move over to using BFG as a base in version 1.5.{{cite web|title=Emails explaining the Pylons 2 structure|url=http://sluggo.scrapping.cc/tmp/execution/emails.html|author=Ben Bangert|date=2010-09-18|access-date=2010-09-21}} As a result of the inclusion of BFG into the Pylons project, BFG was renamed Pyramid.{{cite web|title=repoze.bfg is now Pyramid|url=http://www.plope.com/bfg-becomes-pyramid|archive-url=https://web.archive.org/web/20101113024153/http://plope.com/bfg-becomes-pyramid|url-status=dead|archive-date=2010-11-13|access-date=2011-01-03}}
=Features=
Pyramid is a minimalistic, platform-independent web framework. It is persistence agnostic and is integrated both with SQL databases via SQLAlchemy and with the Zope Object Database, as well as other NoSQL databases, such as CouchDB.
Pyramid allows developers to define routes using regular expressions that map to objects. Like its fellow framework Zope, Pyramid also allows hierarchical object traversal, where each part of a URL is an object containing other objects, in a way that is similar to folders in a filesystem.{{cite video |people=Wichert Akkerman |date=2009-10-28 |title=Lessons from other frameworks |url=http://plone.blip.tv/file/3224136/ |publisher=Plone Conference 2009 |location=Budapest, Hungary |access-date=2010-09-21 |time=25:50 |archive-url=https://archive.today/20130418172552/http://plone.blip.tv/file/3224136/ |archive-date=2013-04-18 |url-status=dead }}
Pylons Web Framework
{{Infobox software
| name = Pylons Framework
| logo = Pylonsfw.png
| released = {{Start date and age|2005|9}}[https://pylonsproject.org/about-pylons-framework.html History of Pylons]
| latest release version = {{wikidata|property|reference|edit|Q18285301|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|Q18285301|P348|P577}}}}
| genre = Web application framework
| license = BSD license
| programming language = Python
| operating system = Cross-platform
| developer = Ben Bangert, James Gardner
| repo = {{URL|{{wikidata|property|Q18285301|P1324}}}}{{EAW|qid=Q18285301|pid=P1324}}
| website = {{URL|{{wikidata|property|Q18285301|P856}}}}{{EAW|qid=Q18285301|pid=P856}}
}}
Pylons Framework 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.The mod_wsgi [https://github.com/GrahamDumpleton/mod_wsgi project] includes both Pylons and Pyramid in its list of supported major Python web frameworks. It is strongly influenced by Ruby on Rails: two of its main components, Routes and WebHelpers, are Python reimplementations of Rails features.
=Structure=
Pylons is well known for having a near-complete stack of third-party tools, eschewing the "not-invented-here" phenomenon.
==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.Haas, Christoph [http://workaround.org/pylons/beginning-pylons.html Beginning Pylons] {{webarchive|url=https://web.archive.org/web/20090216145116/http://workaround.org/pylons/beginning-pylons.html |date=2009-02-16 }}. Retrieved July 5, 2007 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.Genshi Wiki [http://genshi.edgewall.org/wiki/GenshiRecipes/PylonsWithGenshi Pylons with Genshi] Retrieved July 5, 2007
==Database abstraction and object-relational mapping==
Pylons has no default database library. Both SQLObject and SQLAlchemy are known to be used.
==Merger with repoze.bfg and birth of Pyramid Web Framework==
Pylons has developed into the Pylons Project, and the old code from Pylons 1.0 is now in maintenance-only mode. However, pursuant to the project's merger with repoze.bfg since November 2010, newer versions of Pylons are actually different from the original Pylons 1.0. Pylons developers initially planned to rewrite certain portions of the code, but they observed that the new code was approximating repoze.bfg, which led to the merger of Pylons and repoze.bfg.Pylons Project FAQ. URL: https://pylonsproject.org/about-pylons-project.htmlNotes on the Pylons and repoze.bfg merger. URL: {{cite web |url=http://be.groovie.org/post/1558848023/notes-on-the-pylons-repoze-bfg-merger |title=Be Groovie - Notes on the Pylons & repoze.BFG Merger |access-date=2012-08-14 |url-status=dead |archive-url=https://web.archive.org/web/20120304074851/http://be.groovie.org/post/1558848023/notes-on-the-pylons-repoze-bfg-merger |archive-date=2012-03-04 }} This led to repoze.bfg (a part of the Repoze Python-based web framework) to become rebranded and relaunched as the Pyramid web framework.About Pyramid. URL: https://trypyramid.com/
See also
{{Portal|Free and open-source software}}
- Django (web framework)
- FastAPI
- Flask (web framework)
- Web2py
- TurboGears: a derivative project, built on top of Pylons
- Tornado
- Comparison of web frameworks
References
{{reflist}}
=Further reading=
- {{cite book |last1=Gardner |first1=James |title=The Definitive Guide to Pylons |url=https://archive.org/details/definitiveguidet0000gard |date=January 2009 |location=Berkeley, CA |publisher=Apress |doi=10.1007/978-1-4302-0534-0 |isbn=978-1-59059-934-1 |url-access=registration }}
External links
- {{Official webpage}}
{{Python web frameworks}}
{{Web frameworks}}
Category:Cross-platform free software
Category:Free software programmed in Python
Category:Python (programming language) software