Learn Python with Talk Python's 270 hours of courses

#472: State of Flask and Pallets in 2024 Transcript

Recorded on Tuesday, Jul 9, 2024.

00:00 Flask is one of the most important Python web frameworks, and it powers a bunch of the

00:04 internet.

00:04 David Lord, Flask's lead maintainer, is here to give us an update on the state of Flask

00:09 and palettes in 2024.

00:10 If you care about Flask and where it is and where it's going, you'll definitely want

00:15 to listen in.

00:15 This is Talk Python to Me, episode 472, recorded July 9th, 2024.

00:21 Are you ready for your host, please?

00:24 You're listening to Michael Kennedy on Talk Python to Me.

00:28 Live from Portland, Oregon, and this segment was made with Python.

00:31 Welcome to Talk Python to Me, a weekly podcast on Python.

00:37 This is your host, Michael Kennedy.

00:39 Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython,

00:45 both accounts over at fosstodon.org, and keep up with the show and listen to over nine years

00:51 of episodes at talkpython.fm.

00:53 If you want to be part of our live episodes, you can find the live streams over on YouTube,

00:57 subscribe to our YouTube channel over at talkpython.fm/youtube and get notified about upcoming

01:03 shows.

01:03 This episode is sponsored by Sentry.

01:06 Don't let those errors go unnoticed.

01:08 Use Sentry.

01:09 Get started at talkpython.fm/sentry.

01:12 And it's also brought to you by us over at Talk Python Training.

01:16 Did you know that we have over 250 hours of Python courses?

01:21 Yeah, that's right.

01:22 Check them out at talkpython.fm/courses.

01:25 Before we jump into the interview, I want to let you know that we still have some spots

01:29 left in my Code in a Castle event.

01:31 If you're looking to learn some of the premier frameworks and techniques in Python, and you'd

01:36 like to have a bucket list type of experience while doing so, then check out talkpython.fm

01:41 slash castle.

01:42 In October, I'll be running a six-day Python course for an intimate audience in a villa

01:48 in Tuscany.

01:49 Half the time we'll be learning Python and the other half will be exploring the best of

01:53 what Italy has to offer.

01:54 Check out the course outline, the excursions, and all the details at talkpython.fm/castle.

02:01 Or if you'd like to just shoot me an email, michael at talkpython.fm, or find me on the

02:06 socials, and I'm happy to talk about it.

02:07 I hope to see you there.

02:08 David, welcome back to Talk Python to me.

02:11 Great to have you here.

02:12 Yeah, hello.

02:12 Going to be super fun to talk about Flask and more broadly, Palettes.

02:17 Just all the different projects around Flask and tools and variations like Quart and so

02:24 on.

02:25 And you gave a really nice talk at Embedded FlaskCon.

02:29 Talk a bit about that in a second.

02:30 About the state of Palettes.

02:32 And I thought, you know, let's just take that idea and share it with everyone.

02:35 So looking forward to talking about that.

02:37 Yeah, there's been a lot going on.

02:39 I bet there has.

02:40 I bet there has.

02:41 So yeah, it's been, I can't remember exactly when you were on.

02:44 I think it's about a hundred episodes ago, which puts out like a couple of years.

02:48 What have you been up to the last couple of years?

02:50 Just more Flask.

02:51 It's all Flask all the time.

02:54 Seems like such a simple API, but you can work on it forever, right?

02:57 I've acquired a few more libraries, so like written more libraries and stuff as well.

03:01 But still same job.

03:03 Well, I guess I got a house.

03:04 I got married.

03:05 Okay, congratulations.

03:07 Two times.

03:08 Yeah.

03:08 That's awesome.

03:09 So a little bit of life changes.

03:11 Life keeps marching on.

03:12 It's amazing.

03:13 Flask is certainly one of the most popular web frameworks.

03:17 It's, I guess we could start with like giving people a sense of the popularity, but my thought

03:23 is just like, wow, the pressure of working on something that affects so many folks.

03:28 Like if you push out a change, you know?

03:31 Yeah.

03:32 I've had a weird thought before that like, I try not to think about the numbers too often

03:37 because it's like 100 million or more if you add up all the different libraries and stuff

03:41 a month.

03:42 And I've had a thought before, like if I push out something that doesn't work for enough

03:46 people, like that probably has some like very minor but noticeable like effect on the tech

03:54 like sector for that day or hour, which is scary.

03:59 Yeah.

03:59 It's not quite an AWS US 1 East downtime, but it's also not that, you know?

04:07 Yeah.

04:07 I think a lot, I think over the past, definitely since I've started, a lot more people have

04:13 become aware of like better practices around like pinning their dependencies, that sort of

04:18 thing in part because we did make some, you know, deprecations and then breaking changes

04:25 in Flask and the other libraries.

04:26 And people came to our issue tracker saying, oh, you know, you broke something.

04:30 And ultimately, you know, I had to tell them like, you need to be using a tool.

04:35 There's quite a few tools out now, although we don't have like a lock file standard yet,

04:39 but there's pip compiled, there's PDM, there's Rai.

04:42 You need to use a tool and pin your dependency tree because then you can see when there's

04:48 updates and you can like update them deliberately and test and make, adapt to those changes.

04:53 And I was giving that message a lot in the beginning.

04:57 And over the past like five years or so, it is, I've definitely had to post it less often.

05:02 I feel like more people are like aware of those tools and practices now.

05:07 Well, I would also add that the tooling has gotten a lot better at that.

05:12 It used to be, okay, so what you're going to do is you're going to write a requirements.txt file

05:18 and then you set your versions explicitly.

05:19 And that for many people only addressed the primary dependencies, not the transitive depensity,

05:25 you know, right?

05:26 They might pin Flask, but did they depend Vexo?

05:29 I don't know.

05:30 They may have, probably they didn't, you know, unless they use pip freeze,

05:33 but then you gather a bunch of like garbage that isn't actually about your project

05:37 that got sucked in from some other thing that got, you know, it's like, it was really sort of funky before.

05:42 And I think, I don't know, you mentioned pip-tools and pip compile.

05:46 I am loving that workflow these days.

05:48 Yeah, that's what I've switched all the projects themselves to.

05:51 So if you go look at Flask or Vexoic or any of those, we have like a requirements folder with different environment files that say like,

05:59 here are our direct dependencies.

06:01 And then we compile those into like fully locked dependencies and all our tests run off of those.

06:05 Our build and publish workflow runs off of those.

06:09 So it's not quite the same because like those are our development dependencies instead of our runtime dependencies.

06:15 But it's still really helpful just to know that like, if we don't do anything,

06:19 our process will continue to work because it worked last time.

06:22 Yeah.

06:22 And if we give, if we have like contributors at sprints, now like it's much easier.

06:28 Like I had, like I had a problem the first few sprints I was running where, you know,

06:31 every developer would try to set up their own machine and get like different versions of things or have different versions.

06:36 Point in time snapshots of just whenever they got started, right?

06:39 Yeah.

06:39 So now they like all install the exact same list of dependencies.

06:42 So everybody's development environment looks exactly the same, which is a lot more usable.

06:47 Yeah, that's excellent.

06:48 I have the same workflow.

06:49 I have a top level dependencies that I actually would consider my dependencies.

06:53 And then I pip compile, the unpinned and I pip compile those to a pin dependencies.

06:58 And I just do the upgrade when I feel like, oh, let's, let's go get some new dependencies and see how that goes.

07:03 Yeah.

07:03 Yeah.

07:04 Very nice.

07:04 Okay.

07:05 Well, let's start with FlaskCon.

07:07 Okay.

07:07 I called it the, I called it an embedded conference and this is different than it has been before.

07:12 I think FlaskCon at one point was a purely online one, or maybe that was just COVID.

07:16 Yeah.

07:16 It was just a matter of time.

07:17 I remember.

07:18 It was, it was timing really years ago, like right as COVID, right before COVID started or quarantine

07:26 started, I had been like, like working myself up to do an in-person conference.

