#100DaysOfWeb in Python Transcripts
Chapter: Days 37-40: Introduction to Pyramid framework
Lecture: Pyramid principles
0:00 Let's talk briefly about Pyramid's principals. The core idea is that the developers are using to guide what should be in there
0:09 what shouldn't, and what is important to the framework. One of the principals I really love about Pyramid is this pay only for what you eat approach.
0:17 The idea is that you can get results from using Pyramid even if you have a partial understanding of the framework.
0:23 You don't need to use its role based security. Then you don't even need to think about you'll never see it it doesn't matter
0:29 but it's there if you want to add it in. If you want to work with sessions there's something you could add in for sessions
0:36 but you don't care or need to know about that if you're not using it. So it has this really simple pay only for what you eat approach.
0:44 It's also in the micro framework world which is another way of saying it's sort of a minimalist framework. It solves the fundamental problems of
0:51 web application, mapping your URLs to code templating, security, and serving static asssets. Not a whole lot more than that
0:57 but it does those really well. The core developers on the Pyramid team definitely take documentation seriously
1:05 and their goal is to have no aspect of Pyramid remained undocumented. It's not too hard because there's not too many pieces
1:11 but they also drive a little bit of the features and changes that they accept or don't accept because well
1:17 maybe adding some minor change to the framework is not big it might have a big impact on the demo's documentation and so
1:23 you could file a thing about all these things. They definitely try to keep these very much in sync. I touched on this to the opening
1:28 but Pyramid is a fast Python web framework. It serves up things like templates and simple response generation
1:36 say Json API. Things like that really really quickly. To the extent that I've tested it which is not massively, but somewhat
1:42 you know look at the benchmarks and whatnot faster that Django, faster than Flask. So, that's pretty good right there. And, I also talked about serving
1:51 thousands of current users on 10 dollars of hardware prior, we've done it on 5, easily. So these things are great. And although hardware is cheap
2:00 you can scale out autoscale on the cloud. It's still overhead to maintain many servers, and sooner than you really have to.
2:08 So the fact that this is fast and quick really great. Pyramid is reliable. Like I said, I've been using it for 4 years
2:14 and it has been absolutely bullet proof. They have a 100% statement coverage for their unit tests. Their test coverage suite
2:21 so I've never had Pyramid break on me. From upgrading from version to version Not directly, maybe some of the dependencies
2:29 that I've sucked in but not Pyramid itself. So very reliable framework and they have the courage to ensure it stays that way.
2:37 And finally, it's open source. You know, what would you expect, right. What would you expect in a Python space of course it's open source.
2:43 But, it has a permissive license and it is open source so you can just grab it and run with it. Right here at github.com/pylons/pyramid
2:52 Those are the principals. I bet they resinate with you. I know they resinate with me, and it makes for a really nice framework.