Transcript #397: So many PyCon videos
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:05 This is episode 397, recorded August 20th.
00:09 And I am Brian Okken.
00:10 And I am Michael Kennedy.
00:11 This show, this episode is sponsored by us, so check out our stuff, our courses and training and everything.
00:16 Links in the show notes, of course.
00:19 You can connect with us on Mastodon or Fosstodon.
00:23 We're at mkennedy, at brianaukin, at Python Bytes, but you can find all of those in the show notes as well.
00:29 Also, you can go to pythonbytes.fm/live if you want to join us in the studio audience.
00:36 And finally, we have some exciting news about the handcrafted artisanal show notes in email form.
00:45 Our email friends of the show list has reached a milestone and we've already sent out prizes, which is awesome.
00:53 Yes, check your mail.
00:54 You may be a lucky winner.
00:56 I know two folks have already redeemed some courses over at Talk Python and over on your platform, right?
01:02 Yep.
01:03 You may already be a wiener.
01:04 So check your email.
01:05 What do you got for us, Michael?
01:07 I've been waiting and waiting to talk about this.
01:11 So let's talk about Pi Awaitable.
01:15 It was bad, but it had to be done.
01:17 You know what I mean?
01:17 So Pi Awaitable.
01:19 This is something I feel like probably not a ton of people are going to be using, but the concurrency
01:26 models in Python are only increasing.
01:28 The use of async and await is only increasing.
01:32 And people writing code, people writing code in B and Rust and other languages to basically create lower, lower level faster bits is increasing.
01:42 And so I put this out there to help those of you who are saying, maybe I want to rewrite the section in C or integrate with this other bit of code in C.
01:52 So this is a project called Pi Awaitable, which is really for people writing code in C, C extensions for Python.
02:00 Okay.
02:00 Okay.
02:01 And interestingly, it comes from Peter.
02:04 Last name is Birma.
02:08 Peter Birma.
02:09 And if you check out his website, it's pretty interesting, actually.
02:12 Hey, I'm Peter, software engineer from the United States.
02:14 I'm 16 years old.
02:15 Oh, wow.
02:16 I've been writing.
02:16 I've been coding since I was nine.
02:18 And this is just one of my many projects.
02:21 So there's a bunch of projects you can see that, like the pointers.py joke that was going around a while ago.
02:27 He did that and stuff.
02:28 Anyway, so that's kind of interesting and impressive.
02:30 And so this is a library that lets you create code in C that can accept an async Python function.
02:39 So if you write async def in Python, right, and create some function that uses async and await, and you pass it off to the C layer, well, that used to be kind of tricky.
02:51 This used to be, this was suggested as a pep.
02:54 If you check it out, I don't know if it got far enough to have a number, but there's like the whole PEP write up of what is the value of this?
03:02 Why does it exist?
03:03 How do you use it?
03:03 How should it be added?
03:04 And from what I gather, what I understand is that since this thing only uses the public ABI, the public interface of the C API, it doesn't necessarily have to be part of CPython.
03:19 It could just be a third party library.
03:20 So here it is.
03:21 And here's how you, here it goes, Brian.
03:24 This will, this will connect with you, I think.
03:26 Hash include pyawaitable.h.
03:29 Here we go.
03:30 Here's a function that takes a Python coroutine function or an async def type of function, uses this library to create something that can be awaited on it.
03:43 And then it returns it.
03:44 So then that basically turns the C function into an async, something that can be awaited from Python.
03:50 Okay.
03:51 So the C function is the thing that you're waiting for completion of?
03:55 Yes.
03:56 So here's a C extension written with this library that itself is effectively an async def function that you just await as if it was a native Python one.
04:06 Okay.
04:07 In the event loop and all that kind of stuff.
04:08 And it can coordinate with other async things like your own ones or the built-in, you know, async io.sleep or whatever.
04:14 That's pretty cool.
04:15 Yeah.
04:16 Pretty cool?
04:16 Yeah.
04:17 So I'm pretty short and sweet and pretty focused, so I'm not going to say much more about it, but check it out.
04:22 It's pretty new, but, you know, it seems not super advanced in terms of what it does.
04:28 So you can, if you're doing a lot of C and async programming, you can check it out and see what you think of it and use it and contribute.
04:34 Nice.
04:34 All right.
04:36 Well, I want to show you something pretty.
04:39 So look at this plot.
04:41 This is amazing.
04:42 So this is just a coal production since 1900.
04:46 So why am I showing this?
04:48 Because it looks like it came out of a magazine or something.
04:50 You've got like these call outs with, it's a stacked plot, but it's got like the colors are all, instead of doing like a key,
05:00 there's, they're, they're listed as colored names in, in one of the descriptions.
05:06 This is great.
05:07 So anyway, I like this plot.
05:09 I want to do something like this.
05:10 And luckily there's an article called annotated area charts with plot line.
05:15 Plot line is an open source Python library.
05:18 And, and this is just a good walks.
05:22 There's a tutorial that walks you through doing this, this wonderful, very professional looking plot.
05:28 And, and it's not something that doesn't even look that complicated.
05:31 Anyway, so going through this looks, looks pretty fun to, to try to do some, some fancy plots like this.
05:38 Maybe make, make my job, make me look more professional at my job.
05:42 You know, one of the, so it uses, it uses plot line, which I hadn't heard of.
05:48 And plot line is, it's based on GG plot two.
05:53 And it says plot line is an implementation of a grammar of graphics.
05:57 I did not know the GG and GG plot was grammar of graphics.
06:01 That's cool.
06:03 I learned that today.
06:05 So that's cool.
06:05 Anyway, I'm like, well, wait a second.
06:08 Is this, is this open source?
06:10 Yeah, it's all, it's all on, on GitHub.
06:12 So, and MIT licensed.
06:15 So I feel safe with, with this talk about licenses a lot lately and it, and I am paying more attention
06:20 to the licenses that I use.
06:22 So, anyway, just a fairly quick shout out to this wonderful, oh, who wrote it?
06:27 It was Nicola Renni.
06:30 And great looking blog too.
06:32 But anyway, just had to make really beautiful plots with plot line.
06:36 That's a nice looking blog and very nice looking presentation.
06:40 So plot, plot nine is new to me.
06:42 So good to know.
06:43 Right on to the next one.
06:46 We have Delta base.
06:48 So Brian, I'm sure you've heard of SQLite, the embedded database that you can just point at
06:55 a file and run.
06:56 So Delta base is kind of like that, but broader, I guess.
06:59 It's a lightweight comprehensive solution for managing data, Delta tables built on Polars
07:05 and Delta Lake.
07:06 All right.
07:06 So some, some definitions for this makes sense.
07:09 So Polars is a data frame framework, very much like pandas.
07:14 I actually had a guy who created it on talk Python quite a while ago when it came out.
07:19 And the idea is one, it's super fast, but two, the way that you work with it is a so-called
07:27 fluent API.
07:28 Scrolling for an example, not finding one, a fluent API that has deferred execution.
07:33 So when you work with Panda, you might say, do this filter and then transform this and
07:37 then multiply that thing by something.
07:39 It just does every one of those steps and then processes it together with Polars.
07:43 It says, okay, I see what you're doing.
07:46 And first you told me to multiply.
07:48 And then you told me to filter.
07:49 But if I filter and then multiply, I'll be multiplying way fewer things potentially.
07:54 Right.
07:54 So that's kind of the big difference.
07:56 Anyway, super cool.
07:57 Built on Rust.
07:58 So obviously it's got some pizzazz behind it.
08:02 So are you saying that you can write it in a fluent way that makes sense to you, but it'll
08:06 rearrange it if it makes sense to Polar?
08:08 Yeah.
08:08 It has like a query optimizer type of deal.
08:10 It's not quite a query because you're not writing a query, but it has a deferred execution and
08:15 it takes into consideration.
08:16 If I remember this correctly, it takes into account all the different steps because it doesn't
08:22 actually execute until you give it like the command.
08:24 And so it's built up all these steps that it can do.
08:27 And so it can make decisions about that.
08:29 Oh, that's cool.
08:30 Okay.
08:30 Yeah.
08:30 Which is really cool.
08:31 But in other ways, it's very similar to pandas.
08:33 Not trying to be a copy of it, but that's, you know, it's kind of plays the same space.
08:37 All right.
08:37 So that's one thing.
08:38 The other is Delta Lake.
08:41 This is an implementation of Delta Lake, I guess.
08:45 And with a space, rather than with a space, without a space.
08:50 Oh, that clears it up.
08:51 Totally.
08:52 Oh, yeah.
08:52 So absolutely.
08:53 So this is a format, actually, that allows you to talk with computational engines such
09:01 as Spark, Hive, Snowflake, but also things like DuckDB and others.
09:07 And you can just point it at a local file.
09:09 You don't even have to have a server.
09:10 Okay.
09:11 So this is a pretty cool looking library that lets you basically, you know, it's optimized
09:17 for doing upserts and all sorts of things like that.
09:21 efficient versioning and so on.
09:24 So you just pointed at some path if you want, sort of the SQLite experience.
09:29 And then you say, here's a table.
09:32 It has a primary key with its name.
09:34 And here is a bunch of data I want you to put into it.
09:36 And notice that there is no, here's my SQL create statement and my table schema and all
09:44 of those things.
09:45 Right?
09:45 Like, where is that?
09:46 Doesn't exist, does it?
09:47 So you just say, I'm going to commit this thing.
09:51 Also, if you go, you can do select statements against it, right?
09:54 Query statement, SQL statements against it.
09:56 You go and look at the docs, which I did.
10:01 Here we go.
10:01 Which are a bit of a work in progress here.
10:03 However, if you go and check out the docs, it shows you, for example, under connecting that
10:08 you can connect to just a path, but you could also connect to an S3 bucket.
10:13 You can connect to some kind of Azure data lake container or Google cloud storage, or as
10:21 you saw, a big query.
10:22 So this is pretty interesting, right?
10:24 Just change your connection string and you get these different data tables.
10:27 Neat.
10:28 Data lakes rather.
10:29 Yeah.
10:29 So that's what I have for people.
10:31 If they're doing this kind of stuff, you know, this is something kind of a wrapper around
10:36 those things.
10:36 Also not super popular, but I don't know, this week I kind of felt like shining a light on
10:41 things that were new and could maybe catch on with folks.
10:44 Yeah.
10:44 It looks fun.
10:46 Yes.
10:46 Also fun videos, I think.
10:50 So I wanted to highlight a blog post on the PyCon blog at blog spot, which still just cracks
10:59 me up.
10:59 But anyway, it's PyCon US 2024 recap and recording release, which I was confused by.
11:07 I would have thought a recording release was something you had to sign to make sure that
11:11 your video was releasable.
11:13 But it's no, we just wanted to say that the videos from PyCon are out and I'll take a look
11:19 at those in a second.
11:20 One of the highlights that they noticed was that there were a lot of people showing up.
11:27 There was a total attendance of 2,991.
11:31 That's 2,551 in person and 440 online.
11:37 So that's pretty cool.
11:38 I was just curious.
11:39 I looked.
11:40 Michael reminded me that if you go to look at PyCon on Wikipedia, it has a list of years of
11:49 attendees.
11:50 I think it was like a hotel or something.
11:58 Yeah.
11:58 And then I started going in Portland and we were at over 3,000 in Portland.
12:05 And then Cleveland was over 3,000 as well.
12:08 And then the pandemic hit and it went down quite a ways.
12:11 But we're back to better numbers.
12:15 2022 was 1,700.
12:17 2023 now is over, was 2,100.
12:22 And now we're up to 2,500-ish in person.
12:24 Let's say it's going better.
12:26 I think I'm not.
12:28 If I'd be totally up for going possibly next year, but I'm totally going to hit Long Beach
12:34 in 2026.
12:35 That sounds great.
12:36 Oh, yeah.
12:37 I'm definitely going to Long Beach.
12:39 Yeah.
12:39 Bring on some SoCal.
12:40 Let's do it.
12:41 Okay.
12:41 So they also announced in this announcement that there's a, where is it?
12:46 Somewhere in there.
12:47 It has a link to the YouTube thing.
12:49 So you can find the link there, but you can also see it in our show notes.
12:52 So if you go to PyCon US at YouTube, all the videos are now up.
12:56 And my favorite way to get them is to just hop over to the playlist.
13:00 You can go to the, there's a 2024 thing, but underneath it, you can see the full playlist.
13:06 And I like that one because I can see all of the names of the, of the videos.
13:12 So you don't just hit play on the playlist and just binge.
13:15 No, no way.
13:17 But so if you, if you just hit the playlist though, if you start it, you can pause it.
13:23 But then all the little, all the, the playlist is over on the side, but you can't see the
13:29 titles.
13:29 Yeah.
13:30 Yeah.
13:30 Yeah.
13:30 So I agree with you.
13:31 This is the same way as I do the same way.
13:34 Anyway, I've already got queued up and you can search, you can search easier with this,
13:39 this way as well.
13:40 I'll go away.
13:41 And so I already queued up a search for test stuff, of course.
13:46 And I've got queued up pipe, pipe test for unit testers by Paul Gansel.
13:50 And then this one looks pretty good.
13:51 Testing data pipelines with the Emotish Swain.
13:54 So yeah, it does look cool.
13:56 Anyway, lots of stuff to check out.
13:58 Awesome.
13:58 Awesome.
13:59 That's all we got for that.
14:00 That's all we got.
14:01 Those are all of our main items.
14:03 Yeah.
14:04 Got any extras?
14:05 I do.
14:06 I have, I have multiple.
14:09 I have a couple of things I want to talk about actually.
14:12 One, I just impromptu added here.
14:14 So I've been, one of the things, one of the things I've been working on, Brian, is trying
14:19 to do like a little bit less being not distracted by my phone, but just pulled in by my phone
14:26 and other digital things.
14:28 Right.
14:28 You go, you're like, oh, I got a notification for a text from someone or my music stopped.
14:33 Why the heck did it stop?
14:34 Happy AirPods.
14:35 I got to go back and like, find it and make it go again.
14:37 Because I paused it for three minutes.
14:39 So it must have killed the app.
14:40 Like that makes sense.
14:41 You know what?
14:42 Super computer in your pocket.
14:43 So you go and open it up and you're like, oh wait, that has a little dot or that has a
14:47 little like badge of three on red.
14:49 What is that?
14:49 And then you start scrolling and then you're over there.
14:51 And then, you know, it just, there's just this like pressure or this sort of gravity
14:58 of, of that thing being around.
14:59 So I am taking an attempt and I would love to hear your thoughts on this.
15:03 So making an attempt to make my home screen feel less, more, less like a black hole
15:09 that sucks me in and more like a, I've come here for a purpose.
15:11 Let me do the thing and then go on.
15:13 I would, I looked at maybe getting an Android phone, like a really option to have like a
15:19 real dumb interface, like the nothing phone would be really cool or something like that.
15:23 But with my Apple watch and all my other things, basically I have to just throw that thing
15:28 in the trash if I switched to Android, which is really unfortunate, but I'm like, all right,
15:31 well, I'll stick with my iPhone.
15:33 So I'm, I started using this thing called dumb phone.
15:35 Have you heard of this?
15:36 No.
15:37 So what it does is it uses some weird tricks to take over your home screen on iPhone.
15:44 And it just has a really, really simple display.
15:48 Like the phone, instead of being an icon, it's just the word phone, your messages, instead
15:52 of being the green thing with the, like the three in red is just the word messages and so on.
15:56 Okay.
15:57 And so for example, here's a, I'll link to it.
16:00 I'll link to it.
16:01 I'll link to it.
16:01 I'll link to it.
16:02 It's a screenshot of my iPhone 13 mini.
16:04 It just says web bone messages, maps, weather, and photos on a gray white text on a gray background.
16:08 And you can swipe it over.
16:09 Like the next one I think is videos, podcast news, something like that.
16:13 You know, and the ones like productivity, like mail and calendar.
16:17 Okay.
16:17 If you still want, you still wrote where you're at Mac, you can, you can pull down, you can
16:20 search, or you can even keep swiping until you get past this.
16:24 Anyway, this, I'm trying this and people, if they want to try to go down this path so far,
16:29 I'm liking it.
16:30 I've been messing with my phone.
16:32 It's been effective.
16:33 I've been like stuck in my phone less.
16:35 I'm not a person like, oh, I can't have my phone with me.
16:37 I have it with me all the time.
16:38 But when I go and like check my messages, I don't end up somewhere else as often, let's say.
16:43 So I did, I just like took, I've just got a handful of things like those sorts of things
16:49 on my home screen, but I just have a few on my, on the first screen and everything else
16:54 is on some other page.
16:55 Yeah, that makes sense.
16:56 So that I can just see my, and then I have a background picture of my lovely wife there
17:00 so I can see.
17:00 Yeah, I did have to give it my background.
17:03 I guess I could put a background, but it wouldn't look right because the way this thing works.
17:06 Also, I took off all of the badges.
17:10 The, the, the, the only thing that I, the only thing that gets a little number that
17:15 I still left was the phone messages because I, I actually don't check that very much.
17:21 So I'd like to see if there's a message.
17:22 Not, not actual.
17:24 Oh yeah.
17:25 Actual messages and, you know, phone, like somebody left a voicemail.
17:29 Like who does that anymore anyway?
17:31 But, but at the same time, I don't answer my phone.
17:34 So if, if I don't recognize it, so the doctor might leave it messages anyway.
17:39 Yeah, exactly.
17:40 But I'll be curious to see how long you can deal with that.
17:42 You could also just get a cheap phone, but you know, maybe you can, but that's hard to
17:48 do now.
17:48 It's super.
17:49 Well, it's like, okay, well, I also want to have, you know, a nice GPS if I'm somewhere
17:54 and I want to have CarPlay in my car because I have like a big display that's like a beautiful
17:59 screen while I'm driving.
18:00 And yeah, it's like.
18:01 And occasionally you're stuck somewhere and you want to read something or whatever.
18:06 Yeah.
18:06 Yeah.
18:06 Yeah.
18:06 I'm not trying to not use.
18:07 I'm just trying to like, when I open and I look at it, I don't want it to be a black hole.
18:11 And right now, oddly, it's like a very dark gray, not black, but.
18:15 It's a gray hole.
18:15 It's a gray hole.
18:16 That has no interest to me.
18:18 Okay.
18:19 I will see.
18:19 I'll report back.
18:20 I'll report back.
18:21 Either I give up or I do that.
18:23 And then one more thing.
18:24 We're coming up on the last time for the Code in a Castle.
18:29 So if you want to come to Italy with me and talk about Python and databases and APIs and
18:35 all sorts of fun stuff, got a couple of weeks to sign up.
18:39 So codeinacastle.com and I hope to see you there.
18:43 Nice.
18:43 Cool.
18:44 The extra I've got is I want to say, hey, I finally got the new course done.
18:50 So Hello pytest is available.
18:52 I got to figure out how to take this away.
18:54 It says 16 lessons, but it's not.
18:56 It's 12 lessons.
18:58 Some of the things, it's like counting the intro and the source code as lessons.
19:04 Those aren't really lessons.
19:05 Anyway.
19:05 So 16 lessons under 90 minutes, I think.
19:10 Slightly under 90 minutes, including the intro and outro.
19:13 So there are only a few minutes of video there.
19:15 But check it out.
19:17 You can have full, the full content, table of contents is there at courses.pythontest.com.
19:26 And yeah, loved it.
19:27 Loved to hear what people think.
19:29 And I'm going to just stick it with 10 bucks for a while.
19:32 I've had a lot of great feedback that said that's about, that's a cool price point.
19:35 So I'm going to leave it for a while.
19:37 Awesome.
19:38 Anyway.
19:38 And congratulations.
19:39 That's a big deal.
19:40 Thanks.
19:41 And I'm kind of, we talked about this a little bit.
19:44 I used Camtasia to record this.
19:46 And I'm going to, I think I'm going to try to try working with OBS Studio a little bit.
19:54 Yeah, you definitely should.
19:55 There's some stuff I love about Camtasia though that OBS doesn't seem like it does.
20:01 Let's talk after.
20:03 Yeah.
20:04 Let's talk after.
20:04 There's some really neat stuff.
20:05 I know you have a little mini stream deck as well.
20:07 And that's really awesome for like swapping up the views while you're doing recording and stuff.
20:11 So.
20:12 Yeah.
20:12 Yeah.
20:13 Cool.
20:13 Well, do you have anything funny for us?
20:15 I will let you be the judge.
20:17 I have philosophy for us.
20:19 Okay.
20:19 So previously we've talked about the Tau of programming and I want to come back to the Tau of programming.
20:24 And this is like a parody, ancient philosophy, sort of Eastern philosophy, sort of thing here.
20:31 So this one is 4.3 from the Tau.
20:35 Okay.
20:35 Okay.
20:36 A master was explaining the nature of Tau to one of his novices.
20:39 The Tau is embodied in all software, regardless of how insignificant, said the master.
20:44 Is the Tau in a handheld calculator?
20:47 Asked the novice.
20:48 It is, came the reply.
20:50 Is the Tau in a video game?
20:51 Continued the novice.
20:52 It is even in a video game, said the master.
20:55 Is the Tau in the DOS or a personal computer?
20:58 The master coughed and shifted position slightly.
21:01 The lesson is over for today, he said.
21:02 Yeah.
21:05 Pretty good.
21:08 Yeah.
21:08 Yeah.
21:09 That's good.
21:09 And you can be okay with like joking about DOS.
21:14 Because it doesn't even exist anymore.
21:16 Yeah, exactly.
21:16 Exactly.
21:17 It's not going to hurt anybody.
21:19 Nobody's.
21:20 Except for those three people who are still on their 386 and won't give it up.
21:23 Word perfect is perfect for me.
21:26 I love it.
21:27 Come on.
21:28 I remember getting my 386.
21:30 I'm like, gosh, I don't think I can.
21:32 I don't think I'll need another computer for a really long time.
21:34 I know.
21:34 I got a 486 DX33.
21:36 Not the SX25 megahertz.
21:39 The DX33.
21:41 And it had a turbo button.
21:42 And it was amazing.
21:43 A turbo button.
21:44 Like, why would you turn it off?
21:45 Because if you wanted to play the games written for the 286, they went really fast and you couldn't play them at all.
21:50 It was out of control.
21:51 So if you hit, if you disable turbo, it was more of a slow it down button, but they didn't want to call it that.
21:56 So you could play the ones that just use the frame rate instead of real time or frame.
22:01 Like MechWarrior and stuff, I think was out of control.
22:04 It was like those old record players that you had that speed controls on them.
22:08 Yes, exactly.
22:09 For the small ones or the big ones.
22:10 Yeah.
22:11 45s and whatever.
22:12 Okay.
22:13 Nice.
22:13 Okay.
22:14 Well, thanks again for our wonderful Python bytes.
22:17 And we'll see everybody next week.
22:19 See you later.