07:32 It's something I've wanted to do for a while because I love attending conferences.

07:36 I love the community around it.

07:37 Django con happened in San Diego a few times and that was really fun.

07:41 So I just crashed it.

07:42 It was the Flask person.

07:43 I was the Flask person.

07:43 I was the Flask person.

07:46 and, so I was like getting ready to do that.

07:49 And then, COVID happened, but some other members of the community, the, the palettes

07:54 team and he stepped up and said, Hey, we can do like an online one.

07:57 running a conference, even online is very hard.

08:01 There's a lot of stuff to keep track of.

08:03 Oh yeah.

08:04 But it was, we ran three online conferences.

08:06 I think 2020, 2021 and 2023.

08:10 I think we skipped one, but those are all on like, pivideo.org.

08:14 If you want to find it.

08:15 And now Flask on 2024 is there also.

08:18 And, so I finally got the opportunity with, PyCon.

08:22 They, they previously had this hatchery program, where you could kind of propose, I want

08:27 to do this event.

08:28 And, the, the hatchery program will say like, that sounds great.

08:31 We'll give you, you know, we will handle the venue, the food, the insurance, the legal

08:37 stuff.

08:38 you get one of our rooms and you can do whatever you want in it or whatever you propose

08:42 in it.

08:43 and so last year at PyCon, I talked to some of the organizers.

08:48 And they suggested, Hey, the hatchery is coming back.

08:50 This would be a great way to do it.

08:51 So that you don't have to learn everything at once.

08:54 Right.

08:55 You can practice.

08:55 yeah.

08:56 So, we managed to do some advertising.

08:59 It's hard to advertise new conferences in general.

09:03 And then especially now that, like most of the Python, a lot of the Python community

09:08 is not on Twitter anymore.

09:10 I'm not.

09:11 and even if they were, everything is kind of fragmented more.

09:14 so it was hard to get the reach and get enough, like, CFP.

09:18 so we had a lot of the proposals, but we did get, a few and, ended up accepting

09:22 two people from the community that gave just wonderful talks.

09:25 and it, I saw one on doing PWAs.

09:29 And what was the other one on the talks?

09:32 Was it progressive?

09:33 no, there was one on single page.

09:35 Sorry.

09:35 And there was one on observability and then, yeah.

09:40 PWAs or single page apps and, extension, the extension ecosystem and kind of like the

09:45 idea around defining plus plugins.

09:47 And then there's my talk, which was just, the subject of this podcast.

09:52 Yeah.

09:53 Welcome people.

09:54 Yeah.

09:55 Yeah.

09:56 That's cool.

09:57 will it maybe be a PyCon next year?

09:59 or are you going to branch out?

10:01 I don't know yet.

10:02 I think they would accept me back, but I wouldn't want to like, I always, I kind of view the hatchery.

10:07 I mean, I don't know if this is true, but I kind of view the hatchery as like, we're

10:10 going to help you get started, but not like keep coming back for the same thing.

10:13 but I don't want to like, right.

10:15 Right.

10:15 Right.

10:15 Right.

10:15 Right.

10:15 I'm a 10 year rookie.

10:17 You know, you're not a rookie anymore.

10:18 Get out here with the, or let me, I would still love to run, a conference somewhat

10:24 selfishly so that I can run one like in San Diego or on the West coast at least.

10:29 That's what I was going to say.

10:30 How about San Diego?

10:31 Then we can, I'm going to come down there and stay by the beach.

10:34 Yeah.

10:35 I mentioned DjangoCon before, but they, they stayed in San Diego for three years straight at

10:38 this, little hotel that was really nice.

10:40 Had a pool.

10:41 People just kind of, congregated and it was like 15 minute drive for me.

10:45 And, so yeah, next year at PyCon, I might not be there.

10:49 we're expecting our daughter to be born in January next year.

10:54 Congratulations.

10:55 And that might take precedence over PyCon.

10:57 I'm going to have a lot less time in general, which will be, which will come up in other things

11:01 we're going to talk about, but yeah, I probably like for the first time since 2016 or 2015, I

11:07 will not go to PyCon probably.

11:08 yeah.

11:09 Yeah.

11:10 But there was a, conference, right?

11:12 This was the last conference I went to before quarantine.

11:14 two weeks before quarantine hit, I went up to Los Angeles for PyBeach, which was this

11:19 very, very small, first time conference.

11:22 and I just love those like little ones.

11:24 Yeah.

11:25 And, I met the organizer, Nick Cantar at, North Bay Python a few times now.

11:31 And I've told him like, we should try to bring that back.

11:33 Like I bet, like, I think there's a few other people who are interested as well.

11:36 And I'm like, it doesn't have to be FlaskCon specifically, but if I could like run some sort

11:40 of local conference and I can do some flat stuff or attract some flat stuff, you know?

11:44 Well, I'm pretty excited that, PyCon is going to be in Long Beach, year after

11:49 next.

11:50 Yeah.

11:51 Two years from now, that'll be really nice as well.

11:53 So that'll be really nice, but maybe you can drum up a bunch of interest and connect with

11:57 a lot of people who are conference goers of that place, but like encourage them to sign

12:01 up for a list and like get notified about whatever this other thing is, cause it'll be in the same

12:05 basic neighborhood.

12:06 Yeah.

12:07 So, Jazzy out in the audience asks, can we attend FlaskCon online?

12:13 this year or this in-person one in 2024, we weren't able to do that, but all the talks

12:20 are available now on our YouTube channel.

12:23 If you just search FlaskCon 2024, you'll find it.

12:26 or pyvideo.org has all of them listed.

12:29 the last, the first three we ran were purely online, so you could watch them streaming.

12:34 this year we just didn't have the infrastructure for it.

12:37 So we couldn't really manage to do a live stream and the recordings at the same time.

12:42 I was lucky enough to get, Elaine Wong's help doing the recordings and she brought all

12:46 her special, cool specialized equipment.

12:48 So we were able to get the recordings up really fast at least.

12:51 Yeah, that's really good.

12:52 Are the ones for PyCon even up yet?

12:54 I don't think they are.

12:55 Not that I'm aware of.

12:56 Maybe they're going like really slowly, but yeah, it was really nice.

12:58 Like we just recorded this hard drive and like, she was like, Oh, you guys timed that,

13:03 you timed all your starts and stops really well.

13:05 So all I have to do is like do these like simple cuts and it's all up.

13:08 From the edges and upload.

13:09 Perfect.

13:10 Yeah.

13:11 Yeah.

13:12 Yeah. That's really cool.

13:13 So yeah, I'll link to the playlist of FlaskCon 2024 for folks in the show notes.

13:17 They can check that out.

13:18 Awesome.

13:19 Well, we'll see what 2025 brings.

13:21 Hopefully some more good conference.

13:23 Yeah.

13:24 We might have other like members besides me, attending PyCon as well.

13:29 So we'll see what happens.

13:30 Right?

13:31 Sure.

13:32 If nothing else, I usually just run out of space or something.

13:34 So there's always something going on.

13:35 Yeah.

13:36 Yeah, for sure.

13:37 Now I want to talk about the state of pallets in 2024, but surely there are, you know, quite

13:42 a few people out there who listen, who are really new to Python and programming.

13:46 You'd be surprised.

13:47 A lot of people say they use it like this podcast, like language immersion.

13:50 Like you want to learn Portuguese.

13:52 You used to move to Brazil.

13:53 You want to learn Python.

13:54 You just put on your earbuds and listen until it makes sense.

13:57 So especially for those folks, like what is pallets?

14:00 pallets is an open source organization.

14:03 So we're not a company.

14:04 but we do have like a team of volunteer open source maintainers who volunteer their free

14:10 time to work on flask and the libraries that make up flask.

14:15 So, this portion of talk Python to me is brought to you by Sentry.

14:19 Code breaks.

14:20 It's a fact of life with Sentry.

14:22 You can fix it faster.

