Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#454: It's some form of Elvish

Published Mon, Oct 20, 2025, recorded Mon, Oct 20, 2025
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: djrest2 - A small and simple REST library for Django based on class-based views.

Michael #2: Github CLI

  • GitHub’s official command line tool
  • Features
    • Checking out a pull request locally
    • You can clone any repository using OWNER/REPO syntax: gh repo clone cli/cli
    • Create a pull request interactively: gh pr create
  • See all at cli.github.com/manual/examples

Brian #3: caniscrape - Know before you scrape. Analyze any website's anti-bot protections in seconds.

  • reddit announcement and discussion

  • caniscrape checks a website for common anti-bot mechanisms and reports:

    • A difficulty score (0–10)
    • Which protections are active (e.g., Cloudflare, Akamai, hCaptcha, etc.)
    • What tools you’ll likely need (headless browsers, proxies, CAPTCHA solvers, etc.)
    • Whether using a scraping API might be better

    This helps you decide the right scraping approach before you waste time building a bot that keeps getting blocked.

Michael #4: 🐴 GittyUp

  • Never forget to pull again: Automatically discover and update all your Git repositories with one command.
  • Built initially to solve this problem
  • Rebuilt and published last week as part of my upcoming Agentic AI Programming for Python course. Get notified this week at training.talkpython.fm/getnotified
  • Update everything in a folder tree with gittyup
  • Review changes, blockers, etc with gittyup --explain

Extras

Brian:

Michael:

Joke: Some form of Elvish

Episode Transcript

Collapse transcript

00:00 Hello and welcome to Python Bytes, where we deliver news and headlines directly to your earbuds.

00:06 This is episode 454, recorded October 20th, 2025. I'm Michael Kennedy.

00:12 And I'm Brian Okken.

00:13 And this episode is brought to you by us. We have increasingly more monotonically increasing

00:19 number of ways in which you can support us and things that Brian and I both feel like

00:23 contribute a lot of value, right? Your pytest book, your pytest courses,

00:27 All the courses over at Talk Python, foreshadowing, some of that's coming later as well.

00:33 The Patreon supporters, pretty much all of these things.

00:36 We create them not just so that we have a job, but also because we think the world needs them.

00:41 We appreciate when you all agree with that and support them.

00:43 You want to connect with us, connect on social media or on most of the social media.

00:47 There's the links at the top of the show notes.

00:50 Join us live right now, Monday, just after 10 o'clock.

00:54 Typically, it's when we start live streaming, although sometimes it varies.

00:57 So subscribe to the YouTube channel and get notified there to make sure you get all the notifications.

01:03 But typically we aim for Monday at 10 until further notice at least.

01:07 And finally, subscribe to the newsletter.

01:09 We're putting a lot of effort into sharing a really nice, rich, extra bits of information

01:14 out to the newsletter there every week.

01:15 So appreciate that going out.

01:18 And I think it's been, we put a lot of work into this, Brian.

01:20 I mean, a lot.

01:21 So I'm ready for a rest.

01:22 Take a little rest.

01:23 How about you?

01:24 Yeah, yeah.

01:25 We should take a rest.

01:26 maybe with a REST framework.

01:27 Oh, because sometimes you need a whole framework to REST.

01:30 You're that tired.

01:31 Yeah, so let's pop this up.

01:33 So we've got an article.

01:36 This is sort of going backwards because there's a new package out

01:41 that I want to talk about, but it's based on this article from Emma Levitt.

01:47 Why in 2025 do we still need a third-party app to write a REST API with Django?

01:54 So and third-party apps we're talking about is usually Django REST framework or Django Ninja.

02:02 Increasingly more people are reaching for Django Ninja.

02:05 But, you know, both are great choices.

02:07 And but still, like, why do we have to have an extra REST framework with if you already have Django?

02:15 And the basically the gist of this article is, no, you can you can create and with all the built ins.

02:22 And this is using the class-based views to build a CRUD app, a CRUD API with Django.

02:31 And I actually kind of love this.

02:33 There's comments at the end also.

02:37 I kind of love the article talking about doing everything that's necessary to, it's not that much,

02:42 it's just not that much code to create a JSON REST API through, yeah, through Django without anything extra.

02:50 And down in the comments, some of the folks are like, well, why would you do this if you already have these others?

02:58 And of course, it's that you can.

