Transcript #343: So Much Pydantic!
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 343, recorded July 11th, 2023, and I am Brian Okken.
00:11 And I am Michael Kennedy.
00:12 That's pretty exciting to be here.
00:14 If you're listening to the show, thank you.
00:17 And also, if you'd like to watch and participate, ask questions or whatever,
00:22 you can do that by going to pythonbytes.fm/live.
00:26 And we'd love to have you, even if it's just once in a while.
00:29 Yeah, sometimes people show up in the live stream that will possibly get their projects will actually get mentioned as well.
00:37 And that's always kind of interesting.
00:39 I'm feeling this might happen today.
00:41 Yeah.
00:41 Speaking of that, Seth Larson showed up and we have some Seth Larson news to share.
00:46 So that's cool.
00:47 Hey, Seth.
00:48 Well, how would you like to start us off today, Michael?
00:51 I would like to start it with a version update.
00:55 So let's talk about Pydantic.
00:57 We talked about the Pydantic version two story and performance.
01:01 So Pydantic got a major rewrite.
01:05 This rewrite was, I don't know, maybe a year in undertaking, a year long undertaking.
01:10 Quite massive.
01:11 Got its internals rewritten in Rust to be way faster.
01:15 We talked about the early alpha version of this.
01:18 And the early alpha version had, you know, like a 22 times speed up.
01:22 Well, alpha no more.
01:24 If you pip install Pydantic, you get Pydantic two.
01:27 So that's pretty exciting, right?
01:29 That's very exciting.
01:30 Yeah.
01:31 Yeah.
01:31 So there's a blog post that says the last few months have involved a whirlwind of work.
01:37 And finally, we're ready to announce version two.
01:39 So you get started by just installing it, upgrading it.
01:43 It requires Python 3.7 and above.
01:45 So honestly, that's a pretty old bit of Python that you can be based on there.
01:49 That's great.
01:50 Now, there's some pretty major changes in terms of the API, I guess you would call it, the
01:57 way that you work with Pydantic, right?
02:00 In some cases, the way you work with base classes or the functions you call and all those things.
02:05 So there's a migration guide that we can use to go through that.
02:09 And if you check out the migration guide, you'll see like this.
02:14 You got the migration guide.
02:15 It starts by recommending this thing called Bump Pydantic.
02:19 And I guess I should probably also just let you know, like, this is like a big Pydantic
02:24 episode that we're going to be covering a lot of Pydantic things.
02:27 So there's this thing called Bump Pydantic.
02:29 And what you can do is you can run it against your project and it will traverse all the code
02:35 and find all of the Pydantic things, the classes and functions and so on that you might write
02:43 with for your Pydantic code and it will upgrade them to the new thing.
02:46 So we can check that thing out first.
02:48 Basically a converter.
02:50 It's like a two to three, but for Pydantic.
02:52 It's like a one to two, I guess.
02:54 And so it'll do things like one of the things you should do is you should have explicitly set the
03:01 default value.
03:02 So previously you could have a class to give an example of a user that's a base model.
03:06 You have a name and you say the name is an optional string.
03:09 Well, now what you should write is name optional string equals none.
03:14 So explicitly setting the default values when there are things like none.
03:19 All right.
03:19 So if you run this code against it, it'll go and make those transformations.
03:22 It also will replace the config class with a model config attribute.
03:28 So you might've had an inner config class and now you have a model config where you set that
03:36 to an instance of the same settings basically.
03:38 So fewer inner classes, more just fields that make, you know, make things happen.
03:44 Right.
03:45 And a bunch of stuff like that, that you can run and it'll do that automatically.
03:48 But this is, if you look at the migration guide, this is actually just scratching the surface.
03:53 So there's, there's a lot of other things that you need to be aware of.
03:57 And I don't know how far they intend for this bump Pydantic to go and try and to manage those
04:02 things.
04:03 But for example, cool that they have it though.
04:05 It is pretty cool.
04:06 They have it.
04:07 Yeah.
04:07 That even it's a star, right?
04:08 Yeah.
04:09 They let people say, here's the changes you have to make.
04:13 And also here's a tool that can do at least most of it.
04:15 So exactly.
04:16 There's things like in old Pydantic, you had a Dunder fields and now you have model fields
04:22 as a field to the base class.
04:25 You had Dunder private attributes and now you have Dunder Pydantic private.
04:29 And there's, you know, there's more relevant ones.
04:32 Like there was a copy function and now there's a model copy.
04:35 There was a dict and now there's a model dump.
04:38 So if you had a Pydantic model, you wanted a dictionary, you could just call dict on it.
04:41 Well, that doesn't exist or is deprecated.
04:44 And so now you have a model dump.
04:46 They did say where possible, they've tried to retain deprecated methods with their old names for ease of migration, but you'll get deprecation warnings.
04:54 So don't sleep on that because one day they won't, they won't be.
04:57 There's, this is a pretty significantly long document.
05:01 I don't know how long, long it is, this migration guide, but there's a, it's a bunch of things you should just go through.
05:07 I would just say, try to upgrade to, to Pydantic to run your code.
05:14 See if you get any deprecation warnings.
05:16 If it runs and you don't get them, you're probably fine.
05:18 But if you get errors, then go consult the migration guide.
05:23 If you get deprecation warnings, do the same with, but maybe with slightly less urgency.
05:27 So yeah, there's a bunch of stuff that you can go through.
05:30 One of them was, one that's interesting is they introduced this thing called a type adapter.
05:35 Let me see if there's a section where they talk about it.
05:38 Yeah.
05:38 So now they have this thing called a type adapter, which is pretty cool.
05:43 They have some example.
05:44 There we go.
05:44 It says in Pydantic version one, we had weak support for validating or serializing non-based
05:50 model types, like a list of something.
05:52 So now you can create this instance of a type called a type adapter and you pass the type.
05:59 It adapts.
06:00 So you can say a type adapter of list of int, and then you can just go to it and say validate
06:05 Python.
06:05 And for the example here, they have a list of numbers, but they're in strings, like the list
06:11 string one, string two, string three.
06:13 And then, you know, what it gives you back is just the actual list.
06:16 One, two, three, like all that magical transformation that Pydantic is.
06:21 That's pretty cool.
06:22 Yeah.
06:22 So that's another thing people can check out.
06:24 There's, like I said, this is a huge document.
06:26 People probably want to go check out.
06:28 They've removed a whole bunch of error messages or errors, sorry, error types like Pydantic
06:34 dot errors dot IPV any interface error.
06:36 For example, I'm not sure where they went, though.
06:40 It doesn't explicitly say.
06:42 And they were moved or, you know, mapped over to this other error type.
06:46 But again, it's a huge document.
06:48 I don't want to go through the migration guide for everyone.
06:50 That's not fun.
06:51 But congratulations to the Pydantic team.
06:55 This is really awesome that this is finally here.
06:57 Now we come to the point where we wait.
07:00 Where we wait for all of the Pydantic frameworks.
07:04 Because working with Pydantic is great.
07:06 And you can do cool stuff with Pydantic directly.
07:08 Like you can directly work with it in a Flask app, for example.
07:12 But if you work with FastAPI or Beanie or all these other frameworks that are built on top of it,
07:19 you've got to wait for, you know, they are deep down in the guts of Pydantic a lot of times
07:23 because of the way they work.
07:24 Except for now FastAPI, though.
07:26 FastAPI is already upgraded, right?
07:28 Yeah.
07:29 Is it released or just the beta is out for it?
07:32 I can't remember.
07:34 So FastAPI released version 0.100.0.
07:38 Come on, guys.
07:39 Zero verse still.
07:40 Anyway, four days ago.
07:41 And it does look like the last, like five days ago, we got a merge for adding support for Pydantic 2.002 or something.
07:55 The first couple of versions for Pydantic didn't work with FastAPI, but looks like there were some fixes.
08:01 Wouldn't surprise me if they kind of just held off on announcing the version 2.002 until FastAPI was able to use it.
08:09 Because that's a huge user of it.
08:11 Yeah, it's certainly the biggest user.
08:13 And Samuel and Sebastian work pretty closely together.
08:16 I'm excited.
08:18 I know this is different.
08:20 It might be difficult for people that are already using an old Pydantic to move over, even with the bump.
08:26 But I guess I haven't used Pydantic directly before, and now I'm kind of excited to use it.
08:32 Even with tools like this auto thing that they're using.
08:37 What was that?
08:38 The auto changer?
08:40 The Pydantic?
08:41 No, the one to like...
08:42 Oh, the type adapter.
08:44 Type adapter.
08:44 Yeah, I think that I've got places to use type adapter, even without non-web stuff.
08:51 So I think that's pretty fun.
08:53 Anyway, cool.
08:54 I'm excited.
08:55 Grant, on the audience, does point out, tough luck for base models with an existing model attribute.
09:02 There might be some mechanism to rename that or remap that.
09:08 You know, there's like an alias you can put on them.
09:10 But you say, when you look in the data, it looks like this, even though the name is that.
09:15 But yeah, there might be some trickiness here.
09:17 Yeah.
09:18 Yeah.
09:19 At least at an API level, you could be able to fix it.
09:21 I don't know about the Python code level, if that'll help you.
09:23 All right.
09:23 Well, anyway, big news.
09:25 Big news.
09:25 Pydantic version 2 is out.
09:28 This was on June 30th, but we were off on vacation, Brian.
09:33 Mostly my fault.
09:35 Sorry.
09:36 Well, actually.
09:37 So we didn't cover it.
09:38 It's all right.
09:39 Now that we covered it, now we can cover that FastAPI is caught up.
09:42 Yeah, exactly.
09:43 Wait long enough things.
09:44 It's come together.
09:45 Well, I want to talk about talks a little bit because I learned something new from Hinnick,
09:52 which isn't that unusual.
09:54 I often learn a lot of stuff from him.
09:56 However, there's an article from him saying two ways to turbo charge talks.
10:02 And it just starts right off the bat with saying, no, it's not just run parallel.
10:08 Because actually running parallel is pretty cool.
10:11 And if you don't know about running parallel, I usually just use the talks-p to run parallel.
10:19 If you can run all of your environments in parallel, it's super cool to be able to speed it up.
10:25 That's the awesomest way to speed it up, I think.
10:28 He does note that it's broken for some people.
10:33 So talks for talks for is awesome, and it's got some great new features.
10:38 But apparently for some people, parallel isn't working.
10:42 I'm not one of those people.
10:44 So most of my, all of my projects that can use talks or parallel seems to be working.
10:49 But I'm not using something complicated.
10:51 Apparently it's broken for adders, for instance, or at least it was last time I checked.
10:56 Anyway, so what is he recommending if it's not running in parallel?
10:59 What should you do?
11:00 This is something that I didn't really think about before.
11:04 So one of the things that talks does is for each environment that you set up,
11:08 like say you've got environments for three versions of Python, and it will create a source distribution of your library or package for each of those,
11:22 if you're doing a normal, like using talks to test a Python package.
11:25 It'll build a source distribution for each environment.
11:29 Except for that's not really how we use our packages.
11:32 We build it once and throw it up on PyPI, and everybody uses the same one
11:37 if one supports all three versions of Python.
11:41 So he's showing us a way to get around that to say, instead of building it on all environments, go ahead and just build the wheel once.
11:49 And so you tell it to build the wheel instead of a source distribution, and you tell it where to put it into.
11:56 And there's apparently a command line way to do it, but really it's throw it in your toxin file.
12:02 Or if you're using pyproject.toml, you can throw it there too, of course.
12:07 But so there's a wheel build environment that tells you, tells tox what directory to stick it in.
12:14 And if it's the same directory for everybody, it'll get used for all environments.
12:19 And this alone sped up quite a few of my workflows, which is really cool.
12:24 Just building it once, using it, and testing it in different Python environments.
12:29 Yeah, that's really excellent.
12:30 Because generally the wheel is not going to vary from 3.9 to 3.10, right?
12:35 Right.
12:35 Yeah.
12:37 In a lot of Python-only packages, you're going to use the same wheel for everything.
12:42 And now there are some that have different ones for different versions, I guess.
12:47 None of the stuff I work with does.
12:48 Okay, so that's the first way to speed it up.
12:53 What's the second way?
12:54 The second way is if you're in one of these camps, especially one of these camps where
12:59 you can't run tox in parallel, you can still run pytest in parallel.
13:04 So he's recommending using pytest xdist as a plugin, and then running pytest dash in auto,
13:12 or you can give it a number of CPUs or whatever.
13:15 And auto just says, pick the number of CPUs you want, and you can run pytest in parallel.
13:21 This actually, if you have a fast test suite, this might slow down your test.
13:26 So be careful.
13:27 Measure it.
13:28 However, he has an example.
13:30 In a lot of CPU-intensive test suites, like, for instance, if you're using Hypothesis,
13:36 and it's running a lot of tests that are similar.
13:39 Yeah.
13:41 So especially if you're using Hypothesis, I recommend trying out running pytest in parallel,
13:46 and it can speed things up significantly.
13:50 He has an example at the bottom.
13:52 Oh, I want to cover some of the other things.
13:54 If you're doing all these tricks, it might muck up your coverage collection.
14:00 So he's got some stuff here to help you through cleaning up your coverage, which is great.
14:06 Skipping down.
14:09 For the adders project, those two tricks, he started out with 257 seconds and got it down to 69 seconds using parallel pytest and building a wheel only.
14:21 I had a test suite that was pretty fast anyway, just, you know, 18 seconds.
14:26 It did take it down to like five seconds.
14:28 So it's, yeah, it's worth it just for the heck of it.
14:33 Why not?
14:34 So thanks.
14:35 Yeah, it's almost five times faster.
14:36 Not bad.
14:37 Four times faster.
14:38 Yeah.
14:39 I mean, right.
14:40 If it's low, you don't really think about it, even if it's multiples.
14:43 So, but.
14:44 Yep.
14:44 And the bigger the project, the more, the more you care, right?
14:48 Yeah.
14:49 And I wasn't using a hypothesis.
14:51 I would like to try this out using hypothesis.
14:54 It's pretty cool.
14:54 Mm-hmm.
14:55 Excellent.
14:55 Good one.
14:56 All right.
14:57 Before we move on to the next item, I have a bit of real-time follow-up, but not real-time follow-up in the traditional sense where we have audience members.
15:05 I just got a message from Roman Wright, who is the creator of Beanie, the async MongoDB ODM based on Pydantic.
15:15 And he said, I am releasing a version of Beanie that supports Pydantic version 2 soon, either this week or next week.
15:24 So, don't want to put him down for a certain time exactly, but just that project is also moving along like FastAPI did to support it.
15:34 And he said it promises to have quite a bit of a speed-up, as you would expect.
15:38 Nice.
15:39 Cool.
15:39 That Beanie's a cool project.
15:41 It absolutely is.
15:42 So, how about something totally different like Pydantic?
15:45 So, this next item is Awesome Pydantic, a curated list of awesome things related to Pydantic.
15:52 So, this is kind of an early-stage project here.
15:56 It got created five months ago or so, but I feel like it needs people out there who have Pydantic things contributing them back.
16:05 For example, do we have, I don't even think like SQL Model is listed here, where SQL Model is created by Sebastian Ramirez based on Pydantic and SQLAlchemy, for example.
16:17 So, there are some notable things though that are worth pointing out here.
16:20 So, we have Transformers and what's cool is it lists all the stars.
16:24 So, Transformers has 106,000 stars.
16:27 Wow.
16:29 That's crazy, Brian.
16:29 Yeah.
16:30 I mean, if you look at CPython, I think it has in the realm of 50,000.
16:34 Flask does as well.
16:35 So, Transformers is the state-of-art natural language processing for PyTorch and TensorFlow based on Pydantic.
16:42 It's more popular than Python.
16:44 Sort of, yes.
16:47 I think, you know, how many people are actually trying to work on Python and the code itself.
16:53 But, yeah, in a sense.
16:54 Spacey, of course, the free open source library for natural NLP, natural language processing.
17:01 It's a pretty cool one.
17:03 Gina, J-I-N-A, is geared towards building search systems for any kind of data, including text, image, audio, video, and more.
17:16 That's pretty excellent.
17:17 Modular design and multilater abstractions.
17:19 You can leverage efficient patterns to build different parts of the system or change them to a flow.
17:24 That sounds pretty interesting, right?
17:26 Yeah.
17:27 Down here, we have the object mapping.
17:30 We have Beanie, as I just called out, an asynchronous Python object document mapper for MongoDB based on Motor and Pydantic, of course.
17:39 What else we got?
17:40 We have data model code generator, which is the foundation of...
17:47 JSON to Pydantic, which I know that we talked about before.
17:50 If you're not familiar with JSON to Pydantic.com, take some JSON, drop it in there.
17:55 You get your JSON output.
17:57 Here's the big question, though, Ryan.
17:59 What version of Pydantic do you get out?
18:02 I'm guessing not the new one.
18:04 I don't know.
18:04 I am as well.
18:05 It probably needs an update, doesn't it?
18:07 Yeah.
18:07 So hopefully that that comes along there.
18:10 But let's stick in model in there as an attribute and see what happens.
18:14 Oh, yeah.
18:15 Nope.
18:16 Not doing it.
18:17 So data model code generator is the CLI equivalent that that thing uses behind the scenes.
18:22 Let's see.
18:23 GoodConf.
18:24 I don't know how many people know that Pydantic has a settings management capability where you can read variables out of environment variables and YAML files and so on.
18:33 So GoodConf, as in GoodConfig, GoodConf is a thin wrapper over Pydantic settings management.
18:39 So that's pretty cool.
18:41 Get a little bit of a cleaner or more opinionated way to work with settings.
18:46 And, of course, FastAPI, Django Ninja are listed here along with some others.
18:51 And I think I'll probably leave it there with that as the shout out for all those items.
18:57 But there's a bunch of cool stuff in here.
18:58 Awesome things you might say that people can check out.
19:01 And also, if you have one of these projects or you're a super fan of one of these projects and it's not listed here, PRs are accepted, I believe.
19:07 Yeah.
19:08 Cool.
19:09 Yeah.
19:09 So that was the next thing in the Pydantic journey of today.
19:13 Nice.
19:14 Well, I'm going to go away from Pydantic again.
19:18 And I want to talk about command line interface tools.
19:23 So I like CLIs.
19:25 I kind of spend a lot of time with a terminal open.
19:30 And so I thought this was a fun article from Simon Willison.
19:34 CLI tools hidden in the Python standard library.
19:37 And I think it's also really cool that Simon does a shout out to Seth Larson.
19:43 Hey, Seth.
19:44 That Seth pointed out that GZip, the Python GZip module, you can use it as a CLI tool, especially handy if you're on Windows and don't have GZip built in.
19:57 You can say Python dash M GZip.
20:00 And you can with a --decompress and give it a GZip file and it'll decompress it for you.
20:05 There's a whole bunch of other stuff you can do with it.
20:08 But it's pretty neat.
20:09 Kind of fun.
20:11 So Simon saw this, that Seth pointed this out and thought, wonder what other stuff is hiding in the standard library.
20:20 So he talks about using ripgrap to search through the standard library.
20:25 And I think it's kind of fun that he shows you how he went about looking for all these things and then parsed out some stuff because he didn't really care about tests or turtle or idle.
20:38 Because, yes, we know that those have applications.
20:41 But what's left?
20:42 What's left is quite a few.
20:44 There's quite a few Python modules within standard library or packages, modules, that do these init things or have a command line thing.
20:55 And so what's kind of interesting is what he's looking for.
20:58 He's looking for packages that have a if name equals main because that little trick of if to under name equals to under main,
21:07 that means that if you get if it's imported, it just use it runs like a library.
21:12 But if it's not if it's not imported, if it's run directly, then this will be true.
21:17 And whatever's in there will run as as a command and you can do the dash M thing.
21:22 And so one of the few fun things that he found, I did know about the server thing, but I always forget about it.
21:30 Python dash M HTTP dot server and you can give it a port.
21:34 Yeah, that's nice.
21:35 I use that sometimes when things complain and trying to work with like JavaScript and a static HTML file or something.
21:41 It's like you need a server for this to work because it wants to just do forward slash something.
21:45 So I'll just run that and then like open up the file right there.
21:49 And then it then it starts working instead of trying to get a lot of trouble.
21:52 Run that in the directory.
21:53 You're working on it.
21:54 Yeah.
21:54 And if you if you want to one of the fun things with this is if you want to just learn a little basic HTML,
22:00 maybe JavaScript in CSS, you can just use this as a local server to just play around with using all three together.
22:09 It's kind of fun.
22:10 Yeah.
22:11 Or maybe you want to do PyScript and not actually do JavaScript.
22:13 Yeah.
22:14 Yeah.
22:14 Yeah.
22:14 Maybe.
22:15 So let's go through a few more fun things.
22:18 Base64.
22:19 You can you can use dash M base64 to either encode decode or both.
22:25 I'm not sure what both at the same time means to try that out.
22:30 See what it does.
22:31 Maybe you just get the answer back.
22:32 Maybe.
22:36 I'll open up a async REPL, which where you can use a wait and instead of async I O run, you can call use a wait directly.
22:47 It's kind of fun.
22:48 Neat to try out.
22:50 Try out async stuff on the REPL.
22:52 That sounds hard, but it might be fun.
22:55 Tokenize just as a fun thing.
22:58 You can use the token Python tokenizer on a Python file just to see what the tokens look like.
23:06 That's kind of neat.
23:07 AST, I probably would use more.
23:09 So you can use to dash M AST on a Python file.
23:12 It'll give you a printout of the abstract syntax tree, which is nice.
23:19 This is super handy.
23:21 I didn't know about this.
23:22 Jason.tool.
23:23 It's a pretty printer for Jason.
23:26 So you can just pipe some Jason into it and get some nice formatted output.
23:33 Kind of nice.
23:35 Yeah, that's really what I wanted to highlight.
23:36 Those calendar.
23:37 I knew about this a long time ago and I totally forgot about it.
23:40 Python dash M calendar will print an ASCII calendar of the current year.
23:45 Why would you need this?
23:47 But anyway.
23:49 Because you can, Brian.
23:50 Because you can.
23:50 Because you can.
23:51 Because you can.
23:51 I used this way, way, way long ago to try to and then parsed it afterwards to hook up a dynamic calendar application with clickable dates.
24:04 It was terrible.
24:05 It was a terrible application, but it was fun.
24:07 Anyway.
24:09 I kind of like it, though.
24:11 I do kind of like it.
24:12 So.
24:13 Oh, NNTP.
24:15 Do you use news groups much?
24:17 I don't use news groups.
24:18 I used to.
24:19 I used to news group.
24:20 But apparently you can do NNTP and it prints out like some articles.
24:25 Interesting.
24:27 Guess you want to read from 1994.
24:29 So one thing I think would.
24:33 I think it might be kind of cool if somebody had.
24:36 Creates a meta package for this kind of stuff based on this article.
24:42 What I mean is if you set an entry point in your Python package and you put it into.
24:48 You install it into your virtual environment or you pip x install it and it becomes a CLI command.
24:54 Right.
24:54 So, for example, pyjoke.
24:56 Right.
24:56 I could just go up here and type pyjoke.
24:59 Oh, pip x install pyjoke first.
25:01 And it'll give you some kind of.
25:04 It'll just call that function.
25:05 Right.
25:06 Is it jokes perhaps?
25:07 I'm not sure.
25:08 Yeah.
25:08 So if I type pyjoke after installing a pip x install, it says obfuscated reality mappers or
25:14 items can be useful database tools.
25:16 Right.
25:16 So.
25:16 Right.
25:18 But the fact now I have a single command I give instead of, you know, Python dash m pyjoke,
25:24 I just type pyjoke.
25:25 Right.
25:25 So it would be cool if somebody took this and created something that I could pip x install
25:30 that gave me every single one of these in a more concise way to call it.
25:35 So instead of python dash m dash, you know, calendar or just calendar, I can just type calendar and it runs this.
25:41 Right.
25:42 Or I could just type acp dot server and it runs runs that.
25:45 So there's something for people to try to come up with a cleaner way.
25:50 There might be some name conflicts.
25:53 You might need to go up with a pg zip or something right like that, which is would be a little bit annoying.
25:58 But yeah, anyway, it'd be fun if somebody turned these into like a simpler series of commands and just like you got Python, you got you basically have all these.
26:06 Yeah, it might be kind of difficult.
26:07 Maybe a fun, fun thing to try because you can't just import the module and run it because then that part doesn't run.
26:15 So you have to.
26:16 Yeah.
26:16 Right.
26:17 You could you have to set up a bunch of entry points in your package and then give them names and then basically map them over to calling.
26:22 Yeah.
26:23 But Henry, out of the audience, I thought the point is you didn't have to install anything to use these.
26:28 Right.
26:30 True, true, true.
26:31 But you have got to make a bunch of aliases if you want them real short.
26:35 Then anyway, very cool.
26:37 Cheat sheet, maybe a cheat sheet.
26:39 Yes.
26:40 Kind of a cheat sheet.
26:41 Thanks, Simon.
26:42 Thank you, Seth.
26:43 This is cool.
26:43 All right.
26:44 Well, those are our things.
26:46 So do you have anything extra to share with us?
26:49 I do have some extras.
26:50 Back to Pydantic.
26:51 So over at Talk Python Training, we have a brand new course, a seven hour course for MongoDB called MongoDB with Async Python.
27:01 Oh, fun.
27:02 And the whole idea is it takes Beanie and it's kind of a comprehensive introduction to MongoDB, but approaches it from using Beanie, which is Pydantic plus Async and Await.
27:13 Talking to MongoDB, how do you use indexes?
27:17 How do you write queries?
27:18 What are the different styles?
27:19 We end up building a FastAPI API around that as well as do load testing with Locus.
27:26 So if you want to kind of see end to end how to build a modern Python app based on MongoDB and Beanie, check it out.
27:35 Links in the show notes.
27:36 Just talkpython.fm.
27:38 Click on courses and you'll find it over there.
27:40 So I'm really, really excited.
27:42 I've been working for a long time on this.
27:43 It has an early bird special.
27:45 So for today for a week, you get $10 off or something relative in your own currency off.
27:53 If you get it this week and then it goes up a little bit next week.
27:56 So really, really fun course.
27:57 There's tons of stuff to learn here.
27:59 People can check it out if they're interested in this.
28:03 And as I said, I was just talking to Roman and Beanie should get its Pydantic version to upgrade as well.
28:09 So this should only get to be a better story as we go on.
28:12 Very cool.
28:13 Now, is this one that you did or was this somebody else?
28:17 This is me.
28:17 Okay.
28:18 And again, this is like what's powering Python by stat.fm.
28:21 This is what's powering talkpython.fm.
28:23 Like those kinds of, it's the same tech behind the scenes.
28:26 So pretty excellent.
28:27 Nice.
28:27 Another one.
28:28 Did you know that PyPI has a blog?
28:31 No.
28:32 It does.
28:33 This one's been sitting around for a little bit.
28:35 I meant to talk about it, but it kept getting edged out by more urgent things.
28:40 But back in March, end of March, there's now a blog.pypi.org that you can go to.
28:47 So definitely check that out.
28:49 One of the things that's a little bit of a hassle is if you take this, like blog.pypi.org,
28:54 and you drop it into your RSS reader, like reader with two E's for me, it says there's no blog here.
29:01 Is there no blog here?
29:05 Go to the bottom.
29:06 There's a blog.pypi.org slash feed underscore RSS underscore created dot XML.
29:12 That is what you got to put into your RSS reader if your RSS reader doesn't find it.
29:17 Because there's no meta tag for the RSS capabilities.
29:22 Maybe someone's over there listening, go and throw that in, make that a little bit quicker and simpler for people to find.
29:27 But if you want to subscribe to it, that's the business right there.
29:32 Well, if you go to scroll, yeah, there is a little icon at the bottom right-hand corner, a little RSS thing.
29:38 So all the way down.
29:40 Yeah, right there.
29:41 Yeah.
29:41 So copy link.
29:42 Is that the same address?
29:43 Yeah, that's the same address I suggested.
29:45 Cool.
29:45 So people, yeah, but like if there's a meta tag you can put, so like you'll get a little pop-up in your different browsers and other things that browse it.
29:54 Say, hey, just click here to subscribe or to auto-detect it.
29:56 Yeah.
29:57 Cool.
29:57 Yeah.
29:57 Excellent.
29:58 One, yes, one final thing of my extras.
30:01 Oh my gosh, there's a lot of pop-ups on Twitter these days.
30:04 On Twitter, Lucas Schlinger pointed out, says, wow, meta, as in Facebook, meta commits to dedicate three engineering years to implement the removal of the GIL from Python and fix upcoming compatibility and performance issues as a result of that.
30:21 Oh, awesome.
30:22 How about that?
30:23 So I believe, I believe this is the, 703 is the no-kill work done by Sam Gross, who is at meta.
30:32 And there's been some hesitation of like, well, if we adopt this, how much things that are based on C and Rust start breaking?
30:40 And so it sounds like, you know, with a couple of paragraphs of information that they're saying, look, we'll both fix C-Python.
30:46 Just do it anyway and we'll fix it later.
30:48 Well, I think it's like, we'll fix C-Python.
30:50 And then maybe, maybe I'm inferring here is like, and we'll fix the popular packages based on it that might run into trouble.
30:58 I'm not sure.
30:59 But yeah, so basically three, three years, I think they were saying one to two years of actual calendar time, but with multiple people who are either core developers or very close to core developers to make this happen.
31:13 Cool.
31:13 Yeah.
31:14 So that's big news.
31:16 And those are my extras.
31:16 Nice.
31:17 I wanted to say congrats to Seth Larson.
31:21 So we mentioned him at the beginning of the show and a couple of times during the show.
31:25 Seth is the, the new security developer in residence.
31:30 So yay.
31:32 Congrats, Seth.
31:33 So there's a, we're linking to an announcement on the PSF blog.
31:37 And he also has a, oops, that's blank.
31:41 He has a blog announcing the change also, a blog post.
31:45 So pretty cool.
31:47 I'm excited to see that.
31:49 So congrats, Seth.
31:50 Yeah.
31:51 Congrats, Seth.
31:51 And there's the, you know, there's all this discussion about supply chain vulnerabilities and security and, and all of those things.
31:59 So it's, it's really excellent.
32:00 And just security in general, but thanks for coming on to make things better.
32:05 Yeah.
32:05 And nice sweatshirt, Seth.
32:07 Cool.
32:08 The other thing I wanted to announce is I'm pretty excited about this last bit.
32:14 Python people is live.
32:16 So, Python people are these Python people.
32:18 You speak of people.
32:19 So I, you know, the, the first part of like, I kind of, the, there's a couple of things that were inspiring for this.
32:27 So it's a new, it's a new, podcast, Python people.fm.
32:31 So far there's one episode with Michael Kennedy, but they're you.
32:34 but there's a whole bunch more coming.
32:36 And, I, I used to like mostly just want the tech stuff off a tech podcast, but I kind of really liked the first part of talk Python where you just like get to know people.
32:46 and I thought we should do more of that.
32:49 So, I wanted to, the, wanted to get a podcast together where we mostly focus on the people and less about the tech.
32:56 So, that's what Python people is about.
32:59 Yeah.
32:59 We talked for like 45 minutes or something, no, 28 minutes and 44 seconds.
33:04 And we almost don't talk about Python at all.
33:06 Right.
33:07 Yeah.
33:07 A little bit.
33:08 Yeah.
33:08 A little bit about what you do.
33:09 so I thought it'd be fun to like pull in, like why, I mean, everybody knows who you are, but for some people, like, what is your connection to Python?
33:16 What is your connection to Python community?
33:18 But then also just more about you.
33:20 Like we learned to have about your motorcycling and about, about being a pool shark.
33:25 Who knew?
33:27 Who knew?
33:28 Who knew?
33:29 And we talk about skateboarding with you.
33:30 So there's like a ton of other, other cool things that people might be interested in.
33:34 Yeah.
33:35 So check it out, please.
33:36 and that's all I've got for.
33:39 What if somebody else wants to be a Python people?
33:41 Can they reach out to you?
33:42 Oh, I would be a Python person.
33:44 Yeah.
33:44 I should put a, like a, be a person or I don't know.
33:47 Be a person.
33:48 Oh, maybe be a guest or something.
33:51 yeah.
33:51 Just reach out to me.
33:52 I, you don't have to be as, as well known as Michael because who is, but, I'd love to have, just like everybody on.
34:02 Why not?
34:02 Yeah.
34:03 Good luck with the show.
34:04 It's off to a good start.
34:05 And it was really fun to be a part of that.
34:07 Cool.
34:08 All right.
34:08 You ready for some, Oh, really?
34:10 Oh yeah.
34:11 We have a joke.
34:12 We have a joke.
34:13 So this is part of the, the, Oh, really book series.
34:17 you know, O'Reilly always has like an animal or something on there.
34:21 And so there's the joke series.
34:23 Oh, really?
34:23 Question mark.
34:24 It's kind of, a riffs on that a little bit.
34:27 This one is Kubernetes for beginners.
34:29 It says, what could go wrong?
34:30 And this is in the dev oops category of tech books.
34:35 Yeah.
34:36 And then the cover is, it says containers that'll fix it.
34:39 And it has that giant evergreen container ship stuck sideways in the Suez canal.
34:43 What could go wrong?
34:44 Yeah.
34:45 And just the, just the title Kubernetes for beginners.
34:49 No, beginners aren't there yet.
34:52 So yeah.
34:53 Yeah.
34:53 They probably shouldn't be doing Kubernetes, but that'll fix it.
34:55 Yeah.
34:56 Awesome.
34:57 All right.
34:57 Then you got a joke for us as well, right?
34:58 Oh yeah.
34:59 Just a, just a random one I heard the other day.
35:02 I thought it was terrible.
35:03 So I thought I'd share it with the world.
35:04 So five ants rent an apartment together.
35:07 They invite five other ants to share the rent.
35:10 Also, they got tons of room.
35:11 So now they're tenants.
35:13 Ah, tenants.
35:14 Got it.
35:15 I love it.
35:17 All right.
35:18 I got one more in that vein for you since I just installed Pi joke there.
35:21 Okay.
35:22 Single key, single word on the CLI for me.
35:26 So pirates go arg.
35:27 Computer buyers go arg V.
35:29 How about that?
35:32 Pretty bad.
35:33 Yeah.
35:33 Yeah.
35:34 But also true.
35:35 They do that.
35:36 Yeah.
35:37 Maybe.
35:38 I don't know.
35:39 All right.
35:39 Cool.
35:40 fun talking with you again.
35:41 thanks to everybody in the, in the, interwebs and on the YouTubes to watching us.
35:47 Yeah.
35:47 Thanks everyone.
35:48 Good to be back with you, Brian.
35:49 Bye.