|
| 1 | +00:00 Hello and welcome |
| 2 | +00:01 to this short mini course on |
| 3 | +00:03 the Responder web framework. |
| 4 | +00:05 Maybe you've heard of Responder |
| 5 | +00:07 it's written by this guy, he's done a few |
| 6 | +00:09 open source projects in Python |
| 7 | +00:10 his name's Kenneth Reitz. |
| 8 | +00:12 So, likely you've heard of Kenneth |
| 9 | +00:13 because of his Requests library |
| 10 | +00:16 and Kenneth is pretty well known |
| 11 | +00:17 for creating clean and well liked APIs. |
| 12 | +00:22 So, when he said hey, I know there's a bunch |
| 13 | +00:24 of web frameworks out there, but I'm going to |
| 14 | +00:26 create another one to put my stamp on |
| 15 | +00:28 what that API might look like |
| 16 | +00:30 well that got my attention. |
| 17 | +00:31 And probably it got your attention as well. |
| 18 | +00:34 So, if you want to see what this web framework |
| 19 | +00:37 that Kenneth Reitz came up with looks like |
| 20 | +00:39 and take it for a tour |
| 21 | +00:41 well you've come to the right place. |
| 22 | +00:43 Let's talk quickly about what we're going to cover. |
| 23 | +00:46 First, I'm going to talk about some of the key features. |
| 24 | +00:48 After all, with this mini course |
| 25 | +00:49 we're not going to be able to dive deep |
| 26 | +00:51 into some of the really intriguing things |
| 27 | +00:53 that this framework takes on, for example |
| 28 | +00:55 it has async run as background work |
| 29 | +00:58 that you can run in process. |
| 30 | +01:00 It has web socket support |
| 31 | +01:02 it has really good async methods |
| 32 | +01:05 that you can work with. |
| 33 | +01:06 And we're not going to dig deep into that |
| 34 | +01:08 but we will talk a little bit about it. |
| 35 | +01:10 We're going to go and build an async capable API |
| 36 | +01:14 and notice I didn't say async API |
| 37 | +01:15 because we're not actually going into async here |
| 38 | +01:18 that's well beyond the scope of this |
| 39 | +01:20 I have a very long course on that |
| 40 | +01:22 and you're welcome to take it and it's super, super powerful |
| 41 | +01:24 and it's one of the things that drew me |
| 42 | +01:25 to this framework, however we're not |
| 43 | +01:27 going to go into those details. |
| 44 | +01:29 If you know async in a way, all the view methods |
| 45 | +01:32 and API endpoints we create here with Responder |
| 46 | +01:35 you can put async def on the method |
| 47 | +01:37 and you can do await within it |
| 48 | +01:39 it's really, really great for scalability |
| 49 | +01:41 but again, we're not going into it. |
| 50 | +01:43 We're going to create two kinds of views |
| 51 | +01:45 or processing with this web framework. |
| 52 | +01:47 One is going to return templated Jinja2 based views. |
| 53 | +01:51 I'm going to go to the database to go to a data source |
| 54 | +01:53 and then I'm going to convert that into |
| 55 | +01:57 a dictionary, I'm going to pass that dictionary |
| 56 | +01:58 to a Jinja2 template, Jinja2 template's going to be |
| 57 | +02:01 rendered into rich HTML, that's great. |
| 58 | +02:04 The other kind are more HTTP API endpoints. |
| 59 | +02:08 Here we're going to do a get request |
| 60 | +02:10 or a post request over to an endpoint |
| 61 | +02:12 and return some kind of JSON. |
| 62 | +02:14 These JSON endpoints, they're fun |
| 63 | +02:16 and they're cool, but you know |
| 64 | +02:17 they just exchange little bits of data. |
| 65 | +02:19 Wouldn't it be fun if we had |
| 66 | +02:20 a really awesome app built around it? |
| 67 | +02:23 Why, yes it would. |
| 68 | +02:24 So, we're going to take an app that I built |
| 69 | +02:26 using Vue JS to explore this API |
| 70 | +02:29 and it's really fun, it's really interactive. |
| 71 | +02:31 Again, same reasons as async |
| 72 | +02:33 we're not going to go into Vue |
| 73 | +02:35 I'm going to show you how the app works |
| 74 | +02:36 I'll give you like the one minute flyer |
| 75 | +02:37 of Vue JS, but I will give you this |
| 76 | +02:40 rich application that works with this API |
| 77 | +02:42 that we will build during the class. |
| 78 | +02:45 Now, I said it a few times but I just |
| 79 | +02:46 wanted to remind you, this is a fast course |
| 80 | +02:48 we're just going to go really quickly |
| 81 | +02:50 into some of the key elements of Responder |
| 82 | +02:52 we're going to build some JSON APIs |
| 83 | +02:54 we're going to build some cool apps to consume it. |
| 84 | +02:57 Think we're going to have a lot of fun. |
| 85 | +02:58 So, with that in mind, let's just keep moving. |
| 86 | +03:00 Now, what do we expect you to know |
| 87 | +03:01 in order to take this class |
| 88 | +03:03 and get the most out of it? |
| 89 | +03:04 Well, Python obviously. |
| 90 | +03:06 We're not going to cover any of the foundations |
| 91 | +03:08 you don't know what a foreign loop is |
| 92 | +03:10 or things like that, there's other places |
| 93 | +03:12 you probably should start and then come back here. |
| 94 | +03:14 This assumes that you know like the majority |
| 95 | +03:16 of the core Python language. |
| 96 | +03:18 We're not doing meta classes and deep things |
| 97 | +03:20 but the basic Python syntax, you should |
| 98 | +03:22 definitely have that down. |
| 99 | +03:23 And it is a web framework, we're not going |
| 100 | +03:25 really deep into the foundations |
| 101 | +03:27 of what REST APIs are or why you care about them. |
| 102 | +03:30 Or what HTTP verbs are, we're going to assume |
| 103 | +03:33 you kind of are familiar with that |
| 104 | +03:34 and we want to build something in Python with Responder. |
| 105 | +03:37 These are the expectations for the course. |
| 106 | +03:39 And finally, let me introduce myself, who am I? |
| 107 | +03:41 Who's this guy talking to you? |
| 108 | +03:42 My name's Michael Kennedy |
| 109 | +03:43 that's a picture of me, you can find me |
| 110 | +03:45 on Twitter @MKennedy. |
| 111 | +03:47 You might know me from the Talk Python to Me podcast |
| 112 | +03:49 you may also know me from the Python Bytes podcast |
| 113 | +03:52 but most relevant for this conversation |
| 114 | +03:55 I'm the founder and one of the main authors |
| 115 | +03:57 at Talk Python Training. |
| 116 | +03:59 Welcome, welcome to the course. |
| 117 | +04:00 It's going to be a lot of fun |
| 118 | +04:02 and it's not going to take a lot of time |
| 119 | +04:03 so I think that's a beautiful mix |
| 120 | +04:05 and I hope you enjoy it. |
0 commit comments