03:03 That you can, but also that when you understand how you could build it with just the tools here, then it helps you understand how to use the other tools like Django Ninja.

03:15 So the reason why I'm bringing this up now, this is this, I think this article was from like March, April or something like that.

03:22 But she went ahead and DJ Rest 2 is now available.

03:29 And that is, if you scroll down to the bottom of it, it is her, is designed to be a minimal yet powerful Rest framework.

03:38 but it's around this article of why do we need an external app for REST,

03:43 which is kind of funny that she created an external app for REST too,

03:47 to demonstrate that.

03:50 But it's all the code from there.

03:52 And it's really great to be able to learn about REST frameworks

03:57 through trying something smaller scale.

04:00 So I like it.

04:01 Awesome.

04:01 Yeah, I'm with her on this.

04:04 You don't necessarily need a framework.

04:06 I know there's great frameworks.

04:07 like there's FastAPI and others and no shade on those things.

04:11 But if you already have a web app, you already have a framework that is serving web stuff.

04:16 And do you really want to say, well, now we're going to do a completely different one because

04:19 I need the response to be JSON?

04:21 Not necessarily, right?

04:23 It's all the APIs that power the talk Python mobile app are written in pyramid.

04:29 They're not using FastAPI because the whole app was already pyramid.

04:32 The data, everything it needs to know about the users and the data and the course, it's

04:36 all in there.

04:36 And all I had to do is write a JSON serializer that would take a dictionary and turn into the right kind of JSON.

04:42 And literally, I have an API.

04:43 You know, a lot of these frameworks, I don't like them.

04:46 I'm not knocking on any particular.

04:49 But these add rest to your thing so often become what that means is an HTTP view of your database.

04:56 Like, here's how you do get, post, put, and delete to rows in this table.

05:01 And then, you know, it's like, okay, that's not the way I want to structure my.

05:05 I don't want to just give my database to like the world.

05:07 I want to have control over actions that you take, like authenticate.

05:10 And that's not like just access to the table, you know, it's weird.

05:13 So I don't know.

05:14 I find them not to be, I know it's like,

05:17 well, we absolutely have to reach for a rest thing.

05:19 I don't know that that's necessarily true.

05:20 It's also very true that you don't like, you don't really need a full framework

05:25 if really you're the client.

05:28 If, I mean, I would say, I would probably lean on others to create a better API

05:33 or better experience if that's the product, if the API is the product.

05:38 But if the product is your website and you've got a framework, you're using Django,

05:43 you've got a database there, but you have something else that wants to access that data

05:49 so that you're presenting some extra endpoints.

05:52 If you just have a couple of endpoints that you need to create to get some data out

05:58 or push some data in, you don't necessarily need the full-blown extra framework.

06:03 I think something simple would work just fine.

06:05 Yeah, for sure.

06:07 Yeah.

06:08 Well, let's get out of the web a little bit and maybe go to the command line.

06:13 I'm going to spend a lot.

06:14 I basically have a theme running through this, my picks, my topics for the day.

06:20 So use git on the command line, I'm sure, Brian.

06:23 Yeah.

06:23 A little bit of git add, dot, git push, all those things.

06:27 I'm a big fan of using the GUI tools, especially the tools built into your IDE,

06:31 you know, PyCharm and VS Code plus derivatives.

06:34 That means like 20 different things these days.

06:37 They have really fantastic tools.

06:39 And I don't rarely, I rarely feel the need, like I got to be in the command line to mess with it,

06:44 but I still do plenty.

06:45 That said, where I haven't been doing a lot of stuff in the command line is at the GitHub level.

06:52 Oh, right, yeah.

06:53 Right, like you're like, okay, I'm going to get push, get pull.

06:55 Oh, there's a PR, I need to check that out.

06:57 what is the command again to check out that PR?

07:01 Or I want to refer to an issue.

07:04 How do I do that?

07:05 Like, what was the number of it again?

07:06 Because there's really cool things in Git.

07:08 You can say Git commit.

07:09 And for the message, you can say, fixes or resolves number one, two, three.

07:15 And that'll literally associate the commit with the issue one, two, three, and close it

07:19 when you push it into the server.

07:20 Which sometimes surprises me.

07:22 But yeah, it's good to know.

07:23 Yeah, I've accidentally put an issue in a PR, but then close the PR and it's closed issue.

07:29 I'm like, no, no, no, that's actually, we're not done yet, hold on.

