Python for Entrepreneurs Transcripts
Chapter: Build web apps with Pyramid: Part 1
Lecture: Pyramid principles

Login or purchase this course to watch this video and the rest of the course contents.
0:02 Let's take just a moment and talk about Pyramid - the web framework and the principles behind it, before we look at the code
0:09 and the building blocks to create web apps with Pyramid. You can learn more about Pyramid at trypyramid.com
0:15 and they have this little saying up here that I think captures a lot about the framework "The start small, finish big, stay finished framework"
0:22 Idea is you don't have to know a lot to use Pyramid, there is a few simple building blocks and then many more
0:29 that you can bring in as your app grows in complexity and needs, and they have a 100% unit tests and they are very conservative
0:36 about pushing on new versions, so it's the "stay finished framework" as well. Pyramid focuses on simplicity
0:44 and they take a "pay only for what you eat" approach and it has a really interesting idea behind it that you should be able to get started with Pyramid
0:52 even if you only have a partial understanding of it, that means you can do the major things, how do I render some HTML to a view,
0:59 how do I process a post, things like that, without fully digging into all the details which I think is a really constructive way to get started.
1:07 Remember, I called Pyramid the Goldielocks framework because it's not a micro framework that has too little,
1:13 it's also not a large building block framework that you have to take the large building blocks and put them together or not,
1:20 they focus on the core things that you do in a web framework, mapping URLs and code, templates and serving assets.
1:27 Pyramid has great documentation and tutorials to help you dig deeper, we saw earlier that Pyramid is very fast
1:35 and especially when you consider the Python 3 angle, in the age of cloud computing it's easy to think we can throw
1:42 as many machines at a problem as we need, that costs money but more importantly that costs complexity,
1:48 so having a pretty fast framework is a real benefit. Pyramid has 100% test coverage and their philosophy is if it ain't tested it's broken.
1:58 So you can count on new releases of Pyramid not breaking your code. As you can see, Pyramid is open source, it's available on GitHub
2:08 and is distributed under a permissive open source license. Finally, Pyramid is one of the few frameworks
2:15 that takes a forward-looking approach to Python 3. Python 3 is the default implementation their documentation and tutorials are in Python 3
2:24 and that's the recommended way to run Pyramid. So as we transition from Python 2 to Python 3 as an industry,
2:31 Pyramid is already in the right place to make that transition because they have already gone through it.


Talk Python's Mastodon Michael Kennedy's Mastodon