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

Transcript #308: Conference season is heating up

Return to episode page view on github
Recorded on Tuesday, Nov 1, 2022.

00:00 Hey Brian. Hey. I see that you've come wielding a staff of mighty power. Yeah well I was cleaning my office and I found the Python staff so I'm like I'm ready to help for the show.

00:10 Yeah that was when we used to go to conferences. Do you remember that? Like people they'd all get together. I think they might have been making a comeback. I think so. I think I might be attending some conferences in the future. Awesome. So am I. I'm looking forward to it. Before we get to our topics also want to say thank you to a new sponsor this week. Not totally new but new for recent and times compiler, the podcast from red hat.

00:32 So awesome to have the support from red hat.

00:34 We're going to be telling you more about them later, but Brian, let's just mix it up.

00:38 Let's make a difference.

00:39 This is episode 308 recorded November 1st, 2022.

00:42 I'm Michael Kennedy.

00:43 And I'm Brian Atkin.

00:44 Let's let's, let's do it.

00:46 I did want to talk about PyCon.

00:48 yeah, so PyCon is, is coming up.

00:50 So, when is it?

00:52 It's, I wrote this down even so they could remember it's April 19th at a 23rd.

00:58 It's but one of the we bring up PyCon US because the the 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 cool look to it now.

01:20 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--

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 So it looks cool.

01:41 So PyCon US is going to be April 19th through 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 we call those afterwards.

01:54 So if you can stay longer, awesome.

01:56 But the talk part is the 19th through the 23rd.

01:59 Salt Lake City, 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:10 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:22 and then it's through December 9th.

02:25 So, but don't wait until December, get those in early.

02:29 So anyway.

02:30 - Yeah, excellent.

02:31 - I think I'm gonna submit some because I kind of think I wanna go to PyCon this year.

02:35 I didn't go last year.

02:37 What do you, 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 gonna get a booth and have like a bunch of presence there, in which case going to the conference means hanging out at the booth for three days, which is kind of awesome, but also it's like not exactly a conference.

02:55 >> Yeah.

02:55 >> Maybe I'll go low-key and submit a talk and then just cruise around the halls.

02:59 I haven't decided. I do a bunch of podcast recording live there.

03:02 So there's trade-offs to both obviously.

03:04 So I 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 a growth experience, 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 - Yeah. - Yeah.

03:34 - Absolutely. - Anyway, cool.

03:36 - Cool, well, yeah, that'd be exciting.

03:38 I actually wanna do a bit of bookkeeping before we move on.

03:41 - Oh, yeah, that's a good idea.

03:42 - For people who typically attend our livestream recording, which we really appreciate that, 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 I think you can get a lot out of the video version.

04:02 That said, we're moving the video version, right?

04:04 >> We are, and it's my fault.

04:07 A periodic meeting that happens in my day job, and it happens at noon on Tuesdays, 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. It's just an hour earlier on Tuesdays.

04:25 I want to encourage people to go to 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:37 If you've got time, you can drop in.

04:38 You don't have to plan too much about it.

04:39 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 >> While we're bookkeeping and it's 11, if you can make it 11 AM on Tuesdays, maybe you want to be on the show.

04:54 Reach out if you'd like to be a guest host.

04:56 We still do those.

04:57 >> Yeah, exactly. I wonder if I got anything to talk about.

05:00 Let's see. How about

05:02 is a framework that lets you build async things.

05:06 When you first hear about it, it looks like it's 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 any IO, 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 async IO frameworks.

05:29 So it doesn't, like if you think of Trio or Curio, those are replacements for async IO.

05:35 Whereas any IO will run on top and integrate with async IO or it will run on top of and integrate with Trio.

05:42 So you can kind of add it into whatever you're doing, which I think is pretty sweet.

05:45 But I think it's a little, it's 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 any I/O that I think would make them make it really fun.

05:58 All right, so one of the 3.11 features actually is this idea of task groups.

06:05 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 with block, it's all finished.

06:22 So if you're not ready to go to 3.11, but you wanna 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 wanna 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, yeah, that's a 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 async IO thing comes along and says, now go.