14:23 As I've told you all before, we use Sentry on many of our apps and APIs here at talk Python.

14:29 I recently used Sentry to help me track down one of the weirdest bugs I've run into in a long time.

14:34 Here's what happened.

14:36 When signing up for our mailing list, it would crash under a non-common execution paths, like situations where someone was already subscribed or entered into a

14:44 invalid email address or something like this.

14:47 The bizarre part was that our logging of that unusual condition itself was crashing.

14:53 How is it possible for our log to crash?

14:56 It's basically a glorified print statement.

14:59 Well, Sentry to the rescue.

15:01 I'm looking at the crash report right now, and I see way more information than you'd expect to find in any log statement.

15:07 And because it's production, debuggers are out of the question.

15:10 I see the traceback, of course, but also the browser version, client OS, server OS, server OS version, whether it's production or Q&A, the email and name of the person signing up.

15:22 That's the person who actually experienced the crash.

15:24 Dictionaries of data on the call stack and so much more.

15:27 What was the problem?

15:28 I initialized the logger with the string info for the level rather than the enumeration dot info, which was an integer based enum.

15:37 So the login statement would crash saying that I could not use less than or equal to between strings and ints.

15:44 Crazy town.

15:46 But with Sentry, I captured it, fixed it, and I even helped the user who experienced that crash.

15:52 Don't fly blind.

15:53 Fix code faster with Sentry.

15:55 Create your Sentry account now at talkpython.fm/sentry.

15:59 And if you sign up with the code TALKPYTHON, all capital, no spaces, it's good for two free months of Sentry's business plan, which will give you up to 20 times as many monthly events as well as other features.

16:12 That was kind of its purpose when it was created was, hey, Flask has these set of libraries.

16:17 Armin, the original author of them, was not as involved in them anymore.

16:22 And like the community, he wanted the community to be more involved in them.

16:25 So he created this organization.

16:26 This was right around when I was becoming maintainer two, eight years ago.

16:29 And so it's kind of the organization that holds those projects and like the team that kind of maintains and sets policies and that sort of thing.

16:40 So Flask is like the most popular library that everybody ever heard of, followed by Jinja and Click.

16:46 But then we also have Verksoig, which is the lower level stuff below Flask.

16:50 And then MarkupSafe and It's Dangerous are two little helper libraries for those things.

16:55 And then now we've also got Cort, which is the async version of Flask.

17:01 That's an official palettes project now, even though it started as just kind of a separate thing made by Flask.

17:07 Yeah, it was an outside thing that Philip Jones worked on and now it's coming closer and closer to being official.

17:13 Yeah.

17:14 And like we're doing a lot of work on that to kind of try to unify Flask and Cort as much as possible.

17:22 So behind the scenes, they're sharing a lot more code now.

17:26 Cort, like Verksoig is all the low level request response handling for the Flask uses.

17:32 And Cort wasn't using that at first because it needed like much more async things.

17:36 But we've managed to develop a lot more things called the term is called sans IO, like without input output, where we have all like the behavior that's common to both.

17:48 That doesn't require asyncio versus sync processes shared between Cort and Flask.

17:54 And eventually we're slowly moving in that direction.

17:57 The idea is that at some point you will not pip install Cort or import Cort anymore.

18:03 You'll just pip install Flask and then do like from Flask import Cort instead.

18:07 Oh, interesting.

18:08 So the library as well once we get to like a point that we're really comfortable with.

18:12 See you're shipping shipping one thing.

18:14 Yeah.

18:15 Will you be able to use the same app?

18:17 You know, we say add app get or will that be a, will there be a.

18:20 Yeah, that's, that's the one thing.

18:22 App F equals Flask and app Q equals Cort.

18:25 Yeah.

18:26 You'll still have one single app, but you're going to have to pick ahead of time.

18:30 We've tried to think of ways around this, but just the way that Flask is constructed means that so much of it is customizable by extensions.

18:40 And that, that, that those hook APIs that extensions can customize all the extensions out there expect that they're sync, they're deaf, whatever, not async deaf.

18:50 Right.

18:51 And, maybe we'll figure out something, but so far we can't figure out a way to unify that into a single object.

18:58 So you're going to have to still pick.

18:59 I want to be async first or sync first.

19:03 And yeah.

19:04 Yeah.

19:05 but at least it'll be in one place.

19:07 Like you're not going to have to decide, oh, I need to know about Cort.

19:10 You can just look at the Flask docs and see like, oh, I'm going to be doing mostly like, like web requests or like video processing or something that's like the IO intensive.

19:18 I should pick court or, or I'm just doing like the basic API that everybody makes for their, you know, data science project.

19:25 I just need Flask.

19:26 Hopefully it makes it a little easier.

19:27 Yeah.

19:28 Yeah.

19:29 Yeah.

19:30 Really interesting question out in the audience.

19:31 Will it, it sounds like it'll work both WWSGI, WSGI and ASGI ASGI.

19:37 any future where it just goes all, all async, not likely in the short term.

19:42 It sounds like great.

19:43 yeah.

19:44 Like Flask will always be WSGI.

19:46 because it's so tied to how sync processes work.

19:50 ASGI has an ability to, and so like, if you use like HyperCorn, which is a popular, ASGI server, which is also by Phil from Cort.

20:01 you can run a WSGI application as an ASGI application.

20:05 you don't necessarily get all the benefits of ASGI, but you can at least run it with that.

20:11 and some, and kind of like in a similar vein, like if you're using Cort, you can write both sync and async things and they all just work together.

20:18 Yeah.

20:19 You just, and, and with Flask, you can write async stuff in Flask right now.

20:23 you just don't get the benefits of ASGI's connection pooling.

20:27 so you're still doing one worker per request response, but you can in that worker kick off like async, code.

20:34 Right.

20:35 Okay.

20:36 More easily.

20:37 Interesting.

20:38 Yeah.

20:39 I've written a decorator that it decorates both sync and async methods.

20:45 And it's pretty tricky.

20:46 There's just basically.

20:47 Yeah.

20:48 Jinja has two, two.

20:49 Yeah.

20:50 Two rappers.

20:51 It goes, all right, well, which are you, we're going to actually apply that one to, you know, it's, it's a, it's tricky to juggle.

20:55 And then the, well, the plugins, like it's gotta be a gnarly combination.

20:58 Yeah.

20:59 We're, we're, we're like, basically we're just like taking it in baby steps and we're hoping like, as we keep unifying their code, like their shared code more and more, we can start like discovering.

21:08 Like discovering like good patterns for writing an extension that works in both, for example, and documenting those and maybe helping, some extensions, that are popular update to that.

21:19 yeah.

21:20 And so it's a slow process, but like it's surmountable.

21:23 Yeah.

21:24 Maybe you get to a point where they're close enough.

21:26 You're like, oh, now it's really obvious how these things.

21:28 Yeah.

21:29 You know, by the beginning it wasn't right.

21:31 Okay.

21:32 So what's the state, how are things?

21:34 What's the state?

21:35 maybe start with the big, the big boy flask and inbox zero is like one of the biggest takeaways.

21:40 Inbox zero.

21:41 That was, it was actually, that wasn't 2024.

21:43 That was the 2021 or 22, I think.

21:46 But, I, yeah, we don't have like true zero most of the time, although I do get down to it every now and then.

21:53 but, I did hit inbox zero.

21:56 So when I first started maintaining all these libraries, I think combined, there was probably over a thousand open issues and PRs.

22:03 and that's a nightmare.

22:06 If you know all the code, like if you, if you were the author, but I was not the author of this code.

22:10 Like, so I was both unfamiliar with the internals of all these libraries and like had to keep track of all these issues.

22:17 So I was like learning libraries, learning how to be a maintainer and trying to keep track of like all these requests.

22:23 Going back and forth and like competing PRs and all that sort of stuff.

22:26 So it was, early on, it was a goal I identified of like, I just need to make this manageable.

22:31 And, once I got there, it's become a lot easier.

