Why Choose Pyramid For Rapid Web Development Projects
If you have a web project with simple requirements that needs to launch quickly, which framework will you pick?
PHP or Python?
PHP is generally inconsistent across its naming of methods in the language. Naming schemes don't match cross-libraries inside the standard library and sometimes the methods don't return what you might expect. Therefore it is harder to leverage the tools that are included in the PHP libraries because you basically have to memorize their names, which is error-prone.
In Python, things are very consistent across all the standard libraries and generally all of the frameworks too, so this is our programming language of choice, unless it makes sense to reuse an existing product or framework to fulfill a specific business need and that product or framework is built on another language (think Wordpress or Solr).
"Full stack" or "micro" web frameworks?
Some of the more mature web frameworks, like Django and Zope, are fairly monolithic. They make architectural decisions for developers, such as what type of ORM to use with your database, what templating language to use, etc. While these preset choices save time initially getting started for larger projects, they tend to back fire for smaller projects because they provide more knobs to tweak and tame. Developers end up "fighting the framework" a lot for smaller projects, which is counterproductive if you aren't going to leverage the advanced tools that come with the framework in question.
Larger frameworks also come with bugs that always seem to crop up with your specific edge case. Developers sometimes waste a lot of time working around legacy issues or investigating a piece of code they didn't even work on themselves. Within a larger project, there is usually room to address those bugs, but that's not the case for a small and rapid development project.
Pyramid and CherryPy
CherryPy can be a solid option for rapid web development projects. But we recommend choosing a Python web framework that has more tools out-of-the-box and also has a larger community of developers.
The three-year-oldis a minimalistic approach inspired by Zope, Pylons and Django. It makes very little assumptions right off the bat, and focuses on providing developers with the tools they need to make their own decisions.
With Pyramid, programers have more flexibility. Developers can choose their own templating language, choose from the numerous form generations libraries, or choose their own database layer: do they want to use NoSQL or SQLAlchemy for with relational database? Pyramid is all open.
Pyramid is also one of the two available Python frameworks running on Python 3, which means it is built with the ability to keep up with technology improvements, .
And Pyramid ranks really well in benchmark tests:
How large is the Pyramid community?
What used to be the repoze.bfg and the Pylons communities has combined into this new Pyramid community. Most Zope and Plone developers are already working on Pyramid-based projects. And many Django programers now admit a secret preference to Pyramid (ours definitely do!).
There is a tremendous amount of knowledge backing up the Pyramid community. The framework benefits greatly from the years of experience its creators and contributors utilize when building the product. The Pyramid creator himself, Chris McDonough, gained a lot of experience at Zope Corporation and then supporting Zope applications. Pyramid is born out of his understanding of the benefits and shortcomings of Zope. McDonough is now working full-time on advancing the framework, setting the overall project direction, and leading the way about its architecture.
Another important trait to consider: the Pyramid community is very active, boasting regular commits and releases. And Pyramid developers have learned their lesson: they are putting a lot of emphasis on creating high-quality documentation.
"Legacy Bugs", Did You Say?
Pyramid is fully tested. The main premise, in this community, is that, if a line of code isn't tested, it is considered broken. Pyramid core developers run coverage tests so that every line of code has a written test that covers it.
Where to start?
If you are new to Pyramid, the official Pyramid website has a few resources that can help you get up to speed right away:
- Check out the Pyramid FAQ
- To see a minimal Pyramid web application and how to run it, check out "creating your first Pyramid application"
- For help getting Pyramid set up, try the install guide
- To get the feel of how a Pyramid web application is created, go to the single file tasks tutorial page
- Like learning by example? Check out the Pyramid wiki tutorial.
- Need help? See the Pyramid support section