07:00 And these are similar to the events that are built into the standard library, but they're not reentrant and they have a little bit, a claim to have a better way of presenting a race condition, a little bit closer to Trio.

07:14 So there's those, 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:21 So you can go over here and just say, I want to only do, in this case, the example says create a capacity limiter two, I only wanna do two things at a time, but yeah.

07:29 Then let's see, another one is this working with threads, pretty awesome.

07:34 So you can, 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:45 Give it that.

07:46 And then you can await it just like other things that mix into your async IO world.

07:49 You can also do it in reverse.

07:51 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 to thread is the, the one that, no, the from thread will push it back, back to the async event loop, which is cool.

08:04 Let's see. Also, subprocesses are pretty awesome.

08:09 So you can do, like you have this idea of running your code in a thread, because it's not async, but you want it to be concurrent and mix it in.

08:17 You can do the same thing with subprocess, 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, which is sweet.

08:27 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, awaiting all the time.

08:43 - Wow.

08:43 - That's neat, right?

08:44 - Yeah.

08:45 So it just, it grabs it while it's printing out?

08:49 - Yeah, 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 and then it, you know, like the task kind of partially completes, right?

09:02 'Cause 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 and yeah, it's pretty cool how it juggles that.

09:11 And then finally here, the file support.

09:16 So you can now, instead of saying open, you just say anyio.openfile, but you can async await it, you know, it's crazy, async with await, there's a lot of crazy stuff happening, 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:35 Basically it creates a wrapper that uses threads that does the file IO, and then it just sort of coordinates the communication of the IO back and forth on the threads as soon as it comes back from IO, which should release the GIL 'cause it's off doing its own thing in the OS.

09:49 So it should be pretty good anyway, yeah.

09:51 - It looks like maybe, I haven't used this, but it looks like it makes things like subprocesses threads and normal async and await all kind of look the same.

10:02 >> Yeah, exactly. It's like a unifying API across the different scenarios, which is really cool.

10:08 Once you wrap it, you're like, "Oh, there's just a bunch of task.

10:11 I just call await on them, good to go." >> Nice. Then possibly it wouldn't be too much if you had to change your mind and have something be a sub-process or a thread.

10:21 Instead, it might not wreak havoc on your design too much.

10:24 >> Yeah, exactly. You almost don't even have to worry about it.

10:27 Long as the parameters can be passed, they've got to be pickable 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.

10:42 Talks to you, 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 Gronholm over on Talk Python.

10:51 When was that? September.

10:53 actually released it in October though.

10:55 So effectively October, or a couple of weeks ago, and people can check that out if they want to dive deep into it and hear my story.

11:03 >> Nice.

11:03 >> I feel like, yeah, 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, but now there's like all these little cool building blocks in there.

11:13 >> Pretty cool. Have you used it?

11:15 Is it pretty nice to use?

11:17 >> I've not used it.

11:18 >> Okay.

11:18 >> I'm still working on getting my interesting projects more async capable, before, 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 and more Unreal projects.

11:34 Back to your topic real quick, Brandon, an audience says, "If one was looking at submitting to PyCon, what's the difference between a tutorial versus a talk?" Time? What else, Brian?

11:44 Hands-on exercises?

11:45 >> Right. Tutorials are what, like three hours or something?

11:48 I can't remember how long they are.

11:50 >> Okay, so there are three hours.

11:53 They're also at a different time, so they're not on the same day.

11:55 >> The day before or something in the main conference.

11:57 >> I think there are 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, so 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 >> Yeah.

12:13 >> Since there are more work to prepare for a tutorial, you get paid for it. You get a little stipend.

12:19 but also people have to pay to go to the tutorial.

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:31 >> Yeah. I think it's also a lot more guiding people through hands-on coding than it is, I'm here to present.

12:37 >> Yeah. 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 >> But there's also one of the things that people forget about is posters.

12:52 Posters are also pretty cool.

12:54 On the last day of the con, 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. The job fair and the posters at the same time.

13:04 It really literally is a poster.

13:06 If you get one of the poster spots, you get a section where you get to have your 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 wanted 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 questions.

13:28 Yeah, 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 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, did they ask people or something?