22:34 Like once you're at inbox zero, it's a lot easier to keep it.

22:37 Hovering.

22:38 I really feel in, I'm feeling rough about my true inbox.

22:41 I'm looking at like five or six persistent emails.

22:43 I really got to get back to you, but it's a whole different deal than if it's 10,000.

22:47 Did you declare, any sort of bankruptcy equivalent of like inbox bank or you just go like archive.

22:53 A good, like if it's two years or older, I'm just going to archive it and it'll come back if it matters.

22:57 Or did you literally go through everyone and deal with it?

23:00 I did go through everyone individually.

23:03 I didn't just blanket say everything older than two years is closed.

23:06 yeah.

23:07 But I did kind of treat things as like, I don't like stale bots.

23:12 So we don't run a stale bot.

23:13 Like, yeah, I don't like those either.

23:14 Yeah.

23:15 Yeah.

23:16 Like I, I don't object to things being closed, like as the resolution versus fixed, but I want like somebody to be making that decision.

23:25 right.

23:26 Right.

23:27 And put a reason behind it.

23:28 so yeah, I tried like going through every single issue.

23:32 Basically my workflow is just every single day, pick an issue, work on it, like pick another one.

23:38 Okay.

23:39 It's been a couple hours.

23:40 Wait until the next day.

23:41 And, yeah, just like had to keep making calls on them.

23:44 Yeah.

23:45 Like, all right, two come in a day.

23:46 I'm going to do 20 a day until I catch our sounds like that.

23:49 Right.

23:50 There was a lot of stuff also where it was, it had just been sitting open for years, you know, and nobody had really commented on it besides like, or maybe they had the most people that commented on was saying like me too, but they hadn't actually like moved the discussion forward.

24:06 And yeah, I, you know, it would be nice if open source, if like more people like contribute, I don't blame anybody for not like contributing, you know, or being a contributor, but I would love to like attract more long-term contributors and stuff.

24:19 But that's like kind of the way it starts is you need to like help people like make calls and stuff, evaluate things.

24:24 Right.

24:25 you know, instead of saying me to start looking into it and saying like, okay, me too.

24:29 And okay, here's all the like issues that might come up when we do this, or I looked at their code base and we could do it this way.

24:35 Yeah.

24:36 Right.

24:37 Exactly.

24:38 We weren't doing that.

24:39 I also want it, but I want it.

24:40 And I think here's a path forward or here's a, you know, like they have to advance the conversation.

24:44 and that wasn't like happening in a lot of the old issues.

24:47 So I did kind of like, I didn't already just close old issues, but like, I did say like, okay, this thing is old and it hasn't seen any movement or like, there's a lot of things also where it's like, yeah, it's a reasonable request, but is it necessary for flask?

25:01 Does it belong in flask or an extension?

25:03 Right.

25:04 Like this is something I'm trying to figure out.

25:06 Like, I want to be writing like documentation for other maintainers on the team, you know, so they understand like how I did this sort of stuff.

25:14 And it's really, this is like the trickiest problem.

25:16 I don't know how I'm going to document yet, but like, I got a sense over time of just like being able to really quickly make a call of like, yes or no.

25:23 One thing, like I can look at an issue and say like, okay, no, this doesn't belong in for X, Y, Z or something.

25:31 because like flask had like all the libraries in palettes have like very focused core, like goal of them.

25:38 And, they try to be extensible to some degree.

25:40 So a lot of the things you can do by making extension.

25:42 so really what I try to look for is like, I need this thing in flask because it is literally not possible to write an extension to do this without being able to like hook into it this way or something like that.

25:52 No, that makes sense.

25:53 Sure.

25:53 And part of the Zen of flask is that it's minimal and then you build around it.

25:59 You pick your database, you pick your whatever, and then go from there.

26:02 Yeah.

26:03 Yeah.

26:04 Cool.

26:05 All right.

26:06 Well, three, three open issues and incredible as, as in 67,000 stars.

26:10 That's also pretty incredible.

26:11 let's see.

26:12 So you join each one of these different ones.

26:14 You kind of gave a sense of like how many downloads.

26:16 So for flask, maybe these numbers changed, but I think it hasn't been about a couple of months.

26:20 It's around 75 million downloads a month.

26:23 That's a, that's a hefty chunk of user base there.

26:26 Yeah.

26:27 I occasionally look at pypi stats.org or pepi.tech, are the two like websites that track these numbers.

26:35 so I can look at the current flask is downloads in the last day, 3.15 million downloads in the last month, 66 million.

26:46 okay.

26:47 It's that much time.

26:48 People are telling.

26:49 Yeah.

26:50 Look at that.

26:51 Look at that.

26:52 Yeah.

26:53 Yeah.

26:54 And there's like, sometimes there's like random, you can see in this graph here, like there's just random times where it just suddenly drops by like a couple of hundred thousand or right or rises.

27:03 Yeah.

27:04 Like if you look at the left half of this graph, it's higher.

27:06 Like, I think that's just because like big services like come in and out of existence or like do an upgrade or whatever.

27:14 so there are some like very big systems out there that are just download doing a ton of downloads.

27:20 Yeah, it's pretty wild.

27:21 It's definitely wild.

27:22 You'll probably also spot some pypi outages.

27:24 Well, I imagine in that graph, which is got nothing to do.

27:28 And like they also change the way they report over time, like pypi pip and stuff change how they report statistics.

27:34 So, okay, I usually just look at like the overall numbers pretty consistent.

27:39 Yeah.

27:40 Try not to look at it too often.

27:41 Like I said at the beginning, like it's a, it's a big number to know that like this many people are about to download any change you make.

27:48 yeah, and when I think about these kinds of numbers, it's not just if you make a change to flask, then it affects this many people.

27:55 But these are themselves applications using this, each of which has many, many, many users potentially.

28:01 So there's a multiplier on top of this, right?

28:04 Yeah.

28:05 And, yeah, that's been, that's, that's been difficult.

28:07 That's one of the other state of flask.

28:09 that's the other half of the state of flask is like, we've been making a lot of progress, but like this amount of responsibility, rests.

28:17 pretty heavily on it.

28:19 It's like, it can be pretty stressful.

28:21 and you did mention a baby and being potentially tired in the future and stuff like that as well.

28:26 Yeah, exactly.

28:27 but like combined, you know, these numbers combined with the thought that anything I do could break a bunch of people and get them to complain at me or people will complain at me, even if I don't break a ton of people.

28:38 And, just kind of like the ever present notion of, we are not at inbox zero on some of the projects and stuff.

28:45 So there is still a lot of open stuff.

28:47 It's, yeah, it's a lot of stress for me.

28:49 And it's been, I've like suffered burnout a few times from, per year for the last four years or so.

28:55 Oh man, that's rough.

28:56 are you getting some support from the other people at the Oregon potentially from?

28:59 Yeah, I, I, I, there is, there are other people on the team.

29:03 So it's not like we're a bus factor of one in the sense of like, if I was not here for some reason, other people would have access to these things and could keep them going.

29:13 But the reality is, not to downplay all the work that they do in the community and, when they, when they are working on code, but like I do probably 90% of the code and like the decision making and all that sort of stuff.

29:27 Right.

29:27 So it would definitely be a very different project if I wasn't around.

29:31 It would at minimum be a scramble.

29:33 Right.

29:34 Like when Guido stepped down, like, wait a minute, who's doing what now?

29:38 Yeah.

29:39 So like I, I, so this is what I've been like trying to work on for a long time because I've, kind of always recognized that, I've been kind of the, not limiting factor, but like the, I'm like the point of failure in this thing.

29:53 and so I've been trying to grow the team and, trying to make our processes more automated, you know, try.

30:00 now what I'm trying to do is, because I know I have this hard deadline in January when I'm going to have less time, is I'm trying to document how to do what I've learned to do.

30:11 like how to be a maintainer is something we don't really have a lot of, it feels like is, and we have contribute, we have a contributing guide, right.

