Transcript #207: FastAPI as a web platform (not just APIs)
Return to episode page view on github00:00 Hello and welcome to Python Bytes where we deliver Python news and headlines directly to your earbuds.
00:04 This is episode 207 recorded November 4th, 2020.
00:08 I'm Michael Kennedy.
00:09 And I'm Brian Okken.
00:10 And this episode is brought to you by us.
00:12 We'll tell you more about that later.
00:14 Brian, how you been?
00:15 I am excellent today.
00:17 A little tired.
00:18 How about you?
00:18 Yeah, quite tired, actually.
00:20 Quite tired, but I'm doing all right.
00:22 Life goes on, and we continue to work from home and all those things.
00:27 and you know, luckily our industry and our tools were built for that world.
00:32 Yes, I'm very fortunate.
00:33 Yeah, absolutely.
00:35 So speaking of fortunate, I think we're fortunate that Sebastian Ramirez created FastAPI because we've talked about FastAPI before, it's super neat.
00:43 We've talked about Pydantic before, which is a really cool way to take data class-like things and automatically bind them with automatic conversion, validation and whatnot for data that just comes from a JSON dictionary somewhere or just a Python dictionary, but it often is JSON being submitted to a web, some sort of web API.
01:04 The reason I bring up FastAPI is I've been doing a lot of stuff with it, actually working on a series of courses around FastAPI as well, which is super exciting, and maybe I'll mention that briefly later.
01:15 But one of the things that bugs me about FastAPI is it's so API-oriented that it's tricky to know what to do when you just say, I just want to create a website that has like a couple of pages and then some API.
01:31 So for example, if you just create a couple of APIs now and they're like, say it's about weather, it'd be like slash API slash weather slash report API slash weather slash latest or whatever.
01:42 Right.
01:43 Well, if you just click the, you know, you run it, you just click the little link in your IDE or VS Code or whatever and open it, what do you get?
01:51 404. Probably not the best response that you could imagine. Is that like the default behavior is just to like open up the site and it says not found. So you got to like type in this stuff.
02:03 Anyway, it supports Jinja in like a sort of manual way, the same way that Flask does, I guess, more or less. But I wanted a better way to have HTML pages inside of my FastAPI app.
02:19 Because if you're going to build an API, there's a very good chance there's like two or three pages that you need.
02:24 Right? Yeah.
02:26 So I wanted to have a couple of things.
02:29 I would like to be able to have a simple function that is a view method.
02:34 Could be something that is like a HTTP endpoint for an API, but more likely it's going to be one of these pages.
02:40 And I want to just be able to have it return dictionaries and say that it takes some kind of template.
02:49 put a little decorator and say this one has a template home slash index dot html and it's automatically going to take that dictionary send it over to whatever template engine you choose, turn it into html and send it back.
03:00 You know, set the content type to be html, all of those things because by default it's JSON. Okay, so you'd like it to be the JSON data but have it be formatted like html.
03:10 Well, often with these templates what you need to do is like suppose you got a bookstore and you want to say here's the categories You have to somehow pass data over to like categories.html and it'll get like a list of categories and then you'll iterate over them and generate the HTML.
03:26 So that dictionary being passed over, that's the data that you're basically providing to the dynamic HTML, right?
03:32 So what I did is I went and I created this thing called fastAPI-chameleon.
03:36 - Oh, nice.
03:37 - So if you wanna use the chameleon template language, which previously was not really in any direct way supported, you could import all the libraries and just make it do it yourself, that's kind of painful.
03:46 Now you can just put a decorator, you know, from FastAPI underscore chameleon import template and just say at template and point some file at it and boom, you return a dictionary.
03:56 Now you have chameleon as your template language.
03:58 That's neat, right?
03:59 And also I found a way to write a decorator that will automatically adapt whether it's an asynchronous or a non asynchronous method, right?
04:08 Because normally the decorator, what it does is it has like a wraps and has an inner and then like the inner function does stuff and then calls the actual thing it's decorating.
04:17 Well, if the thing it's decorating is async, you gotta do one thing.
04:20 If it's not async, you gotta do another thing.
04:22 So how do you tell?
04:23 There's a cool library called inspect, which will let you actually look, even if it has a little wraps decorator that tries to lie to you about what it is, it'll show you whether or not it's a coroutine, which is pretty cool.
04:35 - Oh, nice.
04:36 - Yeah, so on top of this, Mark Brooks saw this and said, "That's awesome, but I don't really like, "I don't use Chameleon, I like Jinja." So he forked my repo and created a FastAPI dash Jinja.
04:47 So now you can do exactly the same thing if you like Jinja.
04:50 And guess what?
04:51 If there's someone out there that really, really wants to use, I don't know, Django templates or Mako or whatever, right?
04:57 That's like five lines of code away from doing that as well.
05:01 And the reason I think it's important to add these other template languages, not just say, well, it supports a Jinja, so you're good.
05:08 The reason I think it's important is if you've got some web application that has APIs, it already has chameleon templates, or in the other example that doesn't exist yet, some Django thing and you want to convert it to use mostly FastAPI, but you don't want to rewrite all the HTML, CSS, and JavaScript.
05:25 If you can make it render those templates, then it's so much easier to move from some other web framework over to FastAPI.
05:33 'Cause you don't have to touch the HTML, you don't have to touch the CSS, you don't have to touch the JavaScript, there's just that middle part where you handle the request, and that's actually pretty limited.
05:41 So that was my idea for creating this, was hopefully to make it possible for people who have other stuff written in Chameleon to move to FastAPI really easily, and then also just to sort of inspire a cleaner programming model.
05:53 - Yeah, I actually was gonna ask you if it was possible to do something like that with Jinja, and you already answered that.
05:58 - Yeah, yeah, actually it's built in, but the way it's built into FastAPI is not with a template decorator.
06:05 It's, you actually go in and you say the actual file name, and then you pass a bunch of, It's like, it's not super clean.
06:11 So it is quite clean the other way around, which is cool.
06:15 - Yeah, nice, cool.
06:16 - Carrying on about APIs.
06:18 - Yeah, maybe a little less clean of a way.
06:21 So yeah, we've been very excited about FastAPI recently for APIs.
06:27 And in the Django world, there's the Django REST framework is quite popular.
06:32 But what if you just want to use vanilla Django and write a REST API?
06:37 Adam Johnson took that on and said, Yeah, of course you can do it, but you can also do it in one file.
06:42 So we're gonna link to a little article where he has a simple REST API completely written in one file as a one file application.
06:51 It's a little API that gives you information on the characters from Rick and Morty, specifically just Rick and Morty, and that's it.
07:01 But it's a good example.
07:02 I like it.
07:03 It shows you how you can do redirects.
07:06 And so like for instance, the endpoint, one of his endpoints is characters.
07:12 So if you type your application slash characters with a slash at the end, it should return a JSON data with the information about Rick and Morty.
07:22 Now, what if you just don't put anything?
07:25 If you put characters without the slash or don't put characters at all, like your homepage thing, he shows you how to do redirect so you can redirect to characters.
07:33 And, you know, it's a pretty simple example, but it is kind of neat that you can do it off the shelf JSON or off the shelf Django.
07:40 He also shows, he's got some hard-coded data classes within the application, but it's easy, you know, not that difficult to imagine you can extend that to something that reads it out of a database or some other part of your system.
07:53 Yeah, absolutely. And it's like 63 lines of code, which is not too much for a non-trivial little example API.
07:59 You know, I'm not necessarily on board of putting this in one file, But I am on board with this idea of like these simplified things.
08:06 You know, when you hear about Django, you always say, okay, if I want an API, I'm going to have to add Django rest framework and all these other things to it.
08:15 If say you're in flask and you want to work with users, like, well, I've got to add the flask SQLAlchemy add in.
08:21 I've got to add the flask users add in as an extension.
08:24 And maybe I want session.
08:25 So I got to add flask session.
08:26 Like none of those things are necessary per se, especially on the, on the flask side, like there's so much of it.
08:32 It adds like one or two lines of code that you don't have to write.
08:35 And now you have all the overhead of depending on making sure that that thing works right.
08:39 And the way you work with it is the way you want.
08:41 And so having just a, here's the bare bones view and you can add in stuff if you like.
08:45 I'm a fan of that.
08:46 Yeah, I'm also thinking like, let's say you have a Django application already.
08:50 And you built it not intending anybody to use it as an API.
08:54 And somebody says, like maybe an internal application in your business or something.
08:58 And somebody says, oh, this data here where this graph is.
09:01 Can we get that as an API so that we can use it in something else?
09:05 And this would be a good example to be able to just add.
09:10 You can use Django REST framework, of course, but if there's just something simple you need to add as an API, this is a way to do it.
09:16 Yeah, no, it's cool.
09:17 And I do feel like these add-ons and these extra layers that you add, they better add a ton of value because they're also adding overhead and dependencies and breaking changes and all that.
09:28 So if you've got something working You want to just add a little bit of, you know, here's a few JSON endpoints.
09:32 Let's do that.
09:33 Yeah.
09:33 And for people that really enjoy this article and want to hear more from Adam, I've had him on Test and Code a couple of times.
09:40 So we'll drop links to those episodes in the show notes.
09:42 Now, before we get to the next one, which is a pretty big item, I just want to say this episode is brought to you by us.
09:50 Of course, it's over at Talk Python Training, Test and Code Podcasts, and something to do with pytest.
09:56 Do you do anything with, I heard that pytest is a thing that people use.
09:59 Do you do anything with that?
10:00 Yeah.
10:01 So, yep.
10:02 Wrote a book on pytest.
10:03 I still think, and I still get callouts on Twitter saying it's the best book they've read to get started with testing, and they got excited about testing with reading Python testing with pytest.
10:15 So, it's a good book.
10:16 Yeah.
10:17 Awesome.
10:18 Yeah, and over at Talk Python Training, I'm now working on a three-part series, so like three, four-hour sections or so, on building FastAPI APIs and also like testing them and and put it in production and fun stuff like that.
10:30 - Oh, that's exciting.
10:32 Can't wait to watch that. - Yeah, that'll be fun.
10:33 Yeah, yeah, it'll be super fun.
10:34 So anyway, that's coming.
10:35 People can go over there to training.python.fm, sign up to get notified and visit Testing Code and listen over there as well.
10:43 We also have Patreon, right?
10:44 - Oh yeah, so had somebody reach out to us for the Patreon and say, "Hey, you guys mentioned "that a whole bunch of people sponsor you "for a buck a month," but they said, "That's the only tier you have." And so Michael and I are definitely gonna talk about in the future, whether we should add some more tiers.
11:01 However, there is an option, even if you sign up for a dollar a month, if you want to send us more, you can change that within the Patreon thing.
11:10 So we'd appreciate it.
11:11 - Yeah, much appreciated to everyone who supports us in all the ways.
11:14 Every way is valuable and appreciated.
11:16 Speaking of valuable and appreciated, we often talk about the Stack Overflow Developer Survey.
11:21 I mean, in my mind, there's two major surveys that take the pulse of the developer community.
11:26 One is the Stack Overflow Developer Survey.
11:28 The other is the PSF survey, which by the way, just got extended to three more days.
11:33 By the time this comes out, that'll be already in the past.
11:36 But you know, that's hopefully people have taken that.
11:38 We've talked about it before.
11:40 And we talked about the 2020 Stack Overflow survey coming out, I believe, and I told folks to go take it, or you did, and then we just didn't follow up, right?
11:50 But the survey results are out, so I thought it might be fun to run through the survey results.
11:53 - Yeah.
11:54 - Yeah, and I just want to be clear, like I kind of lost track of this.
11:57 I don't know exactly when this came out, but it's not brand new.
12:01 It's like four, five, six months ago.
12:05 But I just, you know, we didn't talk about the results.
12:07 We just talked about the survey.
12:09 So let's run through some of the things that are here.
12:11 Now, the 2020 Stack Overflow survey is focused a lot on demographics and background and education and all those sorts of things.
12:20 And if you're interested in that, definitely go check it out.
12:23 There's a lot to see there.
12:24 Just because of the format.
12:25 I'm gonna focus mostly on the tech side that they covered here, okay?
12:29 So not whether we have a full-time job, how many of us work from home, none of that.
12:33 So some of the most popular technologies, and I just want to point out, I think the PSF survey and the JetBrains folks who worked with them to put that together is in a much better place.
12:42 This is a wacky, wacky, wacky survey, but it does have some good questions.
12:47 - Yeah.
12:49 - I'll expand on the wacky a sec.
12:50 But if we look at the most popular languages, most popular technologies, web frameworks, database and so on, certain languages.
12:57 We have JavaScript, Python, and Java and JavaScript has 68%.
13:04 Python has 44%.
13:05 Java has 40%.
13:06 That's good.
13:07 Right?
13:08 I mean, like everyone knows JavaScript is pretty popular.
13:10 So what's, what's wacky here?
13:12 Why is this weird?
13:13 And I'm not necessarily saying there's not 68% of the people doing node JS.
13:18 They may well be, but do you know what language is between JavaScript and Python?
13:22 CSS.
13:24 Dude, I know no application that is shipped running on CSS.
13:28 I can't even compile CSS.
13:30 I could probably compile SAS or less over to it, but I can't compile CSS to a running application.
13:34 It's not a programming language.
13:36 And SQL perhaps is true and complete, but yeah.
13:39 And SQL, SQL is a thing you use within a language.
13:41 It is not a programming language that builds things.
13:45 Right.
13:45 So they have this, this is what I was talking about where it's wacky and JavaScript is in this world.
13:49 Right.
13:50 They needed to ask very, very clearly, do you work exclusively in JavaScript as a Node.js developer or a pure front-end developer, or did you check, I also use JavaScript and CSS and Python, or I also use JavaScript and CSS and Java.
14:08 Right.
14:08 And so the JavaScript one has like bundled up all these.
14:11 I do anything in the web on any language plus the Node.js developers.
14:17 Right.
14:18 I think the contention there is a little bit closer, but it still wouldn't surprise me if JavaScript was actually in the lead.
14:24 I don't know.
14:24 I feel like I'm all hyped up on like percentages and trajectories given all this election talk that we just went through.
14:30 Well, I remember checking the box for JavaScript once and like, yes, I use JavaScript.
14:35 Yeah, exactly.
14:35 What does that mean?
14:36 I have an app that does use a little bit of JavaScript and I looked at the code once.
14:41 Right.
14:41 Did you do dollar document dot ready?
14:43 Okay.
14:45 You're a JavaScript developer.
14:46 Like not really.
14:47 Yeah.
14:47 So yeah, on the other hand, if you built an app with Vue.js or Angular, you're a JavaScript developer.
14:52 If you built something with Express and note, you're a JavaScript developer.
14:55 So I think it's a little bit weird that they didn't like really clearly.
14:58 Make that distinction because you can't put two buckets and add up those numbers next to other buckets and make that make sense, right?
15:07 CSS is the same thing.
15:08 Like no one would check it.
15:09 If you said I primarily code in CSS to build apps and ship on the CSS platform.
15:14 Anyway.
15:15 Okay.
15:15 So web web frameworks.
15:17 You know what the most popular web framework is?
15:19 Well, I do now that I just looked.
15:21 Do you believe it?
15:21 I wouldn't have guessed this.
15:22 Do you believe it?
15:23 No.
15:24 It's jQuery.
15:25 Nobody--
15:27 How could jQuery be in the same category as like Django?
15:30 Yeah, yeah, yeah.
15:30 It's even on the front end side of the JavaScript front end framework.
15:35 There's Vue, there's Angular.
15:35 All those are really legitimate things.
15:37 jQuery is not the primary way in which people write web applications.
15:42 But a lot of people use it, so it's in there.
15:43 All right, so anyway, those two are a little bit weird.
15:45 I take away Python is really quite popular and up there, the Python web frameworks, I think there's just so many, they don't filter very high to the top individually.
15:54 Databases is much clearer.
15:56 You know, you don't have to talk about other funky stuff.
15:58 So for the most popular ones, we have my SQL at 56%.
16:03 Postgres SQL at 36%, Microsoft SQL server at 33% and MongoDB at 26%, which is actually pretty high in my understanding in the world, but that's, That's pretty cool for platforms as a developer.
16:16 I work on not.
16:17 I deploy my code too.
16:19 We have windows at 46% macOS at 28 and Linux at 27.
16:24 So again, most common platform for development is windows.
16:27 So we can't forget them when we build our packages and whatnot.
16:30 Right.
16:31 Steve Dower goes on and on about that.
16:33 Yeah, it's good.
16:33 My favorite part of this, these surveys though, that these are legitimately good is the most loved and the most dreaded, the most wanted section.
16:42 So the most loved languages are Rust, TypeScript and Python.
16:47 Those are TypeScript personally drives me a little bit crazy because it's like so picky, it's like the type annotations, but you don't get it exactly right.
16:55 You're just not going to work.
16:56 Anyway, it's still pretty neat.
16:58 Rust I would like to learn Python.
16:59 I know something about the most wanted languages I think is also interesting.
17:03 So most loved is I work with it and I love it versus I dread it.
17:06 Or I don't get to work with it very often.
17:08 I'd like to do more is the number one, Python, number two, JavaScript, number three, go, go figure.
17:14 Nice.
17:14 Yeah.
17:15 Most dreaded VBA and objective C.
17:18 Does that surprise you?
17:21 Well, in pearls, number three is still interesting.
17:25 It still brings dread.
17:26 So that's the languages.
17:27 And then the databases most loved Redis, Postgres, Elasticsearch.
17:32 Again, Elasticsearch is like CSS a little bit to me.
17:34 Is that really a database anyway?
17:36 And MongoDB.
17:37 So those are all quite high.
17:40 Most wanted database is MongoDB and Postgres are neck and neck at the top.
17:44 - Okay, and you still do both, you do a lot of Mongo, right?
17:47 - Oh yeah, I love Mongo.
17:49 That thing's sweet.
17:49 It's so clean and easy to work with.
17:52 It's been years since I've had to do a database migration in production.
17:55 I love it.
17:56 As in, like I change my schema, now the app won't run unless I apply the script.
17:59 Yeah, so anyway, rounded out, most dreaded database, IBM DB2.
18:05 Doesn't surprise at all.
18:07 Anyway, that's the survey.
18:08 I just want to give a shout out or like a call to the community.
18:11 If you're, if you have any influence on this, find a way to separate.
18:15 Things that are unequal, right?
18:18 Don't put just, I do some JavaScript from, I do some C++ those are not equivalent, or I do some J query and angular and I do Django.
18:28 Those are just not even in the same category.
18:31 And it really drives me crazy that they're put this way.
18:33 And it just makes me appreciate the Python software foundation survey more.
18:36 because it had less of this weirdness.
18:38 Yeah.
18:39 Yeah.
18:39 There's some weird things that get bucketed together.
18:42 Yeah.
18:42 Interesting.
18:43 I would say the PSF one is more regular, wouldn't you say?
18:46 More regular.
18:47 Oh, yeah.
18:47 Nice transition.
18:49 Thank you.
18:50 But before we move on, there was another...
18:53 and nobody else will care about this but me, but what was the other survey that is closing in a couple days?
18:58 The PSF survey.
19:00 The one at python.org, I believe.
19:02 Let's see if it's still up there.
19:04 I don't know where it went.
19:05 But yeah, yeah, it's right there the in the middle Can I mail in my ballot and get it as long as it's postmarked in time?
19:11 Well, if you postmark it at the right time, yeah Sorry couldn't resist so regular expressions So I'm sure we've talked about regular expressions before but they occasionally crop up in my work. I always forget them I learn them and then I forget them. I have to learn them all over again. So this is gonna be helpful yeah, so Amit Chaudhry, I think wrote a visual guide to regular expressions and And this came out recently and this is kind of a very nice gentle introduction to regular expressions by building up, and I think it helps you build up a correct mental model of how they work by, he utilizes visual highlighting as if he kind of went through with a highlighter pen and highlighted the different things that could be matched.
19:54 So it goes through a whole bunch of stuff.
19:56 Starts with just a specific character.
19:58 So like if you have a string and you're matching the character A or something like that, what would it hit? And then moves on to white space and digits and word characters.
20:09 And a lot of these gentle introduction type things come to go through some of the basics and then sort of stop there. And what I really love about this is he talks about some of the more advanced things like pattern negations so like the and why they're why they're weird like /D is digits /D is everything that's not a digit and some of these exclusions talking about anchors like beginning and the end of the line, character sets with brackets, and then ranges with a dash within the ranges. You're talking about repetition, and this is kind of something that threw me off when I first learned about them. Using curly brackets, I was used to using star for zero or more items and plus for one or more item. I think, or maybe it's the other way around. Yeah, that's right. And then, but you can use a question mark for it only can be one, but it can be there or it doesn't have to be.
21:04 And then if it has to be a certain number of times, you can use curly brackets for saying it needs to be two of these or something like that.
21:11 And then it goes on and says, okay, well now you've learned all this stuff.
21:15 How do you put it in place with Python?
21:17 And with Python, you use one of the ways is the RE module for regular expressions.
21:24 So it goes through a quick example of using find all, match and match group and search.
21:29 So if you're a Python developer and you have to deal with some regular expressions, I think this is definitely something to check out.
21:34 - Yeah, it's really nice, and it's a very gentle introduction, so people can just go through and the coloring and stuff.
21:41 Yeah, 'cause normally a lot of these presentations of regular expressions, man, it's like write only.
21:50 You know, you look at it, like, whoa, that is a mess, and then, you know, then it's gone.
21:54 Like you could write it, but you couldn't go back and read it again type of thing.
21:57 - Yeah. - Yeah.
21:59 Yeah, so this is nice, this is good.
22:00 - Yeah, cool, nice one.
22:01 - Yeah, I can't take credit for that one though.
22:04 Somebody else wrote it.
22:05 - You probably shouldn't take credit for it.
22:07 Did you create it?
22:08 I mean, you probably shouldn't.
22:09 - No, I just brought it up.
22:10 - So I don't really know the whole story with this next one, but I entitled it Taking Credit.
22:16 And this was based on a GitHub project and a tweet by Tim Nolet.
22:21 Tim Nolet, I'm not entirely sure how to say his name.
22:24 Hopefully one of those works.
22:26 And he created this project, which is called, check it out, Headless Recorder over a Playwright, I believe.
22:34 Let's see.
22:35 It is.
22:36 Yeah, it's called Headless Recorder.
22:37 And so what it does is it allows-- it's a Chrome extension that allows you to create scripts that interact with either Puppeteer or Playwright that do just like web automation.
22:48 A little bit like non-programmatic Selenium or those types of things, right?
22:54 Yeah.
22:54 Fine.
22:54 That's all cool.
22:55 So there's a bunch of JavaScript that you write in there that's pretty interesting.
22:58 And the tweet says, I'll just read the tweet and then we'll go from there.
23:02 It says, "Oh, AWS Cloud, I really do love you, but next time you fork my open source project and present it as your new service, please give the maintainers a short, nice, good job, kids or something.
23:13 I mean, it doesn't necessarily have to follow the APL version 2 license and stuff, but at least a little credit would be great." Wow.
23:20 So, there's also a linked announcement about this thing called AWS CloudWatch Synthetics launches a recorder to generate user flow scripts for canaries, which is, you look at the syntax in the examples, it does now say credits based on headless recorder at the bottom.
23:38 But I'm pretty certain that it didn't say that in the beginning.
23:40 I mean, I don't have like a diff of the web page, but it would not be surprising.
23:46 I wouldn't think he would put that up there if at the bottom it said that.
23:48 So now it does.
23:49 Anyway, this is not relevant to this project really at all.
23:54 It's more just a conversation about what do you do when big companies adopt your open source project but don't give you credit.
24:01 I think that's lame.
24:02 Well, I think it should be even more than that.
24:04 I mean, I think anybody that personally, if somebody else, if I had, like let's say I have got a couple of small projects that I don't really do much with and if somebody else took that and forked it and then like did something big with it and started making a startup or some money with it, fine, good for them.
24:22 But if it's a big company like Amazon.
24:25 - It's a Google, Microsoft, Apple, AWS sort of thing.
24:29 - Anytime I think credit is due.
24:31 If you're not the one that came up with it, if you just forked it and ran with it, I think giving some, and that's typical.
24:36 I mean, we often give credit to say, "Hey, I ran with it, it started here, but I did a whole bunch." That's fine.
24:43 But a big company, I think they should both give credit and I think some cash should go to the original idea starter.
24:50 So.
24:51 - Yeah, I hear you.
24:53 If it's not cash, which, you know, that might be a hard sell, how about as we maintain this project, we sort of forked from your stuff, we'll push changes back to make yours better, right?
25:05 At least some sort of, hey, we've based this on your thing, but by doing so, we're gonna make that thing better because we've made a commitment to at least, you know, do a little bit of give back PRs improvements, right?
25:19 And also, I don't know, like, I don't know this guy, but at the AWS reInvent conference, when they announced this, if they said, "Hey, this is based on this cool project by Tim," you know, that would raise his profile, and I'm sure he would really appreciate it.
25:33 Personally, a lot of my stuff's under MIT, and so people don't have to mention me, do anything, say anything, whatever.
25:38 A few things are not, but it's, you know, a lot of it's just example code, and people are like, "Well, can I use this example "in my commercial application?" I'm like, "Yes, I really don't care if you like recreate my random sample in your project, that's fine, right?
25:50 I don't want anybody to have those feelings, but if I was building something useful, I'd at least want, you know, a shout out.
25:56 I guess that's all he's asking for as well.
25:58 Yeah.
25:58 Anyway.
25:58 And they did it.
26:00 So that's good.
26:00 They did come around and do it.
26:01 Yeah, they did.
26:02 I had pretty sure that was not the beginning situation, but now it is.
26:06 And so that's, that's quite good.
26:08 And just given the amount of people who are in the Python space, who listen to podcasts, they do open source.
26:13 I thought this story would be interesting, even though it's technically JavaScript. Yeah. Yeah. I bet you could even write that JavaScript on a Raspberry Pi, Brian.
26:20 Maybe. So I was just curious, what was the first computer you programmed on?
26:26 So the first computer that I programmed on was one of those Apple IIe's that was beige and had a green screen, I believe. Okay. You started on a IIe as well.
26:36 Yeah, but that was like in middle school or now maybe even elementary school, where it was just, you know, something I went for class. The very first thing that I actually, actually got to sort of sit down and program on, my brother had a Commodore 64, but I didn't really use it for anything constructive. I would say a 286, IBM 286. Okay. I programmed a 2E, Apple 2E at school, but I wasn't, it was confusing enough to me that I didn't run with it right away. I kind of dropped Programming after that but but anyway, I bring this up because I there's a new computer out and it reminded me of this About the those early computers. So are the Commodore 64 is kind of the same category So Apple to II was kind of like cool was yeah, it was at higher end I had to our Commodore 64 was a little bit lower than 2e I guess I would think and then below that is the TRS-80 from Radio Shack. That's what I had I had my but anyway, so the the Raspberry Pi 400 is out now or it's Announced and it's going to be out by the holidays apparently It's really cool. It's like it kind of reminds me of these Apple to ease because it's the it's the computer in the keyboard so the the keyboard is the computer and You can even hook up two large monitors to it because it does it could supports two displays 4k video It'll do two 4k monitors out of your keyboard. Yeah, and That's cool. This one's got four gigabytes of RAM You both do Wi-Fi and lands as a hard landline entry point, which is good for core 64-bit processor It just looks fun. They're telling us as a whole kit for like a hundred bucks So you get like you can start somebody up on a computer I'm covering this cuz yeah, that's super neat I was thinking geez do I want to get this for my kid or do I want to get it for me?
28:29 Yeah, exactly and it comes with a beginner's guide and shows you how to get started and even includes getting people a little bit Started on Python and apparently so that's good. Yeah, it seems super neat and the processor is pretty good Actually four core four gigs of RAM and it looks like just one of these little, you know Wi-Fi USB like over the little RF or radio frequency dongle thing Keyboards that you would get But that's the whole computer on the back of the keyboard. It's got the HDMI ports. It's got the other ports the power everything Yeah, so you gotta get your own monitor, of course But plug it in and you can get started and there's videos on the on the Raspberry Pi site that are Amazing watching this thing go it's it's powering two big monitors and it just feels looks like it's a zip as a normal computer so I think it'd be helpful for educational use and lots of uses.
29:23 So it's pretty nice.
29:24 - Even for just a travel computer.
29:26 - A travel computer, yeah.
29:27 - Right, imagine when, remember when people left their house?
29:30 So imagine it were like that again, and then you could go places.
29:33 But if you were just going on a trip and you're like, "Ah, maybe I'll just like, "need a computer I wanna plug in." And they'll bring you a HDMI cord, plug it into the TV at the hotel, plug it into some sort of monitor at like some office you're dropping in on.
29:46 You could just take that and have, You know, do presentations and stuff out of it.
29:50 It's cool.
29:51 - Yeah, 'cause, well like, that's true, 'cause the HDMI output, it's a lot of TVs just take that now too, so.
29:57 - Yeah, exactly, just bring a little short HDMI cable with you if you need to, and then you're good.
30:00 - I'm including a, linking to a video from Leigh Moore Freed from Agerfruit, in there she says that it reminds her of the Apple IIe as well.
30:07 - Nice, I'll check that out.
30:09 Super cool.
30:09 So, that's our main items.
30:11 That's quite an adventure.
30:12 Brian, you got any other things you wanna just throw out there real quick?
30:16 quick thing I got reminded of ran across this a while ago and I somebody reminded me of it on Twitter recently is a Vim Adventures it's Vim dash adventures dot-com remember the dash but it's a kind of like this adventure game like these old going through a dungeon sort of thing and picking up treasure and things like that and you just is to help you practice your Vim key bindings while playing an adventure game so if you're having trouble getting learning Maybe try this.
30:46 Yeah, that looks quite cool actually.
30:48 It's a neat little adventure game.
30:50 Now, I just want to throw out something I got from Tyler Pettersen just a little bit ago.
30:56 And this kind of comes back to the language talk around Stack Overflow that I mentioned. And this is an update for the TIOBE index.
31:04 T-I-O-B-E index for November 2020.
31:06 And my feeling and my theory is that Things like stack overflow and whatnot.
31:17 Those places are often measuring like the pulse of the industry right now.
31:23 Whereas TIOBE seems to have a little bit of a latency.
31:25 Like how many legacy apps of this style are you working on and this technology and whatnot, right?
31:30 So it's a little bit of a longer term moving average.
31:34 Well, anyway, the headline is, November headline, Python is unstoppable and surpasses Java.
31:39 For the first time since the start of the TIOBE index, nearly 20 years, Java and C don't make up the top two positions.
31:45 Okay.
31:46 In 20 years.
31:47 Wow.
31:47 So, Python's not on top, but it's right below C.
31:50 It's right below C. And it's, you know, it's been a long time coming, right?
31:54 So, anyway, I think this is pretty neat.
31:57 And, Tyler, thanks for sending that along.
31:59 People can check it out.
32:00 Yeah.
32:00 Cool.
32:01 Ain't no joke.
32:02 But how about a joke?
32:03 A joke would be great.
32:04 All right.
32:04 So, we've got a cartoon, but this one is, super simple.
32:07 And I think just the, the words will do it.
32:09 So this is from geek and poke, which has some fun things.
32:13 And the title is you build it, you run it.
32:16 It's all about microservices.
32:18 Okay.
32:18 So there's a woman developer and a guy developer just kind of staring at each other and it says, when we decide to create a new microservice, we just need 30 seconds to get a blank microservice running in that Kubernetes cluster.
32:31 So amazing.
32:32 And they kind of stared each other for blankly for a minute.
32:35 Then the woman says, and what you just need a, another, week to come up for with a funny name for it two weeks two weeks as the guy Yeah, yeah anyway, I thought people were running funky named microservices would definitely appreciate that one Yeah, name is the hardest thing in programming. That's right. It sure is All right, but not this podcast. That was a lot of fun. Thanks for being here. It was yeah. Thank you Yeah, you bet. Bye. Bye. Thank you for listening to Python bites follow the show on Twitter via at Python bites That's Python bytes as in B Y T E S and get the full show notes at Python bytes dot FM If you have a news item you want featured just visit Python bytes dot FM and send it our way We're always on the lookout for sharing something cool on behalf of myself and Brian Okken. This is Michael Kennedy Thank you for listening and sharing this podcast with your friends and colleagues