13:40 So keynotes are invite only Michael, 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:48 Okay, now I want to tell you about one more thing awesome.

13:51 One awesome thing before we move on, Brian, I'll tell you about compiler podcasts from Red Hat.

13:57 Super cool to have Red Hat come along and support in the show.

14:02 Like pretty much everyone listening, you and I, we're fans of podcasts, 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, 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 to Compiler.

14:20 They present different perspectives and topics and insights from the tech industry, free from jargon and judgment.

14:26 If you want to discover where technology is headed beyond the headlines and create a place for new IT professionals to learn, grow, and thrive, they help people break through barriers and challenges, turning code into community at all 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-offs and choices that they made and what the costs and challenges and you know, smiles and frowns that result from that.

14:54 So you can definitely check out the Great Stack Debate. 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 it's some other more complicated dish.

15:04 So you can check that. That's a lot of fun.

15:05 And it's actually the first... 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, you gotta 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:20 - Yeah, so learn about compiler at

15:23 The link is in your podcast player show notes.

15:26 I know you could just search for compiler and sign up, but follow the link and click on your podcast player there and subscribe that way.

15:32 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:39 All right, Brian, what's next?

15:40 - Well, I was gonna talk about conference talks.

15:42 (laughing)

15:45 So some more.

15:46 So I think everybody should try 'cause I actually, I was terrified to do my first talk and I think it was a good experience.

15:54 So Ruven Lerner, Ruven Lerner, friend of the show and all around awesome guy, wrote an article called "How to Propose a Winning Conference Talk." So we're linking to that.

16:05 And there's a lot of articles on how to do a talk.

16:08 and what I really like about this is it's short.

16:12 (laughs)

16:13 There's a few things that he focuses on.

16:17 One of the first is coming up with ideas.

16:19 And he, part of his audience is also other trainers.

16:24 But I think that more people are trainers than you realize.

16:28 So maybe you actually teach people like Reuven does or 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 when people come to you and ask questions.

16:48 So some of those things are to come up with a list of things to talk about.

16:52 What questions do people ask you all the time?

16:54 Those are great things to write talks about, maybe.

16:57 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:04 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, they don't quite get it from whatever they've sought out.

17:14 Those are also great things.

17:15 And 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 good things to maybe give a talk about.

17:25 >> Hey, I got a cheat code for people listening.

17:27 >> Okay.

17:28 >> What awesome thing did you hear about on Python Bytes that was new to you?

17:32 And there's not a talk at the conference.

17:33 - I'm serious.

17:34 - Yeah, exactly.

17:35 Rewind a handful of episodes and go through and go, that sounds interesting.

17:41 And spend a few hours researching it and come up with a talk, why not?

17:45 - Right, right.

17:45 It's interesting to me, I wanna learn it and then I could present it.

17:48 You could test drive these things also at smaller regional conferences.

17:52 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 post, you're right.

17:58 Like there's a bunch of, let me take a shot at it and then build some confidence and then submit it to PyCon US or Europe or wherever.

18:06 - Yeah.

18:07 He goes on to talk about using an outline.

18:12 And even if you don't go for a talk, maybe, I don't remember, I think PyCon US does ask 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 gonna talk about and how long you intend to talk about it.

18:38 And this is actually really important.

18:41 When I finally embraced this and went, I gotta think about this.

18:45 And I kind of do this hand in hand with the next step.

18:48 The next step, he said, is you don't just need an outline, you need a summary.

18:53 And you kind of need a short summary and a long summary, possibly.

18:57 And that's, and you should include, I can't remember where I wrote this down, but you should include, what is it?

19:06 The value that people get, what benefit they'll get from your talk and what knowledge they'll get, what they'll have when they leave your talk and how will that help them.

19:15 And think about those and that while you're putting through your outline together too, as to where you wanna spend your time.

19:21 And, you know, be paying attention that you do want to have some wrap up time possibly and you might want some introduction time, 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 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, right, yeah.

19:47 Like an example here, it says generate warnings, two minutes.

19:50 Could you spend two minutes talking about generating warnings?

19:52 I imagine you could.