30:19 Or we have user documentation or developer guide, like how to use flask, but we don't have a, how to maintain flask documentation.

30:26 Yeah.

30:27 Yeah.

30:28 It must be kind of missing from the community in general.

30:30 Yeah.

30:30 I, I presume that'd be out in public.

30:32 People interested could check it out whenever that gets written.

30:35 Oh yeah.

30:35 It's, it's not like a private, it's not gonna be a private thing, but, it's not, it's not ready yet, but it's something I'm actively working on.

30:41 It's like, identifying like all the stuff I've accumulated in my head and what I've learned how to do or decisions I've made or like services we use.

30:52 Like just the fact that, oh, you know, we're part of the PSF.

30:55 This is how you contact the PSF.

30:57 Yeah.

30:58 Right.

30:59 It's not written down.

31:00 Yeah, exactly.

31:01 Or like that we're part of Tidelift and you know, these other, donation sources.

31:07 Yeah.

31:08 Also like stuff like how, how do I make a decision on whether to keep something closed or open or, when is it time to make a new release or what is our version policy or our support policy or our security policy?

31:20 Like a lot of these things are, under documented right now if they're documented at all.

31:25 And, so that's kind of my goal for the rest of this year as is to like make pallets more sustainable, regardless of, how much availability I have.

31:34 Maybe a little more systematized maybe a little bit.

31:37 Yeah.

31:38 so before we move off of PI PI stats, Goosra has an interesting meta question.

31:42 Is PI PI stats built on Flask itself?

31:45 Do you have any idea?

31:46 I have no idea.

31:47 I know they're open source.

31:50 Oh yeah.

31:51 Okay.

31:52 So maybe you could tell that way.

31:53 I was gonna say there's not like a header or something that Flask sends.

31:55 So, yeah.

31:57 I can't find it.

31:58 Yeah.

31:59 We don't know.

32:00 It is open source.

32:01 Oh, here we go.

32:02 Here we go.

32:03 We've got a requirement.

32:04 We've got a project.tomo.

32:05 Yeah, it's flask.

32:06 There you have it.

32:07 How about that?

32:08 There we go.

32:09 Beautiful.

32:10 It's very rewarding every time I, every time I find out a new place that like, like,

32:15 just decided to use Flask and has been using it and it's just completely behind the scenes

32:20 and you can't tell like nothing's like, it's all just working.

32:23 Yeah.

32:24 But I love, like, I love going to like conferences for that reason too.

32:26 Cause so many people come up to me and like say like, Oh yeah, we use Flask to like run

32:30 the Mars Rover or, somebody, one of the, one of the people giving a talk at

32:38 Flask on it was like my company, writes the like energy management software for this conference center.

32:47 And it's in Flask.

32:48 It's very fun to learn all those new, no uses.

32:51 Have you ever gotten onto the JPL?

32:53 I know it's like a blowers drive.

32:55 That'd be fun, right?

32:56 To go out there and actually see the Flask.

32:58 I would see it.

32:59 That's what runs in the Rover and the helicopter.

33:01 Awesome.

33:02 All right.

33:03 So that's Flask.

33:04 what one do you want to talk about next?

33:06 Next on my tablets, I got Jinja.

33:07 We can go wherever you want.

33:09 So like maybe that a good foundation.

33:10 Yeah, we did, like Flask and Variksberg are pretty tied, because most of the stuff that people report to Flask is actually an issue with one of the other libraries that Flask is using.

33:21 And most often that's with Variksberg.

33:23 So you can see we're not at inbox zero.

33:25 We're at inbox nine right now.

33:26 That's still, that's incredible.

33:28 you know, maybe like I asked you to explain palettes like Variksberg, you know, that's probably not how English speaking folks would say that.

33:35 Workzoyger, Workzug or something, right?

33:38 But Armin, the creator of this is German or Austrian, but speaks German.

33:42 And so that's the German pronunciation.

33:44 And hence, that's why we're saying it that way.

33:46 Right.

33:47 That's my best approximation of the, I'm sure I'm doing it wrong also, but, pretty close.

33:51 Yeah.

33:52 It literally is like, it means like work thing, which is like, yeah.

33:56 Yeah.

33:57 Yeah.

33:57 Basically tool.

33:58 Yeah.

33:58 It's like tools, like work, work, work, your carpentry tools or yes.

34:02 Handyman tools type thing.

34:03 Yeah.

34:04 This is, this was written before, before flask existed.

34:07 And it's, it, I think it was written more when like WSGI was like, was becoming a spec or had just become a spec.

34:14 because it is just a bunch of utilities for doing HTTP header parsing, doing all the low level WSGI, environment management, wrapping that information in request and response objects.

34:27 So you can kind of work with them a little easier.

34:30 so it's all like the underlying tools that you need, to build flask.

34:36 there's also like the whole routing system, you know, so you can, in flask, you just do at app dot route, but behind the scenes, what that's doing is it's adding it to a, route map that very so like defines.

34:49 And that defines like, here's how we actually like collect that and like turn it into a bunch of rules that we can match URLs against.

34:55 And there's other things in there as well.

34:57 The reloader, the debugger, the dev server.

35:00 So one of the updates you gave on Vexo is, performance improvement by way of getting rid of the, the stir bites duopoly.

35:10 Yeah.

35:11 I've been doing a lot in Vexo.

35:13 So that, that one and the, URL of one that we'll talk about, were two big things, but basically like this library, like I just described it.

35:21 It's like just a huge collection of tools and little utility functions.

35:26 And there, there was a his, there's a history there because when this, when all these libraries first started, Python three didn't exist or barely existed.

35:34 And so everything was written originally for Python two, where strings and bytes worked a lot different.

35:41 it was one of the primary breaking changes.

35:45 There were other changes, but that was the, that was the long, the one that people really had a long live bug tracking, you know, if it's different syntax, you just change the syntax.

35:54 But if it's subtle behavior changes, then trouble looms.

35:57 Yeah.

35:58 and so, yeah, in Python two, it was much easier to like, like, well, not, yeah, it was easier to treat like incoming data as bytes, but like treat it as a string.

36:08 There wasn't like as big a distinction between strings and bytes, which was convenient in some ways, especially for like low level tools like HTTP, where you just work in ASCII bytes.

36:18 Yeah.

36:19 So I was gonna say if you like ASCII, it's probably fine.

36:20 If you don't like ASCII, you might not like it so much.

36:22 Yeah.

36:23 But it also like cause like, like, like I, I, I first learned Python three.

36:27 So I, I like, I have a kind of difference on this, but I like, I like Python three's distinction.

36:32 I think it's much better to have that distinction.

36:35 Yeah. You and me both.

36:38 but at the time, like when it was first happening, it wasn't as clear cut, like, oh yeah, this is better or this is easier because you had to support both.

36:45 And, so when Python three came out and started getting like more momentum, all these libraries tacked on, support for both Python two and Python three, which among other things meant that you had to now check for like, whether you were getting strings or bytes everywhere.

37:03 because you might be in Python two land where you might be in Python three land where you're getting strings and need to like do other conversions.

37:10 So it was especially bad because it's a collection of like kind of independent utility functions.

37:16 some functions build on each other, but every function could potentially be imported and used for its own little piece of functionality.

37:25 And so every single function needed to check all its arguments for like, am I a string or bytes?

37:30 So even if most of the time, especially nowadays, people aren't using VaricsOic directly and all these tools, they're using flask, which just does the right thing from the get go, which means all those intermediate checks on the way are totally unnecessary.

37:42 You know, because you already knew from like the first function that it's already testing 10 times for the same thing down the cross.

37:48 Right. And this was just pervasive throughout, VaricsOic was just everywhere with all these unnecessary checks.

37:54 And it made the code more complex to maintain reason about made the like execution slower.

38:00 there's kind of a, another thing going on at the same time, which is like we had, because we could support like, because we were working with bytes in a lot of places.

