We like Pyramid over Django, Flask, and Bottle for projects that require flexibility, scalability and speed. It gives us more control than Django and is easy to create a small app that can scale later without being rewritten. These are many of the same reasons for Why We Choose Python in general.
Recently we provided some training on how Pyramid works that was recorded. It provides a great overview of why Pyramid is ideal and how to setup a basic app with scaffolds, routes, and persistence. We also built a ToDo App for a web shootout we organized in Indianapolis through IndyPy. Putting these together turned out to be a great introduction to Pyramid, so I wrote this post.
To get a good understanding of the Pyramid framework and see how to implement a basic ToDo app from scratch:
If you would like to discuss Six Feet Up building your next web application, contact us or signup for our newsletter to get more articles like this.
If you are looking for an in-depth comparison of Pyramid vs. other frameworks check out Why We Choose Pyramid for Rapid Web Development Projects.
Pyramid is a Python based open source web framework. According to the project's website:
"As a framework, its primary job is to make it easier for a developer to create an arbitrary web application. The type of application being created isn’t really important; it could be a spreadsheet, a corporate intranet, or a social networking platform. Pyramid is general enough that it can be used in a wide variety of circumstances."
Pyramid is based on Zope, Pylons, and Django. It supports small and large projects so there is no need to rewrite like you would with small frameworks. It's also the fastest Python web framework.
Pyramid comes with several basic scaffolds to get you started and lets you pick your preferred templating system. Chameleon, Mako, Jinja 2 and others are supported.
Pyramid lets you pick whatever persistence method you prefer and supports ZODB and SQLAlchemy. You could also use MongoDB, PostgreSQL, and others.
Pyramid 1.4 Docs - http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/
Pyramid Denials - http://docs.pylonsproject.org/en/latest/denials/pyramid.html