19:55 - Yeah, and if it's important, throw some time into it.

19:58 But one of the things I wanted to highlight on this, I really like this write-up.

20:04 He also, a couple more things.

20:05 One is submit the same talk to multiple conferences.

20:09 You can do that, 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:18 And you're like, really, I can do that?

20:20 Yes, really, you can do that.

20:23 Some people give talks at multiple conferences, and it's fine, you don't have to come up with a brand new talk for every conference.

20:28 The other thing is the list of topics.

20:32 My mistake the first time I gave a talk was I did this.

20:35 I went, what are all the things I'd like to talk about?

20:38 And then I crammed them all into one talk.

20:41 This is not what you wanna do.

20:42 You wanna pick like, you know, one focused thing so that you can go at a reasonably comfortable pace.

20:48 You don't wanna be talking at 100 miles an hour or people can't keep up with you.

20:52 There are some people, don't get me wrong, there's some people that can talk really fast and pack a lot of information and they're really good about it, and it's still entertaining.

21:01 But I think the average person would be better at trying to go at a little slower pace.

21:06 - Yep, yeah, I totally agree about that.

21:08 And that could be your, like you could come up with that list of all the things you wanna talk about, and then that could be the source for two or three talks.

21:15 - Yeah, yep.

21:16 - Like, oh, this is kind of like, this all stuff seems to be about fixtures, so let's do 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 won because you did all that work.

21:34 Just turn it into like a blog post 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 exactly the same time I said that, so definitely agree in there.

21:50 Brandon says, "Give it a lunch and learn at your company." - Great idea.

21:53 - Yeah, that's a really good idea.

21:55 And casual viewer number three, says, "My team has a show and tell, like meeting on Fridays to show off stuff people can talk about that'd be impactful.

22:03 Also a good place." Yeah, a lot of good ideas.

22:05 If the venue doesn't exist, you may well be able to create it.

22:08 - Yeah, and you might get promoted because of it, 'cause you're like, "Oh, people will know that you're the expert in the company that they didn't know before." It's good to know. - That's right, that's right.

22:16 All right, I wanna come back to something that I know we talked about before, but a feature of it.

22:22 So we talked about Sanic when it came out, there was Sanic and Gepronto and a couple other things.

22:27 This I believe predates FastAPI even, and it was one of the very first high performance async frameworks for Python.

22:35 Very cool.

22:37 I hadn't really been tracking it that much lately, but if you drop over by the GitHub,, go to Sanic, 16,000 stars, 1,500 forks, it's going really strong.

22:48 I totally did not, I've not been tracking it well enough.

22:52 So this is really fantastic.

22:54 So cool way to build asynchronous web apps in Python.

22:58 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 being very structured in the way you put stuff together.

23:10 So if you're looking for that, good.

23:12 it's, I said, super fast.

23:15 That was its original selling point and apparently used by millions of people, which is pretty awesome.

23:20 So what I wanna point out here is not Sanic exactly, but rather a new feature that was shared with us by Felix.

23:28 And Felix pointed out that Adam, one of the maintainers, just added this concept of a worker manager into the new version of Sanic.

23:37 So if you wanna run background work, like I want to send an email or I want to send, I do other like lots of processing or computational work in the background.

23:49 It's going to block up not just a single request, but it's going to block up potentially the whole web server, right?

23:55 You get a bunch of things that are querying tons of data or doing a bunch of computation, then all of a sudden, or even calling other APIs, potentially that could log up the server, 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 the work off to it and have it run in the background and manage that.

24:14 >> Okay.

24:15 >> Step four is just an API inside of Sanic, 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, you don't have to set up Celery or Redis and then some worker mechanism to process the messages coming out of there.

24:30 You just take 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.

24:36 >> Yeah.

24:36 >> Yeah. The way that it works is basically you can hook into some lifetime events, like you can use a decorator app dot before server start, and you can go make sure that there's a queue that can be used for the communication across that and then you can handle on request. And then when a request comes in, you can like push work over over to it. Yeah. Anyway, you can even get it to do like some cool little printout of like the status of what the workers are up to, and so on. So anyway, pretty neat.