38:09 there was also like a lot more support for, well, maybe the data is encoded in this encoding or this one, but nowadays everybody like I looked at before I made this decision, I looked at stats.

38:21 everybody, 99.5% of people, web applications on the web right now are using UTF-8.

38:28 So they're never dealing with other encodings.

38:30 And UTF-8 can encode everything.

38:32 Yeah.

38:33 and, so like BericsOic was doing all these things about letting you pass encodings all over the place.

38:38 And switch between things.

38:40 And that was also complexity.

38:42 So finally decided, okay.

38:44 I had heard some anecdotes as well, from people who had switched from using Python 2 to Python 3 or had stuck with Python 2 and old versions of BericsOic because they had noticed a significant performance difference in the first versions of BericsOic that added that 2 and 3 compatibility.

39:00 and so I figured, okay, I'm going to get a similar speed up if I remove that now, now that we don't support Python 2 at all.

39:07 that was very complicated.

39:08 I basically like just had to go through every single function and start removing it, run all the tests, see what failed, pick another function to keep working on and just slowly, slowly pull it all apart.

39:20 but I did end up with, so now BericsOic just supports strings everywhere except in the very few places where it works directly with the request and response data, where it, like, it was like.

39:33 Right.

39:34 Like multi-part form file.

39:35 Yeah.

39:36 When you first get the request in and it's just the raw body that you might turn into JSON or form data, et cetera.

39:42 or, when you're finally producing the response and taking like either file data, which is binary or, you know, string data and turning it into the bytes.

39:52 that's the only place now where it deals with bytes everywhere else is strings.

39:56 And the boundary there is always UTFA.

39:59 and if UTFA isn't your thing, it's not, we're not preventing you from using other things.

40:03 It just means that when you're at those boundaries, you pick the new, you know, you can take the bytes directly and work with them.

40:10 Cool.

40:11 surprisingly I have gotten, like, this was a huge, massive change and I have not gotten any bug reports about it, which I'm just, I was, I was like, I was stressing so much about like, okay, this is huge.

40:23 I mean, we tested it first and, like maybe the releases and everything, but those go to almost no attempt.

40:29 Talk Python to me is partially supported by our training courses.

40:33 Do you want to learn Python, but you can't bear to subscribe to yet another service at Talk Python training?

40:39 We hate subscriptions too.

40:41 That's why our course bundle gives you full access to the entire library of courses for just one fair price.

40:46 That's right.

40:47 With the everything bundle, you save over 80% off the full price of our courses.

40:52 And you own them all forever.

40:54 That includes the courses published at the time of purchase, as well as courses released within about a year after the bundle.

41:01 Stop subscribing and start learning at talkpython.fm/everything.

41:06 All right.

41:08 I can't leave the house for the next week.

41:10 Publish.

41:11 Yeah, no, like you joke, but like, seriously, when I hit the publish button or when I used to hit the publish button, I would be like, I want to go for a walk now because I just did a ton of work and I just want to clear my

41:22 head, but oh God, then an hour from now when I get back, what is my inbox going to look like?

41:27 Yeah.

41:27 Yeah.

41:28 Yeah.

41:29 That's great.

41:30 And you know, you talk another part of your presentation at FlaskCon was about project level stuff.

41:37 And you also talked about the systemization type of thing you're looking for.

41:41 So one of the things you switched to is the trusted publishers.

41:44 That's kind of cool, right?

41:45 Yeah.

41:46 Yeah.

41:47 So I mentioned a little bit about like when we were talking about, sorry, when we were talking about pinning requirements, I was saying, oh, you know, it makes it a lot easier for every contributor to work on things at sprints if every single environment is the same.

42:03 And so kind of on a meta level, I, there's a lot of like different tools and configurations and workflows we use across projects.

42:13 But they've kind of been developed over time as I've learned them.

42:17 And so I've been doing, I've been doing work on like a meta level.

42:21 So every project now, if you go look at Flask and Verksoeg and Jinja and you clone, clone all the repos, all the repos look exactly the same.

42:28 And they all have the same files, the same directory layout, the same tool configurations, et cetera.

42:34 Because just like it should be easy for every contributor to get the same environment, it should be easy for anybody who's used to contributing to Flask to go over to Verksoeg and be just as comfortable in that project.

42:44 It's the Flask way and it all goes the same, right?

42:47 Mm-hmm.

42:48 So yeah, like trusted publishing, that was another big part of this was like making workflows.

42:54 So we have a workflow for running tests, for example.

42:57 But publishing used to be a very manual process.

43:01 And it's evolved over the years too, because we were on Travis before.

43:04 And then we needed to make like Windows builds for MarkupSafe, which has wheels.

43:10 So we were on AppVayor also.

43:12 Then Travis went away and stuff and GitHub Actions became more.

43:16 And so, but like that was all for tests.

43:18 Like for building, we basically, when we wanted to make a new release, it was way harder in the past, which is why releases happened less often.

43:31 So we had to do all the little bookkeeping stuff to like set the release version and the release date and everything.

43:36 Now I have to go get my Mac, get my Windows machine, get my Linux machine, make the builds on all of them.

43:42 Oh my gosh.

43:43 So we can manually like consolidate them, upload them manually to PyPI, etc. and make sure that all worked.

43:49 So what I have now is they have a standard publish workflow on every single project.

43:54 It works exactly the same way.

43:56 And you make a PR so that you can see all the tests run.

43:59 You know, you make a PR that just does that version bump and the date, you know, says the release date.

44:03 You watch all the tests pass and then you push a tag before you merge, you push the release tag and that kicks off the build workflow.

44:10 So we run our build.

44:12 We do SLSA or SALSA out of station, say like these are, these builds are associated with these commits in Git and were built by these workers.

44:22 It's kind of like a supply chain level thing.

44:24 And then we automatic, like it will collect all that stuff, show you here is the release.

44:30 Like here's a draft release for this here.

44:33 Like you have one more opportunity to look at the files and then a maintainer can go in and click publish in GitHub's UI.

44:39 And that will kick off like, okay, maintainer said everything's good.

44:43 We're just going to upload it now.

44:44 And that's all automated.

44:45 You don't, we're using the trusted workflow, trusted publishing workflow between PyPI and GitHub.

44:51 So I no longer have to have my password stored locally for PyPI or have like tokens made for each project.

45:00 All the authentication happens between GitHub and PyPI automatically and securely.

45:05 It's pretty cool.

45:06 If you go look up like trusted publishing on PyPI has like a blog or documentation that explains it.

45:11 But it is really, really convenient.

45:14 And it makes like this whole workflow means that whenever I want to make a new release, I just make a regular PR, push a tag and then see everything pass and say, yes, we're good.

45:23 So I just basically have to push three buttons now.

45:26 Yeah, that's fantastic.

45:27 Which makes it a lot easier to just make more regular releases.

45:30 Like even bug fix releases.

45:31 I was always unwilling to make them fast because it was so much work.

45:34 Well, if it's a matter of just pushing, pushing a commit and then saying, okay, you're way more likely to quickly ship fixes and ship smaller releases and all sorts of stuff.

45:43 It's really good.

45:44 So you don't have the whole supply chain problem of your machine somehow got hacked.

45:49 But then now when you do your build, somebody's injected something gnarly into the wheel, right?

45:54 Because it never goes through you.

45:55 It just goes from GitHub directly to PyPI through GitHub actions, right?

45:59 Yeah.

46:00 And GitHub added their own.

46:02 So the SLSS attestation that I was talking about, if you scroll down on this screen, you can see that multiple.intoto.jsonl.

46:12 If you click on it, it's just a big blob of text.

46:15 But that's basically describing here are these wheel files, like those wheel files and SDISD files.

46:20 And here's like signatures and about like the GitHub environment that built this and everything.

46:27 GitHub itself is adding that similar sort of attestation.

46:30 And then PyPI is also adding more attestations.

46:34 It's not out yet though, but I'm sure I'm testing it once they're starting it and release it in beta.