07:32 Look, doesn't quite resolve blah.

07:36 Whoops.

07:36 Yeah, then it actually closes it.

07:38 You got to reopen it.

07:39 Whoopsie.

07:40 Anyway, so what I want to talk about today is the GitHub CLI.

07:46 So I don't know how long this has been around, well, presumably, but I think it's pretty new.

07:51 And so the idea is you can ask for status of PRs or you can check out,

07:56 Like this one's really nice.

07:59 GHPR checkout 12.

08:00 That's it.

08:01 It's all you got to do.

08:02 And it's figured out the branches.

08:03 It's pulled it.

08:04 It's checked out the right one, right?

08:06 That's really cool, isn't it?

08:07 Oh, yeah.

08:08 Yeah.

08:08 So to get a sense of what's possible, because when I saw this, I'm like, I think this will

08:12 be cool, but why?

08:14 Look at the manual.

08:14 And the manual has example usages.

08:17 That's how I would start to look.

08:18 So it says, I could check out a pull request locally.

08:21 And it's the one that I just said.

08:23 Boom.

08:23 Right.

08:24 Pretty neat.

08:24 You can do it by branch name.

08:26 You can clone a repository with just the owner and repo.

08:30 So you could say ghrepo clone, you know, Mike C. Kennedy slash Jinja dash partials or whatever.

08:37 You don't have to know the whole URL.

08:38 It's not that huge of a thing, but it's kind of nice.

08:40 You can also clone it as if you were doing git clone,

08:43 but you like to type gh-based repo instead of git.

08:46 I don't know.

08:47 You can create PRs from a branch, which is pretty cool.

08:51 And it just asks you what's the title, what's the body, and so on.

08:55 You can open up the browser, like take me to GitHub.

08:58 You can mess with forks.

09:00 What else can you do?

09:01 Yeah, you can see issues like GitHub PR list.

09:04 It'll show you whether they're open, who they're associated with.

09:07 Same thing for issues.

09:08 It even puts the tag in parentheses, parenthetically tags it.

09:11 I love it.

09:12 Anyway, I think this is kind of handy.

09:13 What do you think?

09:14 Yeah, you can do releases too, right?

09:17 Did you already comment on that?

09:19 I have not commented on that.

09:20 Because that's often the thing that I need to, like I've got everything all automated.

09:25 except for I still go over to GitHub itself to create a release item or release.

09:32 Yeah, I do too.

09:33 So being able to do that locally, that's pretty cool.

09:36 I've got the generation of the release notes automated

09:39 and the tagging of the branch automated, but I still can't release it automatically.

09:43 You know what I mean?

09:43 Now you can do it, at least do it on the command line.

09:46 A little bit more.

09:47 That's awesome.

09:48 Anyway, check this out if you're a CLI person, you know, GH, your new command.

09:53 Yeah, so go figure.

09:54 that you're the command line person today and I'm the web person.

09:59 So we're going to hop back over the web and talk about web scraping.

10:04 So, and web scraping is, you know, not evil.

10:08 Sometimes it's, especially if there's no API, it might be the only way to get some data from something.

10:15 So there's a project that I found out on Reddit called Can I Scrape, which is sort of a fun name.

10:23 And it basically analyzes the website's anti-bot protections to let you know whether or not you should even try to build a scraper for it or how many roadblocks you're going to run into.

10:36 And also, I think it's just sort of, I don't know, it seems like kind of a nice thing to do instead of to check all the rules out and stuff.

10:44 So it looks for protections like, I don't know what WAF is, but captures and rate limits, honeypots.

10:54 And then it rates it a difficulty score from zero to 10, easy to hard, and specific recommendations on what tools or proxies you'll need and the estimated complexity to build it.

11:07 that would be a decent thing to use on your own stuff if you are intending somebody,

11:13 if you just tell somebody, oh, I don't have an API for that, but go scrape the data.

11:17 What kind of a job are you asking them to do?

11:21 And I was like, I didn't see right away a comment on the robots,

11:26 but looking down through it, what it analyzes, it does check the robots.txt to make sure that you can.

11:32 And that's one of the things I want to be careful of somebody's,

11:36 what they say you should do and not do with their website.

11:39 So that's cool.

11:40 And anyway, I just thought it was nice.

11:43 There's an interesting discussion on the link to the Reddit discretion as well.

