Transcript #308: Conference season is heating up
Return to episode page view on github00:00 Hey, Brian.
00:00 Hey.
00:01 I see that you've come wielding a staff of mighty power.
00:04 I was cleaning my office and I found the Python staff.
00:07 So I'm like, I'm working this out for the show.
00:09 Yeah, that was when we used to go to conferences.
00:12 Do you remember that?
00:12 Like people, they'd all get together.
00:14 I think they might be making a comeback.
00:15 I think so.
00:16 I think I might be attending some conferences in the future.
00:19 Awesome.
00:20 So am I.
00:20 I'm looking forward to it.
00:21 Before we get to our topics, also want to say thank you to a new sponsor this week.
00:27 Not totally new, but new for recent times.
00:30 Compiler, the podcast from Red Hat.
00:31 So awesome to have the support from Red Hat.
00:34 We're going to be telling you more about them later.
00:36 But Brian, let's just mix it up.
00:38 Let's make it different.
00:39 This is episode 308, recorded November 1st, 2022.
00:42 I'm Michael Kennedy.
00:43 And I'm Brian Okken.
00:44 Let's do it.
00:46 I did want to talk about PyCon.
00:47 Yeah, so PyCon is coming up.
00:50 So when is it?
00:52 I wrote this down even so I could remember.
00:56 It's April 19th to the 23rd.
00:58 But we bring up PyCon US because the site just launched recently.
01:05 So pretty excited about that.
01:07 Linking to a blog post about the site launch and the call for proposals.
01:12 So again, it's going to be, let's just hop over to the big one.
01:16 It's kind of a cool look to it now.
01:19 It's an homage to some of the old ones because there's, what's the 20th anniversary special?
01:25 So it's some of the old pictures.
01:27 So you can try to see.
01:28 Oh, I see.
01:28 So it's a bunch of tiles.
01:30 And the different tiles are actually like the hero image or whatever.
01:34 Yeah.
01:34 From that year.
01:35 Or bits of it or something.
01:37 Yeah.
01:38 It looks cool.
01:40 So PyCon US is going to be April 19th to the 23rd.
01:45 Well, that's when the talks are.
01:46 It's longer.
01:47 So there's tutorials ahead of time.
01:49 And then there's hack days or whatever you call those afterwards.
01:53 So if you can stay longer, awesome.
01:56 But the talk part is the 19th through the 23rd.
01:58 Salt Lake City.
02:00 The site looks great.
02:02 The call for proposals is up.
02:04 And that's really kind of what I wanted to highlight is so people start thinking about your talks.
02:09 And of course, yeah, we've got some more information about talks coming up later in the show.
02:15 But the deadlines, what are the deadlines?
02:18 So we've got the CFP just opened, just opened the 18th.
02:21 And then it's through December 9th.
02:25 So, but don't wait until December.
02:27 Get those in early.
02:29 So anyway.
02:30 Yeah, excellent.
02:31 I think I'm going to submit some because I kind of think I want to go to PyCon this year.
02:35 I didn't go last year.
02:36 Have you thought about it yet, Michael?
02:39 Yeah, I've definitely thought about it.
02:40 I'm very much considering going.
02:42 You know, for me, it's like, is Talk Python going to get a booth and have like a bunch of presence there?
02:48 In which case, going to the conference means hanging out at the booth for three days, which is kind of awesome.
02:53 But also, it's like not exactly a conference.
02:55 Maybe I'll go low key and submit a talk and then just like cruise around the hall.
02:59 I haven't decided.
03:00 Right.
03:00 Do a bunch of podcast recording live there.
03:02 Right.
03:02 So there's there's tradeoffs to both, obviously.
03:04 So I got to got to think about what I might want to do.
03:07 Yeah, I think I'm going to submit some talks.
03:10 One of the things I wanted to bring up with submitting talks is to not to do it because it's a good experience to submit a talk.
03:17 Even if you don't get the talk, it's the process of going through that submittal process.
03:22 I think it's it's it's a growing growth experience, even if even if it gets rejected.
03:27 And don't feel bad because tons of people submit talks and they can't accept all of them, obviously.
03:33 So, yeah.
03:33 Yeah.
03:34 Absolutely.
03:35 Cool.
03:35 Cool.
03:36 Yeah.
03:36 That'd be exciting.
03:37 I actually want to do a bit of bookkeeping before we move on.
03:41 Yeah, it's a good idea.
03:42 For people who typically attend our live stream recording, which we really appreciate that.
03:47 That's awesome.
03:48 We see a bunch of familiar faces in the chat already out here and we do that live on YouTube and then we polish it up and send it out to the world over the audio channels.
03:58 So I think you can get a lot out of the video version.
04:01 That said, we're moving the video version, right?
04:04 We are.
04:05 And it's my fault.
04:06 So I've got a periodic meeting that happens in my day job and it happens at noon on Tuesdays.
04:15 And that's when we usually used to record.
04:17 So we're just shifting it a little bit.
04:19 So we're going to do 11 a.m. on Tuesdays.
04:22 Exactly.
04:22 It's just an hour earlier on Tuesdays.
04:25 So I want to encourage people to go to Python Bytes.fm slash YouTube and it'll take you over to our channel.
04:32 If you subscribe and get notified, you'll just get a pop up when we're streaming live.
04:36 And if you've got time, you can drop it.
04:38 You don't have to plan too much about it.
04:39 So anyway, encourage people to be part of the YouTube experience here because we put a lot of stuff on the screen and it makes it even a little bit cooler, I think.
04:47 And while we're bookkeeping and it's 11, if you can make it 11 a.m. on Tuesdays, maybe you want to be on the show.
04:53 So reach out if you'd like to be a guest host.
04:56 We still do those.
04:57 Yeah, exactly.
04:58 I do.
04:59 I wonder if I've got anything to talk about.
05:00 Let's see.
05:00 How about NEIO?
05:01 NEIO is a framework that lets you build async things.
05:06 And when you first hear about it, it looks like it's kind of for making network libraries.
05:13 Like if you were making a low-level network app and you wanted it to be concurrent and asynchronous, like, well, you could use NEIO, which would be cool.
05:20 And it has the ability to be, how did Alex, the creator of it, put it?
05:24 Something like a framework that goes above the asyncio frameworks.
05:28 So it doesn't, like, if you think of Trio or Curio, those are replacements for asyncio.
05:35 Whereas NEIO will run on top and integrate with asyncio, or it will run on top of and integrate with Trio.
05:41 So you can kind of add it into whatever you're doing, which I think is pretty sweet.
05:45 But I think its little elevator pitch or whatever here sells it a bit short.
05:50 So I just wanted to talk about some awesome building blocks that people can use from NEIO that I think would make it really fun.
05:57 All right, so one of the 3.11 features actually is this idea of task groups.
06:04 And they also have this concept of task groups over, they had it originally in Trio, and then it comes over here about these groups.
06:14 And what you can do is you can basically create a task group, do a bunch of work on them, and then when it exits that width block, it's all finished.
06:22 So if you're not ready to go to 3.11, but you want to have task groups, here's one way to get it.
06:27 So that's one thing that's kind of cool.
06:29 It supports cancellation and timeout, which is important, especially as a group of related things.
06:34 But one of the things I want to touch on here that's pretty cool is the synchronization primitives.
06:39 Remember a few weeks ago, Guido wrote that article about people at a table and semaphores and stuff?
06:44 Yeah.
06:45 Yeah, so...
06:46 That's the thing.
06:46 Yeah, exactly.
06:47 So there's a couple of those types of primitives here that are really neat.
06:51 So they've got events, which allow you to just run up to a point and wait until some other asyncio thing comes along and says, now go.
06:59 And these are similar to the events that are built into the standard library, but they're not reentrant.
07:06 And they have a little bit...
07:07 They claim to have a better way of presenting a race condition, a little bit closer to Trio.
07:13 So there's those.
07:15 And one of the ones over here that's cool is capacity limiters.
07:18 I think I did talk about this one before.
07:20 So you can go over here and just say, I want to only do...
07:24 In this case, the example says, create a capacity limiter two.
07:26 I only want to do two things at a time.
07:27 But yeah.
07:29 Then, let's see.
07:30 Another one is this working with threads.
07:33 Pretty awesome.
07:34 So you can...
07:36 Given some function that is just a regular function, you can turn it into async, but actually have it execute on a background thread with two thread.
07:44 Wow.
07:44 Give it that.
07:45 And then you can await it just like other things that mix into your asyncio world.
07:49 You can also do it in reverse.
07:50 If you're over in a thread and you need to run it on the async event loop, you can also push it.
07:57 You can say from thread and to thread.
07:59 The two thread is the...
08:00 I believe the one that...
08:01 Now the from thread will push it back.
08:02 Back to the async event loop, which is cool.
08:04 Let's see.
08:05 Also, subprocesses are pretty awesome.
08:09 So you can do...
08:10 Like you have this idea of running your code in a thread because it's not async, but you want it to be kind of concurrent and mix it in.
08:17 You can do the same thing with subprocess.
08:19 And this is super cool.
08:20 So you can say just run process and then it becomes something that's a task that you can await along with your other things.
08:26 Nice.
08:26 Which is sweet.
08:27 And then you can even go as far as to open the process and then like asynchronously work with it.
08:33 So here's an example of where you open some process and then you create a text receive stream from its standard out and you just cruise around and read from it while it's running.
08:41 Awaiting all the time.
08:42 Wow.
08:43 That's neat, right?
08:44 Yeah.
08:44 So it just grabs it while it's printing out?
08:48 Yeah.
08:49 So basically what I think it does is it creates a stream that you can await and then it's just listening for process messages to come through.
08:58 And then it, you know, like the task kind of partially completes, right?
09:02 Because it's an async for loop.
09:04 So you asynchronously wait for an item to come in and then it kicks it one time around the loop and then it waits again.
09:08 And yeah, it's pretty cool how it juggles that.
09:10 Yeah.
09:11 And then finally here, the file support.
09:15 So you can now, instead of saying open, you just say any IO dot open file, but you can async await it.
09:22 You know, it's crazy.
09:24 Async with await.
09:25 There's a lot of crazy stuff happening.
09:27 But then you can await the reads and so on.
09:29 Now there's not actual asynchronous behavior in Python.
09:33 So how does it manage this?
09:34 Basically, it creates a wrapper that uses threads that does the file IO.
09:39 And then it just sort of coordinates the communication of the IO back and forth on the threads.
09:44 As soon as it comes back from IO, which should release the GIL because it's off doing its own thing in the OS.
09:49 So it should be pretty good anyway.
09:50 It looks like maybe I haven't used this, but it looks like it makes things like subprocesses and threads and normal async and await all kind of look the same.
10:02 Yeah, exactly.
10:03 It's like a unifying API across the different scenarios, which is really cool.
10:08 Once you kind of wrap it, you're like, oh, there's just a bunch of tasks.
10:10 I just call await on them.
10:12 Good to go.
10:13 Nice.
10:13 And then possibly it wouldn't be too much if you had to change your mind and have something be a subprocess or a thread.
10:21 Instead, it might not wreak havoc on your design too much.
10:24 Yeah, exactly.
10:25 You almost don't even have to worry about it.
10:27 As long as the parameters can be passed, right?
10:31 They've got to be pick a little bowl to go across the wire there.
10:36 But as long as they can be passed to the process as well as to a thread, then you just get a task back that talks to you.
10:43 It's cool.
10:43 I'll definitely take a look at this.
10:45 Just before I move off of this, I just want to say also I interviewed Alex Grunholm over on Talk Python.
10:51 When was that?
10:52 September.
10:53 Actually released it in October, though.
10:55 So effectively October or a couple weeks ago.
10:58 And people can check that out if they want to dive deep into it and hear that story.
11:02 Anyway, I feel like, yeah, yeah.
11:04 Thanks.
11:05 I do just feel like any I.O. sells itself a bit short.
11:07 Say, no, it's like a network library.
11:09 Like, oh, I don't need a network library.
11:10 But no, there's like all these little cool building blocks in there.
11:13 Pretty cool.
11:14 Have you used it?
11:15 Is it pretty nice to use?
11:16 I've not used it.
11:18 Okay.
11:18 I'm still working on getting my interesting projects more async capable, you know, before, like, for example, getting some of the web stuff in the front end can be more async and so on.
11:30 Then I can start bringing these fun ideas in more on real projects.
11:34 Back to your topic real quick.
11:35 Brandon and Audien says, if one was looking at submitting to PyCon, what's the difference between a tutorial versus a talk?
11:42 Time?
11:43 What else, Brian?
11:43 Hands on exercises?
11:44 Right.
11:45 So, tutorials are, what, like three hours or something?
11:48 I can't remember how long they are.
11:49 And, okay, so they're three hours.
11:53 They're also at a different time.
11:54 So, they're like not on the same day.
11:55 The day before or something.
11:56 I mean, I think they're like two or three days before.
11:59 I can't remember how many days before they run them.
12:01 I should have looked this up.
12:02 Yeah.
12:03 But they're before the conference.
12:04 So, you have to, you have more hotel tickets to get, for instance.
12:08 But since it's three hours and a talk is what?
12:11 Like 25 minutes or something?
12:12 25 minutes, yeah.
12:13 Half hour?
12:13 Since there are more work to prepare for a tutorial, you get paid for them.
12:18 You get a little stipend.
12:19 But also, people have to pay to talk, go to the tutorial.
12:23 So, you know.
12:24 But I think there are cool things.
12:26 I know a handful of the people we know do like to do tutorials if they can.
12:30 Yeah.
12:31 I think it's also a lot more guiding people through hands-on coding than it is, I'm here
12:36 to like present.
12:37 Yeah.
12:38 It's not a three hour.
12:38 It shouldn't be a three hour presentation.
12:40 It's like, we're going to present something and then have exercises for people to work on.
12:45 People bring their laptops in and stuff like that.
12:47 Yeah.
12:48 Yeah.
12:48 But then there's also, one of the things that people forget about is posters.
12:52 Posters are also pretty cool.
12:53 On the last day of the, on Sunday, I think it's on Sunday, they have the posters up.
12:59 The posters and the job fair, right?
13:01 Yeah, I think so.
13:02 The job fair and the posters at the same time.
13:03 And it really literally is a poster.
13:06 So that if you get one of the poster spots, you get a section where you get to have your
13:12 poster up and you can describe whatever you want on there.
13:15 Hopefully it's fairly entertaining to look at and read.
13:18 And then you get to hang out.
13:19 So let's say you've got a project you want to talk to people about.
13:22 It's not really a presentation.
13:24 You have your poster up and you just hang out there and then people come around and ask you
13:28 questions.
13:28 Yeah.
13:29 That's pretty neat.
13:29 Absolutely.
13:29 Yeah.
13:30 Yeah.
13:30 If you want to have a chance to just have a conversation around something you're working
13:33 on, but not go all in on a talk.
13:35 I tried to submit a keynote once.
13:37 Turns out you can't do it.
13:38 Oh, are they, do they ask people or something?
13:40 Keynotes are invite only, Michael.
13:42 You can't submit a keynote.
13:43 I'm like, well, I'm submitting one.
13:44 You can turn it down if you want.
13:46 They did.
13:47 It's all right.
13:47 Okay.
13:49 Now, I want to tell you about one more thing.
13:51 Awesome.
13:51 One awesome thing before we move on, Brian.
13:53 I'll tell you about compiler podcasts from Red Hat.
13:57 So super cool to have Red Hat come along and supporting the show.
14:01 And, you know, like pretty much everyone listening, you and I were fans of podcasts.
14:06 And so it's awesome to have this compiler from Red Hat supporting the show.
14:10 Really, really good show that they have themselves.
14:12 It's very highly edited and polished.
14:14 So that's excellent.
14:15 If you want to stay on top of tech without dedicating tons of time to it, you can listen
14:20 to compiler.
14:20 They present different perspectives and topics and insights from the tech industry, free from
14:25 jargon and judgment.
14:26 They want to discover where technology is headed beyond the headlines and create a place for
14:30 new IT professionals to learn, grow and thrive.
14:33 They help people break through barriers and challenges, turning code into community at all
14:38 the levels of the enterprise.
14:39 One recent interesting episode is the one about the great stack debate.
14:43 I love, love, love talking about, talking to people about their architecture and the trade
14:48 ops and choices that they made and what the costs and challenges and, you know, it smiled
14:52 and frowns that result from that.
14:54 So you can definitely check out the great stack debate.
14:56 That's a fun one.
14:57 They answer the question of whether software is like an onion or like it's lasagna or whether
15:01 it's some other more complicated dish.
15:04 So you can check that.
15:05 That's a lot of fun.
15:05 And it's actually first.
15:06 Yeah, go ahead.
15:07 Looks like the most recent one is about testing, too.
15:09 I better check that out.
15:11 Yeah.
15:11 You got to get in there.
15:12 They have a whole series on the compiler, the compiler series on software stacks.
15:17 And I guess testing is an important part of that.
15:19 It's awesome.
15:19 Yeah.
15:20 So learn about compiler at pythonbytes.fm/compiler.
15:23 The link is in your podcast player show notes.
15:25 I know you could just search for compiler and sign up, but follow the link and click on your podcast player there and subscribe.
15:31 That way it would really help us let them know that you heard about them from us.
15:35 So thanks to compiler for keeping this show going strong.
15:38 All right, Brian, what's next?
15:39 Well, I was going to talk about conference talks.
15:42 So some more.
15:45 So I think everybody should try because I actually I I was terrified to do my first talk and I think it was a good experience.
15:54 So Reuven Lerner, Reuven Lerner, friend of the show and all around awesome guy, wrote an article called how to propose a winning conference talk.
16:04 So we're linking to that.
16:05 And what there's a lot of there's a lot of articles on how to do a talk.
16:08 And what I like, what I really like about this is it's short.
16:11 There's a there's a few things that he focuses on.
16:16 One of the the first is like coming up with ideas and he like part of his audience is also other trainers.
16:24 So but I think that more people are trainers than you realize.
16:28 So maybe you're maybe you actually teach people like Reuven does or, you know, you have a training gig.
16:35 But you could teach mentor or lead or coach in other ways just by being the resident Python guy or girl or woman or whatever at your company.
16:46 And when people come to you and ask questions.
16:47 So one of the some of those things are to come up with a list of things to talk about.
16:51 What questions do people ask you all the time?
16:54 Those are great things to break talks about.
16:56 Maybe what knowledge, what knowledge do you think people should have that they just don't know to ask about?
17:02 Those are also great topics.
17:03 And then also, where do you see that people just don't seem to get it?
17:08 And so somehow they're not getting some concept.
17:11 They don't quite get it from whatever they've sought out.
17:14 Those are also great things.
17:15 And if and if that if you're still stumped, he says, well, check out Stack Overflow.
17:20 What kind of questions come up there all the time?
17:22 Those are those are good things to maybe give a talk about.
17:24 So, hey, I got a cheat code for people listening.
17:27 OK.
17:27 What awesome thing did you hear about on Python bytes that was like new to you?
17:31 And there's not a talk at the conference.
17:33 I'm serious.
17:34 Yeah, exactly.
17:35 Yeah.
17:35 You know, rewind a handful of episodes and go through and go, that sounds interesting.
17:40 And, you know, spend a few hours researching it and come up with a talk.
17:44 Why not?
17:44 Right.
17:45 Right.
17:45 It's interesting to me.
17:46 I want to learn it.
17:47 And then I could present it.
17:48 You know, you could test drive these things.
17:50 So it's smaller regional conferences.
17:51 You could test drive them at meetups.
17:54 You could test drive them as like a YouTube video that you post somewhere or even a blog
17:58 post you write.
17:58 Like there's a bunch of let me take a shot at it and then build some confidence and then
18:02 submit it to PyCon US or Europe or wherever.
18:06 Yeah.
18:06 He goes on to talk about using an outline.
18:11 And even if you don't go for a talk, maybe I don't remember if I think PyCon US does ask
18:19 for this, but some don't.
18:21 But even if it's not asked for, come up with an outline with times.
18:25 And that part freaked me out.
18:26 I'm like, how do I do that?
18:28 But his example is fairly not scary.
18:32 It's kind of the bullet points of the sort of stuff you're going to talk about.
18:35 And how long you intend to talk about it.
18:38 And this is actually really important.
18:40 I, when I, when I finally embraced this and went, I got to think about this.
18:44 And I kind of do this hand in hand with this, the next step, the next step, he said, is you
18:49 don't just need an outline.
18:52 You need a summary and you kind of need a short summary and a long summary possibly.
18:56 And that's, and you should include, I can't remember where he wrote this down, but you
19:03 should include, what is it?
19:05 the value that people get, what benefit they'll get from your talk and what knowledge
19:10 they'll get, what they'll have when they leave your talk and how will that help them?
19:14 And think about those.
19:16 And that while you're putting through your, your outline together too, as to where you
19:20 want to spend your time and, you know, be paying attention that you do want to have some,
19:24 some wrap up time possibly.
19:26 And you might want some introduction time.
19:29 So include that and think about those times.
19:31 And then you've got just these little tiny one or two minute, one or two or three or four
19:35 minute segments that you've got to come up with words for.
19:39 And that's actually a lot easier to deal with than thinking I got to come up with 25 minutes.
19:45 Right.
19:46 So yeah.
19:46 Like an example here, it says generate warnings, two minutes.
19:49 Could you spend two minutes talking about generating warnings?
19:52 I imagine you could.
19:53 Yeah.
19:55 And if it's important, put throw, throw some time into it.
19:58 But the, the, one of the things I wanted to highlight on this, I really liked this write
20:03 up.
20:04 He also, a couple more things.
20:05 One is submit the same talk to multiple conferences.
20:08 You can do that.
20:10 And you don't even have, it doesn't even have to be new.
20:12 You could have already submitted, presented it somewhere and it might already be on YouTube.
20:17 And you're like, really?
20:19 I can do that.
20:20 Yes, really.
20:21 You can do that.
20:22 some people give talks at multiple conferences and it's fine.
20:25 You don't have to come up with a brand new talk for every conference.
20:28 the other thing is the, the list of outline, the list of topics.
20:31 My mistake, the first time I wrote, gave a talk was I did this.
20:35 I went, what are all the things I'd like to talk about?
20:37 And then I crammed them all into the, into one talk.
20:40 this is not what you want to do.
20:42 You want to pick like, you know, one focused thing so that you can go at a reasonably comfortable
20:47 pace.
20:48 You don't want to be talking a hundred miles an hour.
20:51 People can't keep up with you.
20:52 There are some people I'm, I'm good.
20:54 Don't get me wrong.
20:55 There's some people that can talk really fast and pack a lot of information and they're really
20:59 good about it.
21:00 And it's still entertaining, but I think the average person would be better at trying to
21:04 go at a little slower pace.
21:05 So, yeah.
21:06 Yeah.
21:07 I totally agree about the, that, and you know, that could be your, like, you could come up
21:10 with that list of all the things you want to talk about.
21:12 And then that could be the source for two or three talks.
21:15 Yeah.
21:15 Yep.
21:16 Right.
21:16 Like, God, this is two, this is kind of like, this all stuff seems to be about fixtures.
21:19 So let's have to do a, like five things that are awesome about fixtures you didn't know.
21:23 And here's like why you should care about structuring your, I don't know, whatever.
21:27 And if they get rejected, but from every conference that you submitted to, you're still one because
21:32 you did all that, that work.
21:33 Just turn it into a, like a blog post or a, or a YouTube video or something.
21:39 Yeah, absolutely.
21:40 A bunch of good feedback from the audience.
21:42 John out there says a great place to give a talk is at the user group kind of matched
21:46 exactly the same time I said that.
21:48 So I definitely agree.
21:49 Green there.
21:49 Brandon says, give it a lunch and learn at your company.
21:52 Great idea.
21:53 Yeah.
21:53 That's a really good idea.
21:54 And casual viewer number three.
21:57 does my team as a show and tell, like meeting on Fridays, a show off stuff.
22:01 People can talk about that'd be impactful.
22:03 Also a good place.
22:04 Yeah.
22:04 A lot of good ideas.
22:05 If the venue doesn't exist, you may well be able to create it.
22:08 Yeah.
22:08 And you might get, you might get promoted because of it.
22:10 Cause you're like, Oh, people will know that you're the expert in the company that they
22:14 didn't know before.
22:15 It's good.
22:15 That's right.
22:16 That's right.
22:16 All right.
22:16 I want to come back to something that I know we talked about before, but a feature of it.
22:21 So we talked about Sanic when it came out, there was Sanic and Jopronto and a couple
22:27 other things.
22:27 This, I believe predates FastAPI even.
22:29 And it was one of the very first high, high performance async frameworks for Python.
22:35 Very cool.
22:36 I hadn't really been tracking it that much lately, but if you drop over by the GitHub,
22:40 github.com/Sanic dash org, go to Sanic.
22:44 16,000 stars, 1,500 forks.
22:47 It's going really strong.
22:48 I, I totally did not.
22:50 I've not been tracking it well enough.
22:52 So this is, this is really fantastic.
22:54 So cool way to build asynchronous web apps and Python.
22:58 It's, it claims to be unopinionated and flexible.
23:02 It is the plastic that you build your APIs and your web apps out of as you like, rather than
23:07 being very structured in the way you put stuff together.
23:10 So if you're looking forward to that good, it's, I said, super fast.
23:14 that was its original selling point and apparently used by millions of people, which
23:19 is pretty awesome.
23:20 So what I want to point out here is not Sanic exactly, but rather a new feature that was shared
23:26 with us by Felix and Felix pointed out that, Adam, one of the maintainers just added this
23:33 concept of a worker manager into the new version of Sanic.
23:37 So, if you, if you want to run background work, like I want to send an email or I want to
23:43 send, and do other, like lots of processing or computational work in the background, it's
23:50 going to block up not just a single request, but it's going to block up potentially the
23:54 whole web server, right?
23:55 You get a bunch of things that are querying tons of data or doing a bunch of computation,
23:58 then all of a sudden, or even calling other APIs, potentially that could log up the server,
24:03 especially if it can't be done asynchronously.
24:05 So they added this concept of kind of like a lightweight celery type of thing, where you can push
24:11 the work off to it and have it run in the background and manage that.
24:14 Okay.
24:15 Except for it's just an API inside of Sanic.
24:18 And it starts a sub process that hangs around and does that background work for you.
24:22 So it's like, you don't have to manage another server.
24:24 You don't have to set up celery or Redis and then some worker mechanism to process the messages
24:30 coming out of there.
24:30 You just kick the work over to this, worker manager and off it goes.
24:34 Nice.
24:34 Yeah.
24:35 That's pretty cool.
24:35 Pretty cool, huh?
24:36 Yeah.
24:36 Yeah.
24:37 And the way that it works is, basically you can hook into, some lifetime events.
24:43 Like you can use a decorator app dot before server start, and you can go make sure that
24:48 there's a queue that can be used for the communication across that.
24:51 And then you can handle on request.
24:53 And then, when a request comes in, you can like push work over, over to it.
24:57 Yeah.
24:58 Anyway, you can even get it to do like some cool little printout of like the status of what
25:02 the workers are up to and so on.
25:04 So anyway, pretty neat.
25:06 if you need to run asynchronous work and you're looking at a web framework, you know,
25:10 maybe check out Sanic.
25:11 It's got this, this cool feature and it's got a lot of nice async and await features as well.
25:15 Cool.
25:15 Nice.
25:15 All right.
25:17 that's it for our main items, isn't it?
25:19 I guess it is.
25:20 Yeah.
25:21 before we move off this real quick, casual viewer says FastAPI is something similar
25:25 called background task.
25:26 Okay.
25:27 Good to know.
25:28 And yeah, and you can also build those out of your, on your own, using like
25:32 multi-processing or something, but.
25:33 Or any IO.
25:34 Or any IO for sure.
25:35 One of the real challenges of all of those like roll your own things are usually what happens
25:40 is you, you farm out your web server.
25:43 So for example, on Talk Python Training, I think we have eight worker processes that are cruising
25:48 around waiting.
25:49 And like, as far as they're concerned, they are the website.
25:51 Right.
25:52 And if all those things start kicking off background work and they start starting their
25:56 own processes, it'll be like, why are there 17 worker processes cruising around?
26:00 I don't know what's going on.
26:01 So yeah, it's kind of cool to have something that's a little more structured, like that.
26:05 All right.
26:05 extras.
26:06 You said you got some extras.
26:07 Tell us about them.
26:07 well, stuck on the presentation thing.
26:10 but, I ran across this, article called create presentations with, from Jupyter
26:16 notebooks.
26:17 And, I just wanted to link to it.
26:19 If you, if you're thinking about doing a presentation and you want to possibly just use your Jupyter
26:24 notebook, apparently it's built in.
26:26 I didn't know that it was just built in.
26:27 so this just walks through the built-in features of how to, so you gotta, you've got
26:33 a Jupyter notebook, you walk, what you can even do some markdown.
26:37 You can do markdown Jupyter anyway, but there's ways to have both code and markdown together
26:42 with this, with IPython display markdown, which is cool.
26:46 and then it, it goes through a couple more examples of things, but then there's this,
26:51 a dropdown.
26:52 You can just say view, view cell toolbar slideshow.
26:57 And then you select, you select slide for each of your, little cells and they become
27:04 slides in your presentation.
27:05 And then you can use, then you can use the built-in NB convert to convert it to,
27:13 presentation.
27:14 So just got an HTML presentation right there.
27:17 So that's pretty neat.
27:19 You can say slide.
27:21 You can say it's a sub slide, a fragment.
27:23 You could skip and you could even make it notes just for like a presentation view.
27:27 That's pretty flexible for per cell in Jupyter.
27:29 That's awesome.
27:30 And then there's ways to either show it by default.
27:33 It shows the code, but you can have a hide the code apparently.
27:36 And then if you want to be able to, to, instead of doing the command line thing, if you want
27:40 to toggle back and forth while you're developing it, they're recommending using the rise
27:44 extension.
27:45 And I tried that.
27:46 I'm like, is this, is it really this easy?
27:49 And so I tried it out and sure enough, it's just, I just went through some of the examples
27:55 and it's really pretty cool.
27:56 And with rise, we've got like these examples and then you can just with rise, you can just
28:01 select this little, this little, icon here.
28:03 It looks like a graph and it just enters into slideshow mode.
28:07 nice.
28:08 Then it, so what happens if you hit space in that mode?
28:11 Does it like automatically take you from one to one?
28:15 Okay, cool.
28:15 Yeah.
28:15 Very nice.
28:16 And you can, you can do the arrows back and forth and stuff.
28:19 You can, so you kind of, it doesn't look as good as the, the actual presentation at the
28:24 output, but especially if you're trying to like kind of toggle back and forth to see,
28:28 isn't like, is my, is my stuff too big?
28:31 Like right now I w I would totally alter this because it, it, it looks too, it doesn't look
28:36 good right now.
28:37 but that's kind of what you do with slideshows is you sort of work, work with them until they
28:42 look good.
28:43 But anyway, so this is, something I wanted to share.
28:46 It was just this, if you want to try using Jupyter for your presentation, here's a link
28:51 kind of maybe take a look at this article.
28:53 the other thing I wanted to point out as an extra is, what Python py test as
29:01 7.2 py test 7.2 released.
29:04 I don't normally like, I mean, I love, I'm personally, if I'm like ready to try every
29:10 new release that comes out, but why I'm bringing this up, is there's a couple of things that
29:14 bit us at work.
29:16 And I want to, if they might bite you, the PI library is now separated from py test.
29:22 So you don't get the PI library by default when you import, when you, you're installing
29:27 py test.
29:27 So if you are using the PI library, you just have to make that one of your own requirements.
29:32 You were cheating and not stating it as a requirement.
29:35 Cause I'd always be there.
29:36 We know.
29:37 I don't think we were, I don't think we were using it at all, but I think we may have
29:41 declared like, like py path or something like that.
29:44 Yeah.
29:44 Whatever.
29:44 a couple more things, that I think is neat.
29:48 a few releases ago, I added, the test paths, so that you can add a import path,
29:55 to your, for where, like where your source code is.
29:59 And, for this release, they added a shell style wildcard support.
30:03 So that's pretty cool.
30:04 and there's a whole bunch of cool features.
30:07 So, yeah, check out py tests if you're up for it.
30:11 Oh, one of the things, I'm really glad they deprecated nose.
30:14 I can't remember.
30:15 Can't remember where it's listed here, but they're, they're not using.
30:18 So set up this, just the keywords, set up and tear down.
30:21 You could define functions.
30:22 You were able to define functions, set up and tear down, and those were run automatically,
30:26 but those were run automatically because they were part of the nose support.
30:30 So even if you don't know what nose is, if you're using those, those are deprecated.
30:35 So stop using those.
30:36 there's other ways to, to do set up and tear down with py test.
30:41 And so check that out if you're using that.
30:43 And I'm, and then the first edition of the py test book, I actually talked about set up and
30:47 tear down and luckily in the second edition, I took those out.
30:51 So yeah.
30:52 Very good.
30:52 You saw that.
30:53 Awesome.
30:53 Awesome.
30:55 Cool.
30:55 bit of followup on your Jupyter item here.
30:59 Henry Schreiner says, you can also use this in labs in JupyterLab, not the old notebook.
31:03 So if you want to use rise live editable presentations, that still requires the old notebook.
31:08 Same.
31:08 Okay.
31:09 Okay.
31:09 So you can do use JupyterLab for presentations too.
31:12 Awesome.
31:12 Yeah.
31:13 Yeah.
31:13 Very cool.
31:13 And then also Brandon points out that background task from when we credited FastAPI may actually
31:20 come from starlet.
31:21 For those of you don't know, FastAPI is a layer on top of starlet.
31:24 So a lot of times what people perceive as a FastAPI feature is actually a starlet feature.
31:29 And, it also, Henry says that also now the notebooks now warn you, if you return
31:36 from a test on, sorry, now also warns you for a term from a pitest function, this would
31:41 be an error in pitest eight.
31:43 Okay.
31:43 Yeah.
31:44 Well, yeah, apparently some people were like returning true or false from their test functions
31:48 and, and wanting that to like indicate whether a test passed or failed.
31:52 Don't do that.
31:53 Didn't you just parse the print statements?
31:55 No, it's an exception.
31:58 If an exception happens, that's a failure.
32:00 So of course.
32:01 All right.
32:02 I got a few extras and we'll, we'll bust out some jokes.
32:05 These are quick.
32:05 Rich, the colorizing formatting, awesome TUI foundation is great.
32:11 Now available on PyScript.
32:13 So rich, yeah, you just, you just do rich things and just, you know, print this stuff
32:19 all out.
32:20 And guess what?
32:20 It now comes out as like colorized output and HTML, I guess.
32:25 I'm not sure, where the, the destination is going to land, but, it says rebel.
32:29 So I'm guessing, maybe, prints out in the rebel there.
32:32 Anyway, there's a bunch of notes on how to use rich in PyScript.
32:35 So if you like PyScript and you're tracking that project and you like rich, put them together.
32:38 Also, we talked about, YouTube videos and you could get a, make a talk.
32:43 You could just make it a video.
32:44 So I did a Python 311 in 100 seconds video that I released, yesterday, the day before.
32:50 I think it was yesterday actually.
32:51 Yeah.
32:52 Anyway, people can check that out if they've got a hundred seconds to spare and they want
32:55 to know what's cool about Python 311 and why it's neat.
32:58 that's fun.
32:59 links in the show notes there.
33:01 All right.
33:01 Ready for some jokes?
33:02 Yes.
33:03 Okay.
33:03 So here's one, it's titled laughter in Linux, but it's about windows.
33:08 So you might have to go back a ways for people to get this joke, but let's see.
33:12 I know you spent some time in windows, Brian.
33:14 Let me see what you think about this.
33:15 So here's like, sort of a karate master type of scenario.
33:20 And like the sensei says, it's time for you to look inward and start asking yourself the
33:26 big question.
33:26 What happened to the A and B drive?
33:28 Hmm.
33:29 Because it's all you see, right?
33:31 It's all you see.
33:32 It used to make that noise.
33:34 Pretty much.
33:36 If it's not a C drive, it makes noise.
33:38 It's my understanding from my history.
33:39 It, some of them make that, sort of a disky noise.
33:42 Are there like a CD seeking noise, but there's always a noise associated with a non C drive.
33:46 I know that's not always true, but it's fun.
33:49 All right.
33:49 Other one.
33:50 This one is not about OSs and discs, but rather databases and it's dating advice.
33:55 So here's a woman talking to a clearly nerdy programmer type.
34:00 And it says, what do you need for a good relationship?
34:04 The guy looks at her.
34:05 Obviously primary keys.
34:06 Primary keys.
34:07 Yeah.
34:11 So bad.
34:12 Anyway, that's what I got.
34:13 Dude from the IT crowd.
34:15 Okay.
34:15 Yeah.
34:15 Yeah.
34:16 I need to watch more TV to fully catch the means.
34:18 Don't I?
34:19 So, yeah.
34:20 Cool.
34:21 All right.
34:21 Well, always fun to have you here.
34:23 Definitely.
34:25 Thanks.
34:25 And thanks everybody for showing up an hour early.
34:28 I really appreciate it.
34:29 Yeah, absolutely.
34:29 Try to be the, we'll try to stick to that time for a while.
34:32 And I guess we'll let you know if we don't.
34:35 All right.
34:35 See y'all later.