RESTful and HTTP APIs in Pyramid Transcripts
Chapter: Web application building blocks
Lecture: Python web frameworks

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Are you about ready to write some code-?
0:04 I hope so, because we're about ready to pick a web framework
0:07 or at least compare them and go with Pyramid, right;
0:10 go with our web framework and start creating some basic services
0:21 If you work with Python day to day, you'll know it can do amazing things,
0:24 but a lot of people, they don't work with Python day to day,
0:27 and they may think well, maybe I should use some language X, technology X
0:32 to build these services or web apps.
0:34 Let me show you some amazing sites which of course
0:36 have many web services as part of the built with Python.
0:39 So the The Onion, the very funny
0:42 sort of satired news source, that's built with Python;
0:45 Spotify, their web app and some other services are built with Python.
0:50 Some of the other ones are written in Java, but Python's evolved here,
0:53 Nasa, Bitly, a lot of Bitly is powered by Python,
0:57 Atlassian Bitbucket, their web app is written in Python,
1:02 Survey Monkey, Quora, in my opinion, the best general Q&A site on the internet
1:08 that's written in Python, and they are very passionate users of Python,
1:11 they do a lot of writing about performance and things like that,
1:14 so very interesting to look at what they're doing with Python.
1:17 Disqus, these guys handle many many requests,
1:21 because they get embedded on all these different sites at the bottom
1:24 so they got to handle a ton of requests and that's done significantly in Python.
1:28 Instagram, Reddit, Reddit is largely powered by Python,
1:32 they use sqlalchemy core in the middle and they use Python for their web app,
1:37 YouTube is written in Python, handling several million requests per second,
1:42 we've got Pinterest, we've got PayPal, PayPal has some very powerful services
1:47 that get called several billion times a day, written in Python.
1:52 Dropbox is one of the largest users of Python, they have many core developers
1:57 including Guido Van Rossum, the creator of Python working there;
2:01 and of course, Talk Python, almost all of my stuff is written in Python,
2:04 the web apps and the services that they need,
2:07 I'll try to point those out when it makes sense during this course.
2:10 You will learn more exactly how these sites are using Python,
2:13 check out this link here at the bottom
2:18 and there is a nice article that highlights all of the usages and so on.
2:22 So when you're thinking of web frameworks,
2:25 and when you're building web services,
2:28 web services are really a subset of web frameworks, right
2:31 you are thinking of them there is kind of two different types of Python web frameworks,
2:35 and there's a couple of other distinctions maybe we should make
2:38 but let's keep to these two for now,
2:40 so on one hand we have the very small bring the building blocks that you need
2:44 in very small pieces, it's your job to find them, micro frameworks;
2:47 on the other we have large what I call building block frameworks,
2:51 where most of the stuff you need is there,
2:53 but you have less granularity in how you work with them,
2:56 kind of take what you get there,
2:59 and the building block side of things I'd say we have Django,
3:01 on the small side, we have Bottle,
3:04 other frameworks down here include Flask,
3:07 and somewhere in the middle of this world, we have Pyramid.
3:10 So we're going to be using Pyramid for this class,
3:13 and I think Pyramid is kind of the goldilocks framework,
3:15 it's a little more full featured than Bottle of Flask,
3:17 but it's not so much so that the conventions and stuff get in the way,
3:22 like Django comes with its own ORM, and yes you can use sqlalchemy with it,
3:26 but kind of have to fight the framework to do so, right.
3:29 Well not with Pyramid, use whatever ORM you want,
3:32 you can use whatever formatters you want for your services, things like that.
3:36 So Pyramid is really nice, especially if you are going to
3:39 also have a website component to what you're building,
3:42 not every service is 100 percent standalone,
3:45 maybe there's a website and some backend services
3:47 and the web site talks to the services,
3:50 and maybe mobile apps talk to the talk to the services, things like that.
3:54 So understanding some of the html side of the framework makes some sense,
3:57 because chances are you going to have some part of html in your service,
4:02 not everyone I know, but many of them
4:04 will have a little bit of html as well as their service story.
4:08 So Pyramid fits right in the middle here,
4:10 and I think that's a good place to work with.