25:06 If you need to run asynchronous work, and you're looking at a web framework, you know, check out Sanic. It's got this cool feature and it's got a lot of nice async and await features as well.

25:15 >> Cool. Nice.

25:16 >> Yep. All right. That's it for our main items, isn't it?

25:19 >> I guess it is, yeah.

25:21 >> Before we move off this real quick, casual viewer says FastAPI is something similar called background task.

25:27 >> Okay. Good to know.

25:28 >> Yeah, and you can also build those out of your, on your own using like multiprocessing or something, but...

25:33 >> Or any I/O.

25:34 >> Or any I/O, for sure. One of the real challenges of all of those like roll your own things are usually what happens is you, you farm out your web server. So for example, on talk by the training, we have eight worker processes that are cruising around waiting and like, as far as they're concerned, they are the website, right? And if all those things start kicking off background work, and they start starting their own processes, it'll be like, why are there 17 worker processes cruising around? I don't know what's going on. So yeah, it's kind of cool to have something that's a little more structured like that. All right, You said you got some extras.

26:07 Tell us about them.

26:08 - Well, stuck on the presentation thing, but I ran across this article called Create Presentations from Jupyter Notebooks.

26:17 And I just wanted to link to it.

26:19 If you're thinking about doing a presentation and you want to possibly just use your Jupyter Notebook, apparently it's built in.

26:26 I didn't know that it was just built in.

26:28 So this just walks through the built-in features of how to, so you've got a Jupyter Notebook, 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 with this, with IPython display markdown, which is cool.

26:47 And then it goes through a couple more examples of things, but then there's this dropdown.

26:52 You can just say view cell toolbar slideshow, and then you select slide for each of your little cells, and they become slides in your presentation.

27:06 And then you can use the built-in NB convert that convert it to a presentation.

27:14 So just got an HTML presentation right there.

27:17 So that's pretty neat.

27:19 - You can say slide, you can say it's a sub-slide, a fragment, you could skip, and you could even make it notes just for like a presentation view.

27:27 That's pretty flexible per cell in Jupyter.

27:30 That's awesome.

27:30 - And then there's ways to either show it by default, it shows the code, but you can have it hide the code apparently.

27:36 Then if you want to be able to, instead of doing the command line thing, if you want to toggle back and forth while you're developing it, they're recommending using the RISE extension.

27:46 I'm like, is it really this easy?

27:49 I tried it out and sure enough, I just went through some of the examples and it's really pretty cool.

27:56 With RISE, you've got these examples.

27:59 Then you can just, with RISE, you can just select this little icon here.

28:03 It looks like a graph and it just enters into slideshow mode.

28:07 >> Nice. What happens if you hit space in that mode?

28:11 Does it automatically take you from one to one?

28:15 Okay, cool. Very nice.

28:16 >> You can do the arrows back and forth and stuff.

28:20 It doesn't look as good as the actual presentation at the output, but especially if you're trying to toggle back and forth to see, like is my stuff too big?

28:31 Like right now I would totally alter this because it doesn't look good right now.

28:37 But that's kind of what you do with slideshows is you sort of work with them until they 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, kind of maybe take a look at this article.

28:54 The other thing I wanted to point out as an extra is what Python pytest as 7.2, pytest 7.2 released.

29:04 I don't normally like, I mean, I'm personally ready to try every new release that comes out.

29:11 But why I'm bringing this up is there's a couple of things that bit us at work and I wonder if they might bite you.

29:18 The PyLibrary is now separated from pytest.

29:22 So you don't get the PyLibrary by default when you import when you're installing pytest.

29:28 If you are using the PyLibrary, you just have to make that one of your own requirements.

29:32 >> You were cheating and not stating it as a requirement, because it'll always be there, we know.

29:37 >> I don't think we were using it at all, but I think we may have declared like PyPath or something like that.

29:44 >> Yeah.

29:44 >> Whatever. A couple more things that I think is neat.

29:49 A few releases ago, I added the test paths so that you can add import path for where your source code is.

29:59 For this release, they added a shell style wildcard support.

30:04 That's pretty cool. There's a whole bunch of cool features.