46:40 So being able to attest that like our build environment was consistent with what the artifacts you're seeing and like the upload along the way was secured and like it is gaining more, like that's more getting more attention nowadays.

46:54 Yeah, that's really trying to keep it all.

46:57 It's excellent.

46:58 It's also makes it easier to hand it over to someone else and trust that they're doing it right.

47:02 Not like something new.

47:04 Oh, they only like windows seven.

47:05 So you got a weird wheel or something now.

47:07 Yeah.

47:08 Yeah.

47:08 I mean, this.

47:09 Yeah.

47:09 This line is on.

47:10 It's like was such an impediment to finding other maintainers because you had to teach.

47:14 Like, I think I probably had some document that explained how to do this build before.

47:18 Like all the steps I went through, but it was like it was so complicated.

47:22 And like, yeah, if somebody else wanted to make a release, I would have to make sure they did everything correctly.

47:27 I had just gotten used to it.

47:29 It was like wrote for me, but it was a lot of steps.

47:31 Yeah.

47:32 Now it's just anybody does the same, you know, make a PR, push a button.

47:36 Everything else is done for them.

47:37 Yeah.

47:38 Yeah, that's awesome.

47:39 All right.

47:40 So the two takeaways that I got from Virksog's update was this dropping of the two to three juggling

47:46 made it 50% faster for request response.

47:49 And URL lib is no longer URL lib-ish.

47:53 Yeah.

47:54 Yeah.

47:55 So that was the other part.

47:56 If we're going back to Virksog.

47:57 So we removed the, the string bytes, testing all over the place.

48:02 And Virksog, this was again, historically because of like Python two versus Python three differences

48:08 and then compatibility and stuff.

48:10 But another of the changes in Python three was URL lib.

48:13 In Python two, there was like URL lib and URL lib two.

48:17 And that's why there's also the project URL of three.

48:19 Yeah.

48:20 But Python three kind of consolidated that back into URL lib with sub packages instead.

48:26 And so it kind of changed the interfaces and where everything was.

48:30 So at the time it made sense for Virksog to just copy that code into our own code base

48:37 and then make our own tweaks to it to be compatible with everything.

48:42 And, but what that ended up meaning was we had an entire copy of URL lib with our own tweaks in our code base.

48:49 And then we weren't keeping up with changes.

48:52 So like CPython has a, has like a hundred different core devs on it.

48:56 I mean, they're not all paying attention to URL, but they're making regular, you know, security updates or just performance improvements and that sort of stuff.

49:04 And we're not getting any of those benefits because we now have like this vendor copy that we've changed ourselves.

49:08 We couldn't even bring in the changes.

49:10 And just like the string bytes everywhere, it, it having that our own copy of that really complex low level code made it harder to reason about the code and be like maintain it.

49:19 And all this stuff is kind of like, it's not the essential parts of Virksog.

49:23 Virksog is like trying to be the WSGI utilities and stuff.

49:26 It's not trying to be like every single possible, like it's not trying to, we don't need to make our own URL of utility, everything to be Virksog.

49:33 Yeah.

49:34 So that was another big one where identified like, okay, this is just a lot of complexity.

49:37 I didn't actually expect this to be a performance improvement, but when I actually went through and removed URL lib and our own copy and replaced it with Python's version, we got like a 30% speed up just on our own.

49:52 So the combined of those two big changes was like about a 50% speed up in our request response handling.

49:57 Yeah, that's awesome.

49:58 Like it turns out that the, like Python's implementation of all this was just faster than ours.

50:04 And it's still, you know, does all the same things.

50:07 Yeah.

50:08 So now you don't have to mess with it.

50:09 You get it for free.

50:10 Yeah, exactly.

50:11 Like everyone else.

50:12 We can, like the, a lot of these changes, a lot of the changes in all the libraries, stuff where I've been, you know, like, like I said, I wasn't the original author of this stuff.

50:22 So I've had to like, learn the code bases.

50:25 I've had to like dig into them and say like, what is written here?

50:28 Why is it written this way?

50:29 How is it all related?

50:30 And along the way, I just keep identifying like, okay, this is the actual, you know, purpose of this library.

50:38 Does this fit into that purpose or can we be doing something different?

50:42 And so kind of trying to like slim down the libraries and like focus, tighten up their, the focus on their like purposes more.

50:50 Right.

50:51 If there's parts that are, it needs to work, but it's not its purpose.

50:54 Maybe that can come from somewhere else.

50:55 Yeah.

50:56 Yeah.

50:57 All right.

50:58 Yeah, absolutely.

50:59 We've got about 10 more minutes.

51:01 Okay.

51:02 Probably.

51:03 So what else do you want to cover to, to, to, to, the state?

51:07 There's there, I'll mention, Jinja and click really briefly because, these two libraries are also huge.

51:14 They're used everywhere.

51:15 downloaded a ton.

51:16 Jinja is a templating library.

51:18 you write template files and then you can render them with, you know, variables to produce output.

51:23 HTML, you know, but also like text files or all sorts of stuff.

51:27 yeah, I think people, yeah, I think people pigeonhole Jinja2 much.

51:33 They think, okay, well I'm generating dynamic HTML from a server request.

51:37 Like you can use Jinja to generate all sorts of files.

51:40 I use it on, stuff basically on, Python generate like emails.

51:46 Somebody wants to reset their password, right?

51:48 Like I'll generate an email body from it, for example.

51:51 Right.

51:52 That kind of stuff.

51:53 Yeah.

51:54 And then click is a, just like flask is a framework for web applications.

51:57 Click is a framework for command line applications.

51:59 and both of these libraries have gotten a lot of attention from me, but they are not at inbox zero.

52:06 Unlike the other libraries, I have not managed to get them down there.

52:09 because I was working on all the other libraries.

52:12 And, so these are where I'm like going to need to focus.

52:17 like I said, like, like my current focus for the rest of this year is writing maintainer documentation.

52:22 So I'm trying to do less code and all of these libraries are stable.

52:25 Everybody downloads them.

52:26 Like a ton of people download them.

52:27 They all work.

52:28 You know, we can make them better and everything, but they're not in like, it's not like they're, immediate danger or need of anything.

52:34 But I do want to like clear out the backlogs of those as well.

52:38 And, you know, looking for more contributors for that, help with that.

52:42 you said you're looking for contributors who are really psyched about typing and also for God, if anybody isn't, if anybody knows, like is an expert in typing and like type annotations and static type tools.

52:55 All the libraries do pass my PI strict tests and, export.

53:01 they're like, we do do some testing against PI, right?

53:04 To some degree.

53:05 but I'm just typing.

53:08 Just, it's very hard for me to understand.

53:11 Like it's a very complicated, subject on its own versus all the other stuff I have to be doing.

53:17 So I really would like somebody who's like, I am an expert at typing.

53:21 I'm going to like start fixing up what you're, cause I like had to, I had to learn typing as I was like adding it to these libraries.

53:28 yeah, yeah, that's a big thing that we can improve.

53:31 okay.

53:32 Yeah.

53:33 And yeah, you know, there's like, we've gotten a lot of attention, a lot of the stuff in click and Jinja also, we have PRs for a lot of stuff.

53:40 It's just a matter of me having the time to go through and review all of them to cut down that backlog, but we're getting there.

53:45 I'll get there eventually.

53:46 Yeah.

53:47 Beautiful.

53:48 and then the last, so the last thing I want to mention, or we ran out of time completely is, besides pallets, the core projects itself.

53:55 I've kind of mentioned this theme of trying to make the projects more maintainable and grow the community and the team.

54:02 And part of that that I've started identifying is, the, the, the greater ecosystem around these projects.

54:09 so flask is great to use on its own, but it's made even better by all the extensions out there that people have written, you know, for doing email, doing database stuff, authentication, all sorts of things.

54:24 and just like flask itself, you know, and all those libraries, there was a long period where they weren't getting as maintained, you know, as much attention and stuff.