11:49 Just a target audience of hobbyists, but also just like data people.

11:53 Like sometimes there's data that's available on the web that, like I said,

11:57 no, there's no REST API yet for it or there won't be.

12:00 But yeah, anyway.

12:01 Yeah, I love it.

12:02 Very interesting.

12:03 This whole web scraping thing is getting more and more contentious with AI training and all of that.

12:09 It's good to be a good citizen of the web.

12:11 Yeah.

12:11 And also, like, maybe I'd possibly use some of these to check your own.

12:15 If you want to lock it down, if you really want to make, if you want to make scraping a real pain in the butt for people looking at your website, you know, you can use this to try to make your score as close to 10 as possible.

12:30 Exactly.

12:31 Exactly.

12:31 All right.

12:32 That's not what I want to talk about.

12:33 That's what I want to talk about next.

12:36 So I want to talk about Git, a totally different tool, though.

12:39 This is completely unrelated to the other one.

12:41 Okay, so I launched this CLI tool.

12:44 It's on PyPI, but primarily is intended to be used as a CLI type of thing,

12:51 like rough, not to be built upon, but to be run.

12:55 You know what I mean?

12:55 So you can uv tool install it.

12:57 And the idea is I called it Giddyup, G-I-T-T-Y.

13:02 for updating your, a whole directory tree of GitHub repositories.

13:07 Okay.

13:08 I may have talked about this before, something I kind of built like in passing.

13:11 And then I was, last week I decided I'm creating a new course,

13:17 Agentic AI programming in Python.

13:19 How about that?

13:20 And I'm like, let me think of something I can try to take that I know is a cool idea

13:23 that would seem plausible, but really just make it a super nice app.

13:28 Add a bunch of features and so on.

13:30 So I took that little utility I had and I spent a lot of time with CloudSonna and Giddyup

13:35 is the output.

13:37 So it says, never forget to pull again.

13:40 Automatically discover and update all your GitHub repositories in one command.

13:43 So here's the thing.

13:44 I've got three computers, one of them is a laptop, and they all have a bunch of GitHub

13:48 repositories, like hundreds of GitHub repositories.

13:51 And it drives me crazy.

13:52 I'll go to some older one I haven't worked with for a while.

13:55 Like, I don't think there's been any change to this.

13:56 And I'll start messing with it.

13:57 Then I'll try to push it.

13:58 It'll go, please pull your changes first.

14:00 I'm like, uh-oh, uh-oh, that's not good, especially if it's something to do with the courses

14:05 where it might be a PowerPoint that cannot be merged.

14:08 You know what I mean?

14:08 You're like, oh, no, this is real bad.

14:11 And it's out of date, right?

14:12 And so I created this thing so I can just, especially before I grab my laptop and head off to the coffee shop,

14:17 I can just go into part of my GitHub repos and just say, Giddyup.

14:21 And it goes through in parallel, and it just looks at all the repositories.

14:25 Does it get pull on all the ones that don't have anything checked out?

14:27 And the ones that are not committed yet, It says, hey, I don't want to mess with this one.

14:30 It has these three files unchanged and so on.

14:33 So it's just like a nice little utility people can run to update all their code.

14:37 I'll see if I can find a little output down here.

14:39 It's got a ton of features.

14:41 But yeah, I'd say update this thing, and it traverses hierarchically through all the GitHub repositories.

14:47 It says these are up to date.

14:48 I actually pulled a couple commits for this one.

14:50 This one had an error, and it just gives you, basically gets all of your GitHub repositories as much in sync

14:56 across all the branches as much as possible without breaking anything.

14:59 Oh, cool.

15:00 Yeah, so anyway, I put that out there for you.

15:02 I think people might like it.

15:04 I didn't, I just put it out there two days or three days ago

15:07 and it's already got some stars and forks and I haven't announced it at all whatsoever,

15:11 not even on social media.

15:12 So people found it and started, that's cool.

15:15 Yeah, nice.

15:16 All right, so giddy up.

15:18 I have a feeling that maybe people watch your repo a little bit.

15:22 I think that's what it is, like the GitHub.

15:24 And to be honest, I am a super fan of just clicking on the GitHub logo and going and just looking at what's flowing by.

15:32 I'm starting to follow more and more people.

15:34 I appreciate people following me.

15:35 That's a really nice source of just, hey, what's interesting?

15:39 Because if people you follow star something, that shows up.