30:08 Yeah, check out pytest if you're up for it.

30:11 One of the things I'm really glad, they deprecated nose.

30:14 I can't remember where it's listed here.

30:17 But they're not using, so setup, that's just the keyword setup and teardown.

30:21 You could define functions.

30:22 you were able to define functions setup and tear down and those were run automatically, but those were run automatically because they were part of the nose support. So even if you don't know what nose is, if you're using those, those are deprecated, so stop using those.

30:36 There's other ways to do setup and tear down with pytest. And so check that out if you're using that.

30:43 And the first edition of the pytest book, I actually talked about setup and tear down.

30:48 and luckily in the second edition, I took those out.

30:51 >> Very good, you saw that coming.

30:53 >> Awesome.

30:54 >> Awesome. Cool. Bit of follow-up 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 Though if you want to use RISE, live editable presentations, that still requires the old notebook." >> Okay. So you can do use JupyterLab for presentations too. Awesome.

31:12 >> Yeah. Very cool.

31:14 Then also Brandon points out that background task from when we credited FastAPI may actually 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 it also now the notebooks now warn you if you return from a test on Pytest, sorry, now also warns you for a term from a Pytest function, this would be an error in Pytest 8.

31:43 Okay.

31:43 >> Yeah. Well, yeah, apparently some people were like returning true or false from their test functions and wanting that to indicate whether test passed or failed.

31:53 Don't do that.

31:53 >> Didn't you just parse the print statements?

31:55 >> No.

31:56 >> Or did you have an error?

31:57 >> No, it's an exception.

31:58 If an exception happens, that's a failure.

32:01 >> Of course. All right. I got a few extras and we'll bust out some jokes.

32:05 These are quick. Rich, the colorizing, formatting, awesome Tui foundation is great.

32:11 now available on PyScript.

32:13 So, Rich, yeah, you just do Rich things and just print this stuff 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 destination is gonna land, but it says REPL.

32:30 So I'm guessing maybe it prints out in the REPL 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:39 Also, we talked about YouTube videos and you could make a talk, you could just make a video.

32:44 So I did a Python 3.11 in 100 seconds video that I released yesterday, day before.

32:50 I think it was yesterday actually.

32:52 Anyway, people can check that out if they've got a 100 seconds to spare and they want to know what's cool about Python 3.11 and why it's neat.

32:58 That's fun. Links in the show notes there.

33:01 All right. Ready for some jokes?

33:02 >> Yes.

33:03 >> Okay. So here's one.

33:05 It's titled Laughter in Linux, but it's about Windows.

33:08 So you might have to go back a ways for people that get this joke, but let's see.

33:12 So I know you spend some time in Windows, Brian.

33:14 Let me see what you think about this.

33:15 So here's like a sort of a karate master type of scenario.

33:20 And like sensei says, just time for you to look inward and start asking yourself the big question.

33:26 What happened to the A and B drive?

33:28 Because it's all you see, right?

33:30 Where did it go?

33:31 >> Let me see.

33:32 >> It used to make that noise.


33:35 Pretty much if it's not a C drive, it makes noise.

33:38 It's my understanding from my history.

33:40 Some of them make that sort of a disky noise, other 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:48 All right, other one. This one is not about OSs and disks, but rather databases and it's dating advice.

33:56 So here's a woman talking to a clearly nerdy programmer type.

34:01 It says, "What do you need for a good relationship?" The guy looks at her, obviously primary keys.

34:07 >> Primary keys.

34:09 >> Yeah.

34:11 >> So bad. Anyway, that's what I got.

34:13 >> Dude from the IT crowd.

34:15 >> Okay. Yeah. I need to watch more TV to fully catch the means, don't I?

34:19 >> So.

34:20 >> Yeah. Cool. All right.

34:21 Well, always fun to have you here and do the show. Thanks.

34:25 >> Definitely. Thanks. Thanks everybody for showing up an hour early.

34:28 I really appreciate it.

34:29 >> Yeah, absolutely. We'll try to stick to that time for a while, and I guess we'll let you know if we don't.

34:35 All right. See you all later. Thanks.

Back to show page