54:34 And then I started stepping in, a lot of those extensions were written quite a long time ago now.

54:39 And the maintainers of those have kind of moved on to different things.

54:43 And so there's a lot of stuff in the ecosystem that isn't getting as much attention as it needs.

54:47 And a lot of the times, maintainers are aware of this and they're willing to like say, like to take help, you know, to, to get help with those things.

54:56 And so, I was really inspired by a project for Django extensions called jazz band.

55:01 Oh yeah.

55:02 we're basically they're an organization that says, are you a popular Django extension or pip or pip-tools?

55:09 For some reason they also control pip-tools, but, do you not have time to be the maintainer of it anymore?

55:14 come over to jazz band.

55:17 We'll you'll, you'll still be like, you can still be involved in the project, but we'll also help you find more people from the community.

55:24 Like we will open up the maintaining, the maintain, maintaining process to your interested, you know, users in the community.

55:32 and so I'm doing a similar thing with pallets called pallets eco or ecosystem.

55:37 Okay.

55:38 so if you don't go to github.com/pallets, eco, yeah.

55:42 Yeah.

55:44 Yeah.

55:45 Pallets, dash eco, github.

55:46 What we've started to do is reach out to, maintainers of like, well flask, SQL, Alchemy flask, admin flask, security flask, mail, blinker caching, debug toolbar, like all these huge extensions.

56:00 So many of them, have these huge backlogs just like flask and all the other projects did when I got started with them, you know, and, their, their maintainers are overwhelmed.

56:08 And so I reach out to them.

56:10 I've been reaching out to them and, you know, kind of explaining, Hey, we're, we're starting this thing up.

56:14 Do you want to add your project?

56:15 so we've had some successful already.

56:18 we've had people at sprints contribute to them.

56:21 And, like I was talking about, I've kind of standardized.

56:24 How flask and the other projects look like all the tools they're using the layouts they're using the workflows they're using.

56:30 I'm taking that same approach and trying to standardize all the extensions we get to.

56:35 so the idea is that anybody who's used to contributing to one of these extensions should, it should be just as familiar to them to jump into another extension and contribute there as well.

56:45 Right.

56:46 That's a great idea.

56:46 Yeah.

56:47 and so with pallets eco, we can help find maintainers, from the community, add them, but the core team for pallets themselves still has access as well.

56:58 So, you know, if we make some change to flask that finally removes something that some, like some internal thing that somebody was relying on and like suddenly this popular live extension no longer works.

57:10 We at least have access.

57:11 Like we're not, we're probably not going to take on the responsibility of being the like core maintainers of all these things, but we can step in and make an emergency release that just, Oh, you just needed to change this line here.

57:20 Make a bug fix release really quick so we can at least keep the ecosystem going while we like work on finding longer term sustainability with more maintainers.

57:29 I love that idea.

57:30 Cause a lot of times it is a really small change, but if it doesn't work, it doesn't work.

57:34 Right.

57:35 Right.

57:36 Exactly.

57:37 Like a lot of the times it's been like, I like we have made like little deprecations and then remittles and stuff, which have just, that was the one thing that some random extension was relying on that every, like half the ecosystem ended up relying on.

57:48 And we just had to let you know, change a line or change an importer or add an argument.

57:52 Yeah.

57:53 So yeah, like that's, that's my big focus.

57:55 Now, if people are interested in contributing to pallets, they're welcome to, you know, contribute to like Jinja and click or any of the projects as well.

58:03 If there's open issues, they can work on them, but like a huge new source of like involvement for people can be, what are the extensions you're using?

58:11 Let's get you involved in those as well.

58:13 Yeah, it makes a lot of sense because to make a change to flask is, it's a highly polished piece of software, but the extensions potentially are more open to just jumping in and getting into it.

58:25 Yeah.

58:26 It's really, it's really hard for people.

58:27 It's hard to tell people this, but like, you know, people come in excited, like, Oh, I want to contribute to flask.

58:32 And then they look at it and they're like, Oh, three open issues.

58:35 What do I do?

58:36 You know, or like, and these three issues are like really low level stuff or like they've already been handled or something.

58:41 Sure.

58:42 And so we like, yeah, like what we're telling people now is like, okay, well flask, not only is it made up of these five other libraries, but there's also this whole extension ecosystem out there for you to contribute to.

58:52 Like everybody's heard of flask, you know, so we can point them at the right place.

58:57 They come to us and then we point them.

58:59 Yeah.

59:00 Excellent.

59:01 Well, I'll be sure to link to that in the show notes as well.

59:02 Yeah.

59:03 And with that, I think we're out of time.

59:04 Thank you for being here.

59:05 Just final call to action.

59:07 You know, people either want to contribute or just want to use flask.

59:10 What do you tell them?

59:11 Yeah.

59:12 Yeah.

59:13 So like I said, we're like developing all its eco.

59:15 I'm currently writing maintainer documentation.

59:17 So it'll make it easier for people to get involved in that way, writing a new website with a lot of our policies and everything.

59:24 But the main point of contact for all of this and the way we could coordinate with our community is on our discord server.

59:31 So if you go to discord.gg/palettes, that will let you join the palette server.

59:37 It's, you know, open to everybody.

59:40 We need help, you know, not only contributing to libraries, but answering questions in our questions channel or, you know, like triaging issues and all sorts of things.

59:49 There's lots of different ways to be involved in the projects without writing code.

59:53 And it all starts on that discord server.

59:55 Awesome.

59:56 Well, thanks again for being here and catch you next time.

59:59 Yeah.

01:00:00 Thank you.

01:00:01 Bye.

01:00:02 Bye.

01:00:03 This has been another episode of Talk Python to Me.

01:00:05 Thank you to our sponsors.

01:00:07 Be sure to check out what they're offering.

01:00:08 It really helps support the show.

01:00:10 Take some stress out of your life.

01:00:12 Get notified immediately about errors and performance issues in your web or mobile applications with Sentry.

01:00:18 Just visit talkpython.fm/sentry and get started for free.

01:00:23 Want to level up your Python?

01:00:24 We have one of the largest catalogs of Python video courses over at Talk Python.

01:00:28 Our content ranges from true beginners to deeply advanced topics like memory and async.

01:00:33 And best of all, there's not a subscription in sight.

01:00:36 Check it out for yourself at training.talkpython.fm.

01:00:39 Be sure to subscribe to the show.

01:00:41 Open your favorite podcast app and search for Python.

01:00:44 We should be right at the top.

01:00:45 You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct

01:00:51 RSS feed at /rss on talkpython.fm.

01:00:54 We're live streaming most of our recordings these days.

01:00:57 If you want to be part of the show and have your comments featured on the air, be sure

01:01:01 to subscribe to our YouTube channel at talkpython.fm/youtube.

01:01:05 This is your host, Michael Kennedy.

01:01:07 Thanks so much for listening.

01:01:08 I really appreciate it.

01:01:09 Now get out there and write some Python code.

01:01:10 Get out there and write some Python code.

01:01:11 Get out there and write some Python code.

01:01:11 Get out there and write some Python code.

01:01:12 Get out there and write some Python code.

01:01:12 Get out there and write some Python code.

01:01:12 Get out there and write some Python code.

01:01:13 Get out there and write some Python code.

01:01:14 Get out there and write some Python code.

01:01:15 Get out there and write some Python code.

01:01:16 Get out there and write some Python code.

01:01:17 Get out there and write some Python code.

01:01:18 Get out there and write some Python code.

01:01:19 Get out there and write some Python code.

01:01:20 Get out there and write some Python code.

01:01:21 Get out there and write some Python code.

01:01:22 Get out there and write some Python code.

01:01:23 Get out there and write some Python code.

01:01:24 Get out there and write some Python code.

01:01:25 Get out there and write some Python code.

01:01:26 Get out there and write some Python code.

01:01:27 Get out there and write some Python code.

01:01:28 Get out there and write some Python code.

01:01:29 you you Thank you.

01:01:32 Thank you.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon