Python for the .NET developer Transcripts
Chapter: Web frameworks
Lecture: Python web apps introduction

Login or purchase this course to watch this video and the rest of the course contents.
0:00 This is a chapter I'm super excited to present to you.
0:03 So far we've been building little, tiny
0:05 command line-driven applications
0:07 and those were fun and I think we built some cool things.
0:10 But now we're going to build some true
0:12 beautiful applications as web apps with Python.
0:17 Web development in Python is pretty special.
0:19 It's actually one of the two areas
0:21 where Python truly shines.
0:24 Python is great at a lot of things.
0:25 It's especially great at developing web applications.
0:29 Now I can hear what you're thinking
0:31 and I've come from your space
0:33 and I know entirely how it feels.
0:36 C# is compiled to intermediate language
0:38 that intermediate language is JIT compiled
0:40 to machine instructions.
0:41 Even ASP.NET templates are compiled down into assemblies
0:45 which are then JITed into machine instructions.
0:47 Surely ASP.NET is clearly a better choice
0:51 than whatever we're going to choose for Python.
0:53 It's going to be faster, it's going to scale better.
0:55 That's a totally reasonable line of thinking
0:57 but it's actually super far from the truth.
1:00 Python is really good at web development.
1:02 Deployment is fast and easy.
1:04 Deployment on Linux is basically the default.
1:07 Means super-cheap cloud hosting, easy dev ops.
1:11 The web apps actually perform incredibly well.
1:13 If you look at what web applications are built with Python
1:17 there's a bunch that would surprise you.
1:18 Reddit is built on Python.
1:20 Quora, the Q&A site.
1:22 YouTube, YouTube is built on Python
1:25 and they have millions of requests per second.
1:28 Per second. Even the site that you're looking at now
1:32 or if you're on one of the mobile apps
1:33 the site that the mobile app is talking to
1:37 This site is built in Python, as you would expect, right?
1:41 But I can tell you it's an absolute joy to work with.
1:43 The performance is incredible.
1:45 It gets literally millions of data-driven requests
1:49 through the web framework in Python per month.
1:52 And yet, if I log in, the CPU level's at like 2%.
1:54 The response times are low milliseconds.
1:57 10, 20 milliseconds for data-driven requests.
2:00 It's really, really cool.
2:02 So, if you're wondering about whether Python
2:04 makes sense for web development
2:06 just put that on hold, suspension of disbelief
2:08 that sort of thing, move it to the side, and enjoy this.
2:12 Because it turns out Python is actually
2:13 really a good choice for web apps.