15:42 You're like, oh, this person found that interesting enough to star it.

15:46 And I definitely respect what that person is doing.

15:48 Let me go check this out.

15:49 That does look interesting.

15:50 I'm sure that's how people found it.

15:52 Okay, cool.

15:53 Yeah, cool.

15:54 Well, I want to bring up something that I've apparently spent a lot of time thinking about.

16:00 So we're done with our normal stuff, right?

16:03 We are.

16:04 Moving on to extras.

16:06 Do you want to do your extras first?

16:08 Sure.

16:08 I'll be quick about mine.

16:09 Okay.

16:10 Yeah, let's do yours.

16:11 Let me close this off.

16:12 Yeah, check out that Agentic AI programming course.

16:14 It's coming out this week.

16:16 But people listened.

16:18 And I don't know if they actually listened to us.

16:19 I think they listened to other people with the same complaint.

16:21 But remember how last week on PyDay, I said, great, but uv loop doesn't work with Python 3.14.

16:28 Well, I'm so happy to tell you as of four days ago, uv loop is back, baby.

16:33 And we can use it again, which mostly is awesome because I don't want to go change a bunch of projects that were just fine.

16:39 But if I were to swap out the foundation running them like to 3.14, they wouldn't run anymore.

16:44 So now it's back.

16:44 So there's a release for that.

16:47 So uv loop, while it was gone from us for a little bit, it's back.

16:51 And remember how I said, I wish I knew who created PyPI plus and how neat it was, because

16:56 it has just these few little gotchas that I would love to like polish it.

17:00 Well, they sent over a message and said, thank you so much for a feature in PyPI plus, and

17:04 I'm working on the bugs that you found.

17:06 I don't know how they heard that we were maybe their show listener or someone they know is

17:09 a listener of the show.

17:11 But yeah, look at this.

17:11 I can search for something with a dash and I get the lowercase and vice versa.

17:15 Oh, cool.

17:16 But also, there's some people that maybe don't have a Python podcast to complain about things.

17:24 Is there like a about us or who are we?

17:28 There is.

17:29 I believe I put it in, you know, the best way would be a Reddit, I believe.

17:34 So Royal Wizard is the one who they initially announced it on Reddit and so on.

17:40 So you could, and they seem to be talking about the changes and the features over on

17:45 slash r you know r slash python so that's probably the best way okay yeah cool and then finally i you

17:51 know i told you about my host show me your ls which looked like show me your is because of the fonts

17:58 well people uh sent some feedback and i just wanted to share one because this is a common theme over

18:03 and over thomas spenson uh said hey i'm currently using new shell which for some reason i read as a

18:08 nutshell and went about talking about it that stuff that was the thing but said hey i'm currently using

18:13 and exploring New Shell, and its LS is something else clever.

18:18 So you can just kind of do almost query syntax against things like LS,

18:24 structured data, PS, JSON, et cetera.

18:27 So like, look at this.

18:28 This is crazy, right?

18:29 Yeah.

18:29 And following on, found out today that New Shell is using pollers

18:33 and that plugins can be written in Python.

18:36 So even cooler.

18:37 I'm not doing anything with New Shell.

18:39 I literally had never heard of it.

18:40 It's that new.

18:42 No, I don't know.

18:42 I hadn't heard of it before I wrote that article, but it does seem pretty interesting.

18:46 I am not here necessarily to switch to it, but look at this.

18:50 LS pipe, where size greater than 10 megabytes, pipe sorted by, modified.

18:54 Boom.

18:55 I can see that as powerful.

18:56 Yeah, that's pretty cool.

18:58 All right, that's it for my extras.

19:00 Yeah, and I really would like to try new stuff.

19:04 For me, well, I'm using Mac, Windows, Linux, all sorts of stuff,

19:11 And trying to get, so to be fair, I just sort of use, obviously I use Z shell on Mac because that's what it comes with.

19:20 But I kind of just use the bash version of stuff because it's common denominator

19:26 over everything. Anyway. But that's, you know, just me griping.

19:31 I want to talk about something old or new or not yet. Lazy imports.

19:36 So two episodes ago, we talked about a PEP 8, 10 explicit lazy imports.

19:40 And I was super excited about it coming in 3.15, but it's still in draft mode, so we don't know if we'll get it.

19:47 And then last week, I talked about if you want to use lazy imports right now, how you can do it just with Python, of just throwing the import in the first function before you start using it.

20:02 And then, but there's some other people thinking about lazy imports and how cool they would be also.

20:07 So Hugo wrote an article called Three Times Faster with Lazy Imports.

20:12 This is, and actually, wow, this is something I don't have the capacity to do.

20:17 I probably would maybe, but anyway, of just implementing it.

20:22 So there's a, he did a, he fetched the CPython.

20:26 There's apparently a lazy import reference implementation included in the PEP.

20:31 So he built Python with the patch and then also released it as if it was 314 so that he could get away with not building a whole bunch of other stuff.

20:43 And then went ahead and did some, Hugo does the PyPI stat stuff, which I love that tool.

20:50 And he did a pip dep tree and did some lazy import stuff on it to see if it would speed it up.

20:56 And his benchmarks look very promising.

21:00 speeds it up quite a bit.

21:03 1.31 times faster for one implementation.

21:09 And then kept going.

21:11 And let's see.

21:13 I can't remember what this last one is.

21:15 We no longer need inline imports trick.

21:18 Anyway, a couple of different things he tested.

21:22 Either way, it's faster to use it.

21:24 So I'd be excited to get that in.

21:27 However, somebody else.

21:30 So there's a great thread also, we'll link to it, a great thread on Mastodon, which I clicked on accidentally,

21:36 to talk about between Graham and him and others about his implementation.

21:42 Okay, so top imports 105, the normal imports 105 milliseconds.

21:47 Inlining, which is essentially what I'm teaching people to do in my post,

21:52 46 milliseconds, so that drops it down quite a bit.

21:56 Then there's the wrapped lazy import version, which I'm going to talk about in a second.

22:00 that drops it down to 41.

22:02 And then using 810 drops down to 35.

22:06 So there's, I guess that's it.

22:08 So he timed a whole bunch of stuff and talks about it in the article.

22:13 Like 3x speed up with the, if we put it in 315, that's awesome.

22:19 Yeah.

22:20 And he's timing PyPI stats with help.

22:24 So the help is supposed to be really fast and not actually do anything.

22:27 So, and that's kind of a cool way to test it is you're running your application

22:33 or your command line application, but not actually doing work.

22:36 It shouldn't import the world then, right?

22:39 So.

22:39 Yeah.

22:40 Even if it does a decent amount of work, it probably doesn't need all the imports.

22:43 Yeah.

22:44 Right.

22:44 And if you're doing some work, you might not need other imports,

22:47 those sort of things.

22:48 Those are good things to do.

22:50 So, and going back again, reminding people the idea around this explicitly imports

22:55 is to mark some imports to say, Don't actually import this until the first instance of somebody trying to use it.

23:03 That gets imported.

23:04 Graham.

23:05 I just, go ahead.

23:06 No.

23:06 I just timed giddyup-help, which I installed via uv tool install.

23:13 60 milliseconds.

23:14 I'm pretty impressed with that.

23:15 That's really fast.

23:16 Yeah.

23:17 Yeah.

23:17 But you know what?

23:18 The help in the CLI arg parsing type stuff is built with arg pars.

23:22 So there's not a bunch of external stuff to pull in.

23:25 Yeah, I'm using arg pars more and more now.

23:27 Okay, so Graham was in the discussion thread and Graham Doubleton, and he also wrote a blog post called, wow, it just came out today.

23:36 Cool.

23:37 Use or updated today.

23:39 Beat the music just off the wire.

23:42 Use lazy module imports now.

23:46 And then this case is not the inline one.

23:49 And he's using the wrapped.

23:52 There's a wrapped package that is for decorators, wrappers, and monkey patching.

23:58 It's one of his packages.

24:00 And it can be used to kind of simulate lazy imports also.

24:05 Which, it's the syntax.

24:07 So it's kind of a cool article.

24:09 And the syntax is different.

24:11 So again, the lazy imports, if we get it in 3.15, it'll look like that.

24:15 lazy import json or lazy from json import something um the wrapped version is uh import wrapped and

24:25 wrapped dot lazy import so apparently wrapped has a lazy import feature which is cool um and uh but

24:32 the syntax is a lot different so i'm i'm not sure what i was what i think about that and then also

24:38 down at the bottom adam johnson reached out to him and said uh type checking kind of breaks when

24:44 you're using yeah so you know what i think you might be able to actually fix it i wonder if you

24:49 could could you know probably i was saying that you could say json colon type is json but important

24:55 but then it's it's not going to know what that is yeah you're right it that was my thought when i

24:59 saw this as like oh it'd be fun to play with lazy imports i'm like oh but that's going to destroy

25:03 type information in the editors right so that's where um adam's suggestion of saying if

25:09 type yet checking import json so just go ahead and actually import all the stuff if you're type

25:14 And that'll probably help the editors, I imagine.

25:16 So.

25:17 Wow.

25:18 Here's the one for the 315, because I love this idea as well.

25:21 And I appreciate Hugo writing up all the research.

25:24 Yeah.

25:25 So, and also Graham for talking about how to get around it with rap to that school.

25:30 So, and a little faster than my man.

25:32 All right.

25:33 I'm feeling lazy still, but how about funny?

25:36 Do we got something funny?

25:37 Oh, yeah.

25:38 I got something.

25:38 Actually, really, really quick real-time follow-up, because, I mean, we're covering stuff that

25:43 came out today.

25:44 And who doesn't love to hear that AWS US East 1 in Virginia went down?

25:52 So right here on CNN, by the way, AWS services are recovering again after a global internet outage.

26:00 Scroll down a little bit.

26:02 Somewhere about East.

26:04 There we are.

26:05 It seems like a third of the world is hosted in US East 1.

26:09 But you know what?

26:10 Our stuff is clipping along smoothly just as it should.

26:13 All right. So good luck to everyone who's running over there. So here's the thing, Brian, for the joke. Are you more of a fantasy person? Are you more of a science fiction? Or what's your genre of big epic storytelling?

26:29 Well, sci-fi usually.

26:31 I listen to a lot of science books right now.

26:33 But yeah.

26:34 Yeah, I'm personally a science fiction person.

26:36 I definitely take a science, a giant space sort of thing, interstellar type of thing over, say, dragons and witches.

26:46 But I think you might appreciate this.

26:49 So Lord of the Rings, okay?

26:51 There's Gandalf and there's Frodo.

26:52 And it says, Gandalf, they've discovered something together.

26:56 And Gandalf looks over at Frodo and says, what can you see?

26:59 it's it's some form of elvish i i can't read it and he's holding a regular expression

27:09 slash carrot for the z question mark equals dot percent backslash d is like

27:14 some form of elvish can't read it yeah nobody can pretty good right yeah that is good i've seen the

27:21 same meme but with uh if double underscore name or dunder name equal equal dunder main it's like

27:28 It's some form of Lfish.

27:29 I can't read it.

27:29 It's great.

27:30 It doesn't make sense.

27:31 How can you not read that?

27:33 But also, it seems odd still that that's the way we can tell if you're running an application

27:40 directly or it's getting imported.

27:41 I know.

27:42 It works, but it's just a weird convention.

27:47 I'm totally here for just the main function, static main void or the variations across so

27:54 many different applications.

27:56 I mean, that's actually what I end up writing in my code is I always have a def main something or async def whatever main.

28:03 And then in the Dunder name equal Dunder main, I just call main.

28:07 And that's just like, this is my convention.

28:09 The main thing goes at the top.

28:10 It's called main.

28:11 That's how the app starts.

28:12 But I still got to go to that little wire together deal at the end.

28:15 Yeah.

28:15 It seems like we should have like a if like if not imported or something, because that's essentially what we're saying.

28:22 But anyway.

28:25 One of the things I noticed, I really enjoy sci-fi, but I realized that a lot of the sci-fi books that I love still have, like, talk about, like, in the future, we'll have new technology and it's going to suck because of XYZ.

28:38 It's like, there's not a lot of optimistic sci-fi.

28:41 It's a lot of dystopian, yeah.

28:43 Yeah.

28:44 Anyway.

28:44 Sure, we have cool spaceships, but we've destroyed the world, so we have to use them to go find a new world to destroy.

28:49 Yeah, yeah.

28:50 And we still have politics in space.

28:53 But anyway.

28:54 But no politics on this episode.

28:56 No, unless you don't feel like we're bashing elvish writing, but that's okay.

29:01 Yeah.

29:02 All right.

29:02 All right.

29:03 Thanks for being here.

29:03 Thanks to everyone for listening.

29:04 We appreciate it.

29:05 Bye, y'all.

29:06 Bye.


Want to go deeper? Check our projects