Michael Kennedy: For years, Django and Async came with an asterisk.
Michael Kennedy: The docs themselves warned you off it.
Michael Kennedy: Scary performance notes.
Michael Kennedy: A story that felt half-finished.
Michael Kennedy: Well, that story just got rewritten, literally.
Michael Kennedy: And the person who rewrote it is here to tell you why that old framing was wrong.
Michael Kennedy: Carlton Gibson is a former Django fellow, sat on the security team for eight years,
Michael Kennedy: and he's on the steering council.
Michael Kennedy: On this episode, we get into the Async topic doc rewrite.
Michael Kennedy: what actually remains versus what was just fear and the new tasks framework in 6.0,
Michael Kennedy: DB-level cascades and fetch models landing in 6.1,
Michael Kennedy: and why free threading is the bet it's about to pay off big for Django.
Michael Kennedy: If you've been told that Django's async story isn't ready,
Michael Kennedy: this episode puts that myth to bed.
Michael Kennedy: This is Talk Python To Me, episode 556, recorded July 2nd, 2026.
Michael Kennedy: Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
Michael Kennedy: This is your host, Michael Kennedy. I'm a PSF fellow who's been coding for over 25 years.
Michael Kennedy: Let's connect on social media.
Michael Kennedy: You'll find me and Talk Python on Mastodon, Bluesky, and X.
Michael Kennedy: The social links are all in your show notes.
Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
Michael Kennedy: That's right.
Michael Kennedy: We live stream the raw uncut version of each episode on YouTube.
Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
Michael Kennedy: This episode is brought to you by Sentry.
Michael Kennedy: Don't let those errors go unnoticed. Use Sentry like we do here at Talk Python. Sign up at
Michael Kennedy: Talk Python.fm slash Sentry. Carlton, welcome back to Talk Python To Me. Amazing to have you here.
Michael Kennedy: Thank you, Michael. Thank you for having me on again.
Michael Kennedy: Always fun to talk with you. Fun to have you back. We're going to talk about one of my favorite
Michael Kennedy: topics, async, both for the reasons it's amazing and the reasons it's like, why? Why is it this way?
Carlton Gibson: Why do we do this to ourselves is the thing, right?
Michael Kennedy: Exactly.
Michael Kennedy: Wait, I want to say, oh, but I didn't want it like that.
Michael Kennedy: No, just kidding.
Michael Kennedy: Specifically with regard to Django, you did some really interesting updates with Django
Michael Kennedy: that we're going to talk about.
Michael Kennedy: But first, your teams, they're still in the World Cup.
Michael Kennedy: How are we doing?
Carlton Gibson: Oh, yeah.
Carlton Gibson: Well, so I'm British by birth, so English by birth.
Carlton Gibson: So I was supposed to support England, but I live in Spain.
Carlton Gibson: So depending on who's winning, who's doing better, I get to flip my allegiance.
Michael Kennedy: you know i think that's really that's really amazing because you if one of your team's not
Michael Kennedy: doing well you can just like i'm gonna just cheer for the other one it's it's great you get like two
Carlton Gibson: shots at the thing yeah i mean in the last uh european championships we had the england spain
Carlton Gibson: final so i couldn't lose really yeah that's amazing yeah so the u.s team um advanced yesterday as well
Michael Kennedy: they played really well so i'm very very excited for that yeah it's lovely to see new new nation
Michael Kennedy: emerging nations do well in the World Cup.
Michael Kennedy: You know, a long time ago, that would have been like some kind of joke.
Michael Kennedy: People are like, ah, surely you're joking.
Michael Kennedy: Surely you're joking about this.
Michael Kennedy: But honestly, soccer or football, non-American football, is popular in America.
Michael Kennedy: So super cool.
Michael Kennedy: Glad to hear it.
Michael Kennedy: And you're back.
Michael Kennedy: So tell people just what have you been up to?
Michael Kennedy: You know, not everyone listens every episode.
Michael Kennedy: So a quick introduction for yourself, maybe.
Carlton Gibson: Okay.
Carlton Gibson: So my name is Carlton.
Carlton Gibson: I've long time worked with Django.
Carlton Gibson: I'm a former Django fellow, did that for five years.
Carlton Gibson: I'm on the Django steering council.
Carlton Gibson: I was on the security team for eight years.
Carlton Gibson: I maintain a whole load of packages in the ecosystem.
Carlton Gibson: So, you know, I'm quite vested there.
Carlton Gibson: And, yes, you know, basically I use Django and have done for, I don't know, however many years to build web applications to pay the bills.
Carlton Gibson: Had a busy spring.
Carlton Gibson: I was everywhere I went to.
Carlton Gibson: There was a Pi TV event organized by JetBrains in Amsterdam in March that I went to.
Carlton Gibson: That was all on YouTube.
Carlton Gibson: There was, I don't know, 11 hours of live streaming or something.
Carlton Gibson: It was amazing.
Carlton Gibson: Then I was in DjangoCon Europe in Athens in, I think, May.
Carlton Gibson: No, April.
Carlton Gibson: And then in May, I was at Paikon Italia, which is in Bologna.
Carlton Gibson: Paikon Italia really is a lovely conference.
Carlton Gibson: You should make your way there.
Carlton Gibson: And now I'm just home and I'm exhausted.
Carlton Gibson: I had a quick holiday with the family, but now I'm hiding at home until September,
Carlton Gibson: where we've got Django on the Med, which is a three-day sprint event,
Carlton Gibson: which is going to be in Pescara, Italy, which we're looking forward to.
Michael Kennedy: That sounds really, really nice.
Michael Kennedy: I love traveling, but the jet lag kind of blows me out eventually.
Michael Kennedy: I'm like, ah, this is 11 hours jet lag.
Michael Kennedy: I don't really want to do this anymore.
Michael Kennedy: It sounds to me like you're kind of able to keep it in the broader Euro neighborhood, which is nice.
Carlton Gibson: Yes, I was.
Carlton Gibson: I was, which it does help because there isn't that massive time change.
Carlton Gibson: But it's still hard work, right?
Carlton Gibson: Even though you have fun at these events, even though you're seeing your friends,
Carlton Gibson: even though it's, you know, doing what you're vested in.
Carlton Gibson: It's their long days and you have to be full on, you know, in action all day, each day.
Carlton Gibson: And so by the time you get home, you are, you know, kind of exhausted.
Carlton Gibson: And then obviously you've been away and you get home and, you know, you need to be present for your family too.
Carlton Gibson: So there's a limit to how many of these I can do.
Michael Kennedy: So I won't do any other events this year because it's just too much.
Michael Kennedy: Yeah, that's good.
Michael Kennedy: Just too much.
Carlton Gibson: Yeah.
Michael Kennedy: I remember traveling when we had little kids and that was a whole nother level because you'd come back.
Michael Kennedy: It's like, you've been gone for a week, so I need some help.
Michael Kennedy: But I'm exhausted.
Michael Kennedy: You don't understand.
Michael Kennedy: But at the same time, it's a fair request, you know?
Carlton Gibson: Yeah, no, absolutely.
Carlton Gibson: Absolutely.
Carlton Gibson: I mean, our kids are older now.
Carlton Gibson: The eldest is 18, or will be 18 next week, just about to go to university, and then 16,
Carlton Gibson: and 13, 14.
Carlton Gibson: So they are a lot easier than they used to be.
Carlton Gibson: But still, it's a big ask on my partner to go away and they're alone for the whole week.
Carlton Gibson: Absolutely.
Carlton Gibson: In that point position, we might call it.
Michael Kennedy: Yes, exactly.
Michael Kennedy: so uh tell people you mentioned django on the med yes i talked to paulo about this a couple episodes
Michael Kennedy: ago but yeah tell me okay you're going to be part of this too yeah yeah yeah so paulo and i
Carlton Gibson: this was paulo's idea several years ago to have core developer sprints for django um because at the
Carlton Gibson: the end of jank on europe or the end of jank on yes we always have a couple of days of sprints
Carlton Gibson: and they're some of the best parts of the conference um but also it's around the time
Carlton Gibson: people are leaving and your people are already kind of exhausted you know having the three days
Carlton Gibson: of talks plus then of the sprints so it's like we wanted more and um we decided to to do this event
Carlton Gibson: and we were like yeah this is a good idea but it didn't happen and then i think dublin a year a
Carlton Gibson: year and a half ago now uh we were like no come on let's like it so we said we're going to have
Carlton Gibson: it in palo vijay which is my hometown um we did that last september and all last october sorry
Carlton Gibson: beginning of october and we're doing it in paulo's hometown pescara this september and it's as i say
Carlton Gibson: It's three days to get together and work on Django.
Carlton Gibson: And we had some really big features landed.
Carlton Gibson: Like, for instance, Django 6.1 is in pre-release now.
Carlton Gibson: And it's adding an ability to have DB-level cascade options for the on-delete.
Carlton Gibson: So on-delete is, well, you've got a foreign key, so I've got a user, and that user has a bookmark.
Carlton Gibson: Well, what happens when I delete the user?
Carlton Gibson: What happens to the bookmark?
Carlton Gibson: It's got a parent relationship.
Carlton Gibson: And so normally you would cascade that.
Carlton Gibson: Now, Django's always offered this option, but historically, it's done that in memory.
Carlton Gibson: In Python, it's pulled, it's walked the tree, and it's got the objects, and then it's deleted the leaves, and then the stems, and only finally down to the branches.
Carlton Gibson: And now, that can be very costly at scale.
Michael Kennedy: I'm going to delete this one record that references several tables with a million entries.
Michael Kennedy: That could be a lot of money.
Carlton Gibson: Exactly.
Carlton Gibson: You've got an organization that's got team members and projects, and you delete the organization.
Carlton Gibson: it just brings down your application basically you get out of memory memory issues so the database
Carlton Gibson: still has to do that work but the database is much much much better at doing that work than python is
Carlton Gibson: um and so that's so anyway we've got this new option this ticket had been open for i don't know
Carlton Gibson: so many years because it's it was really hard and we had marish feliciak who's a former django fellow
Carlton Gibson: and one of the core um orm contributors simon charette is one of the core open source contributors
Carlton Gibson: Lily Foote, Jacob Tyler-Wells, who's the new Django fellow. We had the four of them just there working
Carlton Gibson: together and they were able to get this over the line. And it's literally something which would
Carlton Gibson: never have happened except for the time that was available at Django on the Met. So we've got
Carlton Gibson: exciting plans for this time. We're hoping to get people again, people from around the community to
Carlton Gibson: come. And I know, I'm really excited about it. The first one was a proof of concept. It went really
Carlton Gibson: well. The second one's lining up to be amazing too. And once we've done two, well, it's kind of
Michael Kennedy: established and you know we're yeah well it's tradition you gotta do it yeah yeah exactly you
Michael Kennedy: gotta go hang out with the mediterranean so i've done i've done a lot of remote work in my life
Michael Kennedy: and i find you know when we do in-person meetups get the people who are all distributed together
Michael Kennedy: it just changes the energy you know there's something about the bandwidth of face-to-face
Carlton Gibson: communication which just isn't rec replicable record you which you can't replicate replica
Carlton Gibson: online yeah thank you mike thank you my but yeah it's it's i don't know i mean look it works online
Carlton Gibson: but as well we had another it was a good session as well so with um django we've got this um we've
Carlton Gibson: had recently this new features board which was an attempt to take people suggesting features away
Carlton Gibson: from django's track instance which is kind of old and scary and is a place for for the work to be
Carlton Gibson: done and put it into a GitHub project and where we could have a project board and we could have
Carlton Gibson: upvotes and we could have a Kanban board to see what were being advanced to try and give a bit
Carlton Gibson: more visibility into the process. And sometimes there's disagreements and those disagreements
Carlton Gibson: online, they can go on forever and ever, but we were able to have a session and there were
Carlton Gibson: different voices from different opinions. And we were able to come to agreements in five minutes
Carlton Gibson: on topics which had been rolling on the boards for months. And that kind of, look, I can see
Carlton Gibson: why you're saying this. It's really hard to get that online. You know, there's money emojis
Michael Kennedy: we use as much as we try and communicate openly it's just as much slack as you want to throw out
Michael Kennedy: there and you know i mean since 2020 it's it's kind of been just oh yeah obviously remote is better
Michael Kennedy: and so on and there are mega advantages don't get me wrong but it's not always better and in lots of
Michael Kennedy: ways so yeah so i guess for this good gone you you mentioned 2020 and it's covid it's one thing that
Carlton Gibson: um i was um django fellow over over that period and um you know it was a really hard time for
Carlton Gibson: because i think that the pandemic really knocked the back out of the community not we had we
Carlton Gibson: had older people stepping away we had young roots that were starting to come and then the put the
Carlton Gibson: the pandemic came and it was kind of like this really really really tough period and it's now
Carlton Gibson: five six years later that we're looking at it we're thinking actually now the community you know the
Carlton Gibson: activity is going on with things like jang and on space and the new community the new members that
Carlton Gibson: are coming through and the people who who are active in the community think well next year when the
Carlton Gibson: steering council is re-elected. There's obvious candidates who weren't there two years ago.
Carlton Gibson: And it's taken us, I think, half a decade to recover from the real knock that was COVID.
Michael Kennedy: Wow. I believe it. I believe it. So is this for just for core devs or is this open to people who
Michael Kennedy: just want to contribute? No, it's open to everybody. Obviously, if you're an established
Carlton Gibson: contributor, it's going to be easy to get going. But it's also about bringing on new
Carlton Gibson: and teaming people up.
Carlton Gibson: And, you know, if you come
Carlton Gibson: and you've got a particular interest in Django,
Carlton Gibson: if you're a total Django novice,
Carlton Gibson: it would be strange to come to choose Django on the Met
Carlton Gibson: as your first event.
Carlton Gibson: But if you're into Django and you know it
Carlton Gibson: and you want to get contributing,
Carlton Gibson: it's, yeah, that's part of the plan too,
Carlton Gibson: is that we have both experienced and new contributors
Carlton Gibson: and we can team people up and get people working together.
Carlton Gibson: And, you know, part of the contributing to Django problem
Carlton Gibson: is the learning curve.
Carlton Gibson: So it feels like it's a big, scary thing.
Carlton Gibson: Whereas if you sit down with somebody in a room and you work on what they're working on, you're like, actually, I could work on this side ticket.
Carlton Gibson: And all of a sudden people are off.
Michael Kennedy: Well, it suffers from what many of the successful projects out there do.
Michael Kennedy: It's super polished.
Michael Kennedy: It's used by millions and millions of projects.
Michael Kennedy: It's hard to just look at it and go, oh, I'll just change this without regard to all that knock on effect, right?
Carlton Gibson: Yes. And that's where part of the new features repo was about giving a space where people could put their ideas forward without having them immediately closed as won't fix.
Carlton Gibson: Because if you went and, you know, oh, can we integrate React? No, we're not going to do that.
Carlton Gibson: You can use React and here's how we use React, but we're not going to integrate it into JankRusate as an example.
Carlton Gibson: And that would be open, it'd be no, no, close, won't fix.
Carlton Gibson: And people felt that that was a little bit too...
Carlton Gibson: A little too stack over flowy.
Carlton Gibson: Well, yeah, it wasn't ideal.
Carlton Gibson: So the new features repo is to allow space to develop for a conversation.
Carlton Gibson: And then those ideas which have a bit of traction, we can say, no, do you know what?
Carlton Gibson: A lot of people have said they support this one or we can advance it.
Michael Kennedy: Hey, one second.
Michael Kennedy: Normally, this would be an ad break from Sentry, but not this time.
Michael Kennedy: Let's just thank them for supporting the show and get right back to the conversation.
Michael Kennedy: Also, visit talkpython.fm/sentry after the show.
Michael Kennedy: Thanks, Sentry.
Michael Kennedy: You have another project coming along, The Mantle.
Michael Kennedy: Tell us what this is.
Carlton Gibson: Django Mantle.
Carlton Gibson: So it's my take on a modern serialization story for Django.
Carlton Gibson: So the big topic we've had is about REST Framework, and REST Framework is aging.
Carlton Gibson: And REST Framework is wonderful, and it has been wonderful.
Carlton Gibson: But the serializers in particular, they're kind of last generation.
Carlton Gibson: And there are much more modern approaches available now, involved in Pydantic, in msgspec, in Attrs and Catters, which is what I use,
Carlton Gibson: are much, much faster than they used to be.
Carlton Gibson: They generate code which is almost as quick
Carlton Gibson: as you would see if you hand-wrote it.
Carlton Gibson: If you wrote the code to literally pull this attribute,
Carlton Gibson: this attribute, this attribute,
Carlton Gibson: the code that's generated for you by, say, caters
Carlton Gibson: is as quick as that code, which is amazing.
Carlton Gibson: Whereas REST Framework serializes,
Carlton Gibson: they go through and get the field object from the model.
Carlton Gibson: They get the value from it.
Carlton Gibson: It's like, hang on, all of those loopings
Carlton Gibson: are very slow by comparison.
Carlton Gibson: So then the question is, well, why don't we just use Pydantic?
Carlton Gibson: Well, Pydantic's fantastic, but it's not ORM aware.
Carlton Gibson: It doesn't have any insight into how Django works or anything.
Carlton Gibson: So Django Mantle is my take on that.
Carlton Gibson: It's the type-save wrapper around Django's liquid core.
Carlton Gibson: So you write these atters classes, and then you just instantiate a query object,
Carlton Gibson: and you go fetch, and it fully instantiates your object to the shape you define,
Carlton Gibson: and it fetches all the data all in one go,
Carlton Gibson: and it can do that for nested objects,
Carlton Gibson: and you can do writes with validation, all these things.
Carlton Gibson: And it's ORM aware in that it only selects the fields that it needs,
Carlton Gibson: and it does the pre-fetch relateds for you
Carlton Gibson: so that you don't get this N plus one query problem, right?
Carlton Gibson: And it's very good for performant fetches
Carlton Gibson: of just the exact data you want.
Carlton Gibson: You end up with your objects being fully Python typed.
Carlton Gibson: They're at its classes, so they're typed.
Carlton Gibson: Your type checker knows the way around them.
Carlton Gibson: mypy or PyRefly is now adding support for Atis classes too, I see this week.
Carlton Gibson: Oh, cool.
Carlton Gibson: So anyway, it's an attempt to show what a serialization story using these modern approaches
Carlton Gibson: can look like.
Carlton Gibson: And then from there, it's like, well, okay, what does an API framework in 2026 look?
Michael Kennedy: I love it.
Michael Kennedy: I love this idea.
Michael Kennedy: I think there's a lot of value in taking some of these very focused, lightweight, dedicated
Michael Kennedy: like data structures right like c attrs or pydantic or just straight data classes and somehow
Michael Kennedy: integrating them in here without just this heavyweight stuff like you talked about the
Michael Kennedy: eager loading that's and some of the other things like the typing can be weird as well like sql
Michael Kennedy: alchemy you kind of have to lie to it yes somehow do you either lie about it being a database thing
Michael Kennedy: or do you lie about it being an integer when it actually gets the value right like yeah yeah yeah
Carlton Gibson: Yeah, because the actual type is a Django deferred field, right?
Carlton Gibson: For a Django modifier, it's a deferred field.
Carlton Gibson: What on earth is a deferred field?
Carlton Gibson: Where it's an object that has the descriptive protocol
Carlton Gibson: so that when you access it, it gives you the converted value.
Carlton Gibson: I don't want to type that.
Michael Kennedy: Exactly.
Michael Kennedy: Even if you do, then you try to add it to an integer.
Michael Kennedy: It's like, you can't add that to an integer.
Michael Kennedy: That's not the same thing.
Michael Kennedy: You're like, but it's going to be.
Carlton Gibson: Yeah, it's going to be.
Carlton Gibson: So this was the topic of my talk that I gave in Amsterdam
Carlton Gibson: and Django in Europe and PyCon in Thailand.
Carlton Gibson: It's slightly different versions because I had more time at DjangoCon Europe.
Carlton Gibson: So I went more into the way we grow from, say, an active record pattern,
Carlton Gibson: which is like a Django model, right?
Carlton Gibson: It's an active record.
Carlton Gibson: It's your database row, but it's also an object that's got logical behaviors
Carlton Gibson: to a more separated approach where you're like, hang on,
Carlton Gibson: I don't want my display logic and my aggregation logic
Carlton Gibson: and my user validation logic all living on this one database class.
Carlton Gibson: So how do we separate those off?
Carlton Gibson: That's kind of where mantle came from originally.
Carlton Gibson: But the idea was that, and my take is that Django's ORM is built on these very powerful dynamic patterns that Python allows.
Carlton Gibson: And retrofitting static typing onto that is going to be a real problem.
Carlton Gibson: So instead of that, that's also a dynamic C.
Carlton Gibson: On top of that, we have these static islands where we can have all the nice type safety features of modern Python,
Carlton Gibson: but we're not trying to eliminate the very powerful dynamic features that we have underneath.
Carlton Gibson: And so the mantles, the shape classes that you define, they're your static islands.
Carlton Gibson: And there you can add all your domain logic that you want to, and you can have it fully
Carlton Gibson: separated from the database.
Carlton Gibson: And they are just pure Python classes.
Carlton Gibson: There's no data mutability in there.
Carlton Gibson: There's no like, say, oh, I modified a property and saved, and now I've updated something.
Carlton Gibson: No, there's none of that active record stuff going on.
Carlton Gibson: So it's a kind of way of getting some of the benefits of this sort of separation layers
Michael Kennedy: type approach whilst still keeping everything you love from the aura uh spoken like someone who
Michael Kennedy: appreciates some nice architecture and layers are very cool well the issue is as your application
Carlton Gibson: grows the complexity grows with it and you need more structure to manage that complexity like you
Carlton Gibson: simply do like it the issue isn't that you started with a jango model it's that your jango model grew
Carlton Gibson: and then grew and it grew and all of a sudden it's got it's got methods on it which are several
Carlton Gibson: distinct responsibilities. And then you think, oh, I'm getting a lot of code here. So you start
Carlton Gibson: doing dry, you start abstracting methods. But that abstracted method wasn't for a single
Carlton Gibson: responsibility. So it's not clean so that you've got, ah. And everybody who's grown a Django app
Carlton Gibson: has seen this. And it's perfectly natural and it's perfectly normal. It's just how applications grow.
Carlton Gibson: And Mantle is kind of my take on, well, how do we deal with that? How do we grow from the active
Carlton Gibson: record pattern that we began to, to something that's more robust. And it's not that you should
Carlton Gibson: start with the more robust patterns because you're over-engineering them. There's a nice road we have
Carlton Gibson: to walk between these two problems. And that's the joy of crafting the application over time,
Michael Kennedy: right? That's why we're programmed. I love it. I love it. All right. Let's talk about Django 6.1.
Michael Kennedy: Yes.
Michael Kennedy: I think it's coming out.
Michael Kennedy: It's not quite finished,
Michael Kennedy: but there's a lot of features we're going to talk about
Michael Kennedy: that are pretty exciting and related here, right?
Michael Kennedy: A lot of new things coming out of the database, for example.
Carlton Gibson: Yes.
Carlton Gibson: So I think it's in beta now.
Carlton Gibson: So it's going to be a release candidate in a couple of weeks,
Carlton Gibson: and then we're about a month away from the final release.
Carlton Gibson: Oh, by the way, I see you've got the page up there.
Carlton Gibson: The Django Developer Survey is on right now.
Carlton Gibson: Do take it, folks.
Carlton Gibson: We want as many replies as we can.
Carlton Gibson: It really does help drive forward the development of Django.
Carlton Gibson: So do give that five minutes there of your time to answer the questions.
Carlton Gibson: But what's exciting?
Carlton Gibson: Well, we already talked about database-level cascades, right?
Carlton Gibson: That's my big feature because that's something that you just couldn't work around.
Carlton Gibson: And there's no in Python solution to that.
Carlton Gibson: We wanted that.
Carlton Gibson: You'd have to, well, in the past, I have created a custom database backend and changed the way it creates.
Carlton Gibson: No, that's not a sustainable way.
Carlton Gibson: So database-level cascades are my favorite one.
Carlton Gibson: The one that I think more people are excited about is called fetch modes, which are on query sets.
Carlton Gibson: So we talked about the prefetch related with the way Mantle handles it.
Carlton Gibson: But the idea is you've got an author and so you fetch a user and they've got a list of bookmarks.
Carlton Gibson: And so you get the author, you get the user, and then you iterate for, bookmark in users.bookmark, do display the bookmark.
Carlton Gibson: And so what happens is it goes through and you get this N plus one query where it goes and fetches the lazy related object.
Carlton Gibson: And that's great at small scales and when you're getting going, but it's a performance nightmare, basically.
Carlton Gibson: And this N plus one problem that comes up is something that people hit all and all again.
Carlton Gibson: So fetch modes let you say, look, fetch peers, which is the exciting one.
Carlton Gibson: It lets you say, if I access the first element in a list of related objects, go and get them all at once.
Carlton Gibson: And so it's like a deferred pre-fetch related.
Carlton Gibson: And that's going to be a lot easier to manage in a lot of cases than having to manually add the pre-fetch related in each case, because those often become difficult to do by hand.
Carlton Gibson: They're all right to add the first time, but they become difficult to keep updated.
Carlton Gibson: And then you're suddenly pre-fetch relating something which you're no longer using.
Carlton Gibson: And so fetch mode.
Michael Kennedy: Yeah, your data access layer, maybe you're right, says get me all the books.
Michael Kennedy: But then you might have to add like some kind of flag that says and the authors.
Michael Kennedy: Because sometimes you want to call that function and you want the authors, but sometimes you
Michael Kennedy: want to just list the books, you know, and you don't need that.
Michael Kennedy: And it's like, yeah, so this way kind of just lets you says, if you're ever going to do
Michael Kennedy: this lazy loading, then basically upgrade it to an eager load.
Carlton Gibson: Yes.
Carlton Gibson: And there's, I don't think the videos are quite out yet, but Jacob Tyler was, you found
Carlton Gibson: a great talk at DjangoCon Europe on the, on how fetch modes work.
Carlton Gibson: They'll, they'll be out very soon.
Carlton Gibson: I think they'll be on YouTube, but do look out for them in the interest, but how, how,
Carlton Gibson: how fetchmates work and what the limitations were and you know where it's not you know it's not a
Carlton Gibson: magic solution it's not just oh let's enable fetch peers in all cases you know without thinking about
Carlton Gibson: it no but it it's a good change and um when i've spoken to people about what they're excited about
Carlton Gibson: in 6.1 most people have pointed to this as their headline feature nice nice so that's good and then
Carlton Gibson: i guess um a little bit yeah go ahead well i was going to say about the other thing that i'm
Carlton Gibson: excited about that you know there's an old list of features the thing with django releases every
Carlton Gibson: there's this big long release pack go and read it go and pick your favorite features but there's
Carlton Gibson: always lots in there for everything but you we can now customize the multi-part parser class for
Carlton Gibson: on the request object now whoever wants to do that well it turns out but that you can when you're
Carlton Gibson: getting multi-part requests if you're getting big ones with lots of multi-parts in swapping out a
Carlton Gibson: different multi-parts class could save you maybe 30 on your passing time which is 30 cpu on pass it
Carlton Gibson: on request for a passing time,
Carlton Gibson: that may be a non-negagable game.
Carlton Gibson: So I'm excited about that.
Carlton Gibson: But I'm excited because it starts to open the pathway
Carlton Gibson: to more customizations on the request.
Carlton Gibson: And so, you know, Django's got this implementation,
Carlton Gibson: but can we swap out that implementation and compare it
Carlton Gibson: and see if we can get some performance gains
Carlton Gibson: by being able to turn some of these nods under the hood.
Michael Kennedy: That's really nice.
Michael Kennedy: And having it be customizable is really great.
Michael Kennedy: I'm working on this.
Michael Kennedy: I'm working with this project that I just want to use.
Michael Kennedy: I don't want to be an author of it, but it has no real extensibility.
Michael Kennedy: So anything I want to do, I have to write little custom bits and change the source code and run it.
Michael Kennedy: And I'm like, as soon as there's a new version, how am I going to pay for this?
Michael Kennedy: You know what I mean?
Michael Kennedy: And so this is really nice.
Carlton Gibson: Yeah.
Carlton Gibson: Again, this is customizing the multi-part pass class.
Carlton Gibson: I don't think that's for the majority of people.
Carlton Gibson: But when you need it, it's going to be there.
Carlton Gibson: And it's like, okay, actually, there's a big win.
Carlton Gibson: So those are my favorites.
Michael Kennedy: Yeah.
Michael Kennedy: Okay.
Michael Kennedy: What's the timeline?
Michael Kennedy: It's in beta, you say?
Carlton Gibson: It's in beta now.
Carlton Gibson: So the pre-release is three months.
Carlton Gibson: So the alpha was a month ago.
Carlton Gibson: The beta is just now.
Carlton Gibson: And then the release candidate will be in a week or so.
Carlton Gibson: And then a couple of weeks after that will be the final.
Carlton Gibson: So I guess August will be.
Carlton Gibson: So it's coming fast.
Carlton Gibson: Oh, yes, yes, yes.
Carlton Gibson: It's very nearly there.
Carlton Gibson: Excellent.
Carlton Gibson: So just a call to action.
Carlton Gibson: If you're using Django and you could just install it against your application and run the beta,
Carlton Gibson: run your test suite against the beta.
Carlton Gibson: That would be amazing because if it passes, then you're all good.
Carlton Gibson: You're good to update.
Carlton Gibson: If it doesn't pass, then we want to know that.
Carlton Gibson: We want to know, well, what changed?
Michael Kennedy: It's got to be such a challenge to work on a project that's used,
Michael Kennedy: not just consumed by people, but as a programmer,
Michael Kennedy: code integrated with this project, right?
Carlton Gibson: Yeah, yeah, yeah.
Carlton Gibson: And there's the whole ecosystem, right?
Carlton Gibson: So, I mean, why do people use Django?
Carlton Gibson: One of the big reasons they use Django is for the third-party packages
Carlton Gibson: that are available, CMSs or image processing packages or whatever it is that you want to do.
Carlton Gibson: Did we break any integrations with them?
Carlton Gibson: Ah, well, we hope not.
Carlton Gibson: But unless people test and tell us, we don't find out.
Carlton Gibson: And when I was a fellow for five years and in every release, we would have on release
Carlton Gibson: day bug reports saying, oh, there's some regression here when we could have had those a week before
Carlton Gibson: and fix them before the final release.
Michael Kennedy: Yeah.
Michael Kennedy: Have you looked lately what the...
Michael Kennedy: I'll just do it like this.
Michael Kennedy: Have you looked at what it says used by?
Michael Kennedy: On GitHub here?
Michael Kennedy: You know, it says, does it say how many projects?
Michael Kennedy: I don't know.
Michael Kennedy: Oh yeah, here we go.
Michael Kennedy: This is just the public projects on GitHub,
Michael Kennedy: but two million?
Michael Kennedy: Couple of million.
Michael Kennedy: Yeah, right.
Michael Kennedy: Okay, good.
Michael Kennedy: There's so many that are private.
Michael Kennedy: There's so many that have nothing to do with GitHub.
Michael Kennedy: It's like a very small sample.
Carlton Gibson: That's still crazy.
Carlton Gibson: Jay, a couple of years ago at DjangoCon US,
Carlton Gibson: I think maybe 2024,
Carlton Gibson: Jacob Kaplan Moss gave a sort of best estimate
Carlton Gibson: about the user base, about 4 million,
Carlton Gibson: something like that as a kind of you know four million in action django projects in in the wild
Michael Kennedy: so okay you know if you count all the internal apps given that two million public repos on gmail
Michael Kennedy: if you count all the internal private things that people just threw up for like a little internal
Michael Kennedy: company app i bet it's way more than four million now i obviously couldn't prove it but yeah i mean
Carlton Gibson: i'd have to ask jacob how he came up with the figures but it was in terms of downloads and
Michael Kennedy: looking at this and looking yeah yeah exactly yeah probably the big query data pipe yeah or
Michael Kennedy: Yeah. Honestly, I feel like that stuff's kind of broken these days. Like 10 years ago,
Michael Kennedy: that was pretty representative. But right now, I think it's kind of a little weird on both ends.
Michael Kennedy: I think it's weird because there's so many Docker builds, right? This project can say,
Michael Kennedy: well, it got a hundred downloads. Well, that's because we just built something in CI a bunch
Michael Kennedy: of times today. We didn't really intend to download it, that many projects. But also at the same time,
Michael Kennedy: there's a bunch of caching layers. Like you might grab a Docker image that has it or build a Docker
Michael Kennedy: image and never reload that or use uv caching like it's just so opaque i think i mean a lot of people
Carlton Gibson: run little local pi pi pi cache or pip caches sorry so when you do pip install you're not you
Carlton Gibson: fetched it once you but you might have installed it a hundred times from that so yeah exactly what's
Michael Kennedy: that meant to be counted as one or i i think it's why it's so hard i don't have no idea so anyway
Michael Kennedy: um incredible and this obviously is right i was gonna say once upon a time there was a an idea
Carlton Gibson: to add some kind of telemetry into Django.
Carlton Gibson: And obviously that didn't go anywhere
Carlton Gibson: because no one wants to go anywhere near that.
Carlton Gibson: But we still sometimes would like some idea
Carlton Gibson: about how we estimate
Carlton Gibson: because the sort of visible Django community
Carlton Gibson: is like a thousandth of a percent.
Carlton Gibson: So say Jacob's 4 million users isn't too far off.
Carlton Gibson: The sort of visible community,
Carlton Gibson: the people who subscribe to the newsletter
Carlton Gibson: or do the survey or come to Django cons
Carlton Gibson: or all these things,
Carlton Gibson: they're about a thousandth of that,
Carlton Gibson: like 4,000 or 5,000 people
Carlton Gibson: that we can sort of point to and go,
Carlton Gibson: I know who you are.
Carlton Gibson: Yes, I've heard of you.
Carlton Gibson: Yes, I know you're on LinkedIn.
Carlton Gibson: But that's a fraction of the total user base.
Carlton Gibson: It would be lovely if we had some way
Michael Kennedy: of just reaching more.
Michael Kennedy: I know.
Michael Kennedy: I have a new term for you, Carlton.
Michael Kennedy: Dark matter Django.
Carlton Gibson: Yeah, brilliant.
Carlton Gibson: I'm having that.
Carlton Gibson: Let me write that down.
Michael Kennedy: Dark matter Django.
Michael Kennedy: Well, we're talking about stuff
Michael Kennedy: that is not dark matter.
Michael Kennedy: So you recently did a bunch of work
Michael Kennedy: on the documentation and positioning of async in general for django yeah yes yeah so the topic
Carlton Gibson: guide which is here that you've got up on the page the asynchronous support topic guide it was first
Carlton Gibson: written when we very first added um async support to django back in like that jango 3. something or
Carlton Gibson: i can't remember exactly but i think it was um python 3.6 it was was when it is and um async's
Carlton Gibson: come an awful long way since then and it was very negative it was like oh we still haven't finished
Carlton Gibson: this it's still in development it's still not ready and the performance implications are terrible
Michael Kennedy: unless you do it 100 perfectly but you and there was regular back in um go back in um python three
Michael Kennedy: five three six days it async and await and this async concept really had kind of a two to three
Michael Kennedy: issue like i would even if i wanted to do it i got to call this library which is talking to the
Michael Kennedy: internet or into the database but it's not async so what's the point yes yes and the costs of so
Carlton Gibson: the the big thing we'll come and talk about a lot is threats so in um django uh we use a lot of what
Carlton Gibson: of a helper um from the asgirf library called sync to async where we um you take async function and
Carlton Gibson: you you wrap it into a call routine so that you can wait into a coroutine so you can await that
Carlton Gibson: and it gets run in a thread and async io has the two thread thing which is the same um but essentially
Carlton Gibson: the same option um sync to async has some ability to track which thread it was called from so for
Carlton Gibson: instance database connections they're tied to a thread um and the transaction state is all tied
Carlton Gibson: to that thread so it's important that database um queries are run on the same thread as the connection
Carlton Gibson: came from. Otherwise, you're going to have problems. Sync2AdsAsync adds a few niceties
Carlton Gibson: around that, but it's essentially the same as AsyncIO2 thread. Go and run this in an executor
Carlton Gibson: on a separate thread. That's great, but that used to cost orders of milliseconds to bootstrap and
Carlton Gibson: set up. With latest pythons, it's tens of nanoseconds, or tens of microseconds, sorry.
Carlton Gibson: Tens of microseconds when you're doing milliseconds requests, they're not a significant thing,
Carlton Gibson: But the documentation was like, no, this is going to slow down your requests.
Carlton Gibson: And it's like, hang on, it's really not.
Carlton Gibson: And the API is complete.
Carlton Gibson: The ORM, the cache framework, authentication, session, signals, it's all got async API.
Michael Kennedy: So from a user perspective, it really is all there.
Carlton Gibson: It doesn't mean there's no work to be done.
Carlton Gibson: It's an ongoing project.
Carlton Gibson: We keep developing it.
Carlton Gibson: We keep fixing new things.
Carlton Gibson: We keep adding new things.
Carlton Gibson: But this idea that the topic guy presented that somehow the story wasn't finished, well, that's not quite, that wasn't quite right.
Carlton Gibson: So we wanted to update that.
Carlton Gibson: And we wanted to take some of the warnings about performance and just downgrade them to notes.
Carlton Gibson: You know, they're a bit overplayed in this latter day.
Michael Kennedy: I agree.
Michael Kennedy: I think the sync to async and back and forth is pretty interesting.
Michael Kennedy: And more broadly, you know, one of the things people use as a, I don't really want to use async.
Michael Kennedy: It's kind of bad.
Michael Kennedy: they'll call it like a virus or something and a lot of times what they mean is like well you've
Michael Kennedy: got some low level function it's async so in order to call that the thing above it has to be async
Michael Kennedy: which means like the rest of your app like it just cascades you know it's sort of viral in the gpl
Michael Kennedy: sense right um but yes that's a you don't have to live with that you can yeah go ahead sorry well
Carlton Gibson: they call it function coloring problem right is that once you've got a blue function or red
Carlton Gibson: function all the functions are called it have to be the same color yes but but you there's nothing
Michael Kennedy: to stop you from going in a synchronous function just async to sync boom and like kind of just stop
Michael Kennedy: the propagation there or create your own async io event loop and just run that one bit down below and
Michael Kennedy: so you could have a synchronous function but it maybe calls five external endpoints and you could
Michael Kennedy: do all that with async in parallel and just like run that but cap it right there i think there's a
Michael Kennedy: lot more creativity that we can bring just just just say like oh it's virus either it's amazing or
Michael Kennedy: we don't want it at all, you know?
Michael Kennedy: Yes.
Carlton Gibson: No, that example,
Carlton Gibson: that example you gave
Carlton Gibson: of calling five,
Carlton Gibson: you know, five external things concurrently,
Carlton Gibson: that's one of the easiest ways
Carlton Gibson: into AsyncVagenda.
Carlton Gibson: So you've got your WSGI app,
Carlton Gibson: it's deployed,
Carlton Gibson: it's got its,
Carlton Gibson: you've run Gunicorn,
Carlton Gibson: it's got, you know,
Carlton Gibson: four workers running,
Carlton Gibson: saying handling requests,
Carlton Gibson: each one in a single thread,
Carlton Gibson: nice and separated,
Carlton Gibson: so they're not getting
Carlton Gibson: in each other's ways,
Carlton Gibson: sorry, in a separate process,
Carlton Gibson: each kind of single threaded,
Carlton Gibson: doing its thing.
Carlton Gibson: And then you're like,
Carlton Gibson: I want to make some,
Carlton Gibson: API requests.
Carlton Gibson: So you can define a single async view
Carlton Gibson: and Django's handlers will run that
Carlton Gibson: in an event loop for you
Carlton Gibson: and you can run, say, your five HTTP requests
Carlton Gibson: and you can aggregate them together
Carlton Gibson: and you can return a single response.
Carlton Gibson: And that can just be done in a fraction of the time
Carlton Gibson: of calling one and then the other.
Michael Kennedy: Yeah, yeah, yeah.
Michael Kennedy: And it's just so clearly a win, right?
Michael Kennedy: Do you have to switch to an ASGI, an ASGI server mechanism if you're going to use async views in Django?
Carlton Gibson: No, you can run async views under WSGI.
Carlton Gibson: But what you don't get, this is a good question.
Carlton Gibson: So say I'm deployed, say I'm a Django developer, when should I switch to ASCII?
Carlton Gibson: When should I switch to async?
Carlton Gibson: And the real question is if you want long-lived requests.
Carlton Gibson: If you want to do, say, something where you hold open a connection and you, say, do service center events where every five seconds you get an update.
Carlton Gibson: Like a stock ticker is a good example, right?
Carlton Gibson: You get what was the latest stock price.
Carlton Gibson: Okay, it keeps coming down the wire at you.
Carlton Gibson: Well, you don't want to do that on the WSGI model because each connection is a worker on WSGI.
Carlton Gibson: And so you say you've got four workers.
Carlton Gibson: Well, that's great.
Carlton Gibson: But then, well, hang on.
Carlton Gibson: I've got three of those held open by clients.
Carlton Gibson: well, now I've only got one serving requests.
Carlton Gibson: Well, okay, double your workers.
Carlton Gibson: But then you're going to double your users.
Carlton Gibson: And if you're using pre-forked workers
Carlton Gibson: where each worker lives in a separate process,
Carlton Gibson: that's a lot of times that your Django application
Carlton Gibson: is loaded into RAM and say the cache is primed
Carlton Gibson: or the database connections are set up.
Carlton Gibson: There's a lot of overhead to running multiple processes.
Carlton Gibson: Whereas if you can do it with a NASGI worker,
Carlton Gibson: you can hold open that connection
Carlton Gibson: and it can just be served on the event loop.
Carlton Gibson: You can have many connections just for one worker.
Michael Kennedy: It's basically tied to an event loop
Michael Kennedy: and then that can share that thread or that worker
Michael Kennedy: as it interlaces across that one event loop, right?
Michael Kennedy: Yeah, exactly.
Carlton Gibson: And that's where the exciting things come.
Carlton Gibson: If you've got long-lived connections,
Carlton Gibson: even if you're just doing polling,
Carlton Gibson: you can do polling quite quickly, once a second,
Carlton Gibson: and you're not really going to overload your whiskey workers.
Carlton Gibson: But if you're holding a connection open,
Carlton Gibson: Ah, at that point, Async and ASCII is really called for.
Carlton Gibson: Yeah, that's cool.
Carlton Gibson: So you can kind of have this progressive scale.
Carlton Gibson: Yeah, yeah.
Carlton Gibson: I mean, standardly, the people that, I mean, we have an awful lot of people doing very exciting things, you know, with Async.
Carlton Gibson: They're either running small projects where a single ASCII worker is enough and it can handle enough connections and you don't actually need multiple processes.
Carlton Gibson: Or they tend to be running at the moment a WSGI base for their app,
Carlton Gibson: so a standard WSGI base, which is handling most of the work.
Carlton Gibson: And then the async endpoints are just running in a single ASCII process
Carlton Gibson: as a sort of sidecar.
Carlton Gibson: And they do this because something we'll get into is you get what's called
Carlton Gibson: you get kind of contention for CPU-bound work on the event.
Carlton Gibson: And we can talk about that in a bit.
Carlton Gibson: But I think that's the way people are deploying most successfully
Michael Kennedy: at the slightly larger applications.
Michael Kennedy: Yeah, that makes sense. And this contention, it is very interesting. It certainly is. I want it actually, I searched for the wrong thing. Hold on. That is, I wanted to actually show. I recently went through this whole process of like, how could I make my server use less memory?
Michael Kennedy: brought and i had some of my web apps were running purely synchronous as whiskey and some of them i
Michael Kennedy: had upgraded to like true async running on asgi on granian right and i'm just i was looking the
Michael Kennedy: server i'm like it's using i don't know nine gigs of ram for all these problems like 27 containers
Michael Kennedy: running but still it's a lot i'm like is there a way that i could just maybe reduce the workers
Michael Kennedy: a little bit and make it chill.
Michael Kennedy: And so I wrote this article about like going through
Michael Kennedy: all these different things.
Michael Kennedy: But one of the things that I found really helpful was
Michael Kennedy: if I could switch to more of the processes,
Michael Kennedy: more of the requests being processed by an ASGI server
Michael Kennedy: with like truly async calls
Michael Kennedy: and down to the database layer and so on,
Michael Kennedy: maybe I can use fewer workers.
Michael Kennedy: And so I like, just off of like one of my web apps,
Michael Kennedy: I cut like 500 megs off because I could just reduce the number of workers because each one was more capable and didn't get bound up.
Michael Kennedy: There's still this computational problem you have, but at least you're not doing like I'm waiting a second for this API endpoint, you know?
Michael Kennedy: Yes, yes, yes.
Michael Kennedy: I thought that was pretty interesting.
Carlton Gibson: No, it is.
Carlton Gibson: And it's like people, it's one reason why people run.
Carlton Gibson: So I always run, not always, but I default to running, say, Gun & Corn with multiple workers, multiple processes as workers because it's separate and you don't get the guild contention issues.
Carlton Gibson: But there is a great approach, depending on how much of this CPU work that you're busy doing and how the guild contention comes into play.
Carlton Gibson: But if you run with the threaded worker, you've just got one process.
Carlton Gibson: And you've got much less memory overhead from running one process than you have from running four.
Carlton Gibson: Shared initialization and all that.
Carlton Gibson: Connection pooling, everything.
Carlton Gibson: Yeah, all of it.
Carlton Gibson: But it's never as simple as, oh, this is the way to deploy.
Carlton Gibson: How do you deploy your application?
Carlton Gibson: how long you got and how many developers are we asking because we'll all give different answers
Carlton Gibson: for all these really interesting reasons that trade off against each other yeah something i
Michael Kennedy: would like to get your thoughts on is i feel like sometimes people say like why are we making python
Michael Kennedy: so complicated like the magic of python was that it was simple and yet there's also another side of
Michael Kennedy: that story where people's like well i have to switch to go because i can't i can't do this and so you
Michael Kennedy: got to walk this tight balance of there has to be a simple story but you don't want there to not be
Michael Kennedy: a nice upper bound or high upper bound because you're going to lose maybe your your biggest
Michael Kennedy: proponents or your your biggest users right yeah what do you think about that um no i think look
Carlton Gibson: python so you know i this fits my brain idea i think it's something i'm very into and one of my
Carlton Gibson: sort of grumbles about the type about typing is that it becomes not pipe it fits your brain i mean
Carlton Gibson: And, you know, I was told a story at PyCon Italia,
Carlton Gibson: I showed five typing experts sat around a table trying to work out the correct type in.
Carlton Gibson: And these are the absolute gurus, right?
Carlton Gibson: And that's not fit your brain, is it?
Carlton Gibson: So part of me is like, ah, on that front.
Carlton Gibson: But we have to be performant.
Carlton Gibson: You don't want to have to change language just because you need to increase your throughput,
Carlton Gibson: just because you're doing a more serious application.
Carlton Gibson: That's not good for, that wouldn't be good for long-term sustainability of the project.
Michael Kennedy: No, it definitely wouldn't.
Michael Kennedy: And the fact that you don't have to add typing, you don't have to write async views.
Michael Kennedy: I think that's part of where it's really good because you can grow into that.
Michael Kennedy: There is space to grow into.
Carlton Gibson: There is, though, a kind of pressure to the original DEP, which added type hints to Python.
Carlton Gibson: said, we don't intend to make type hints compulsory, even by convention. But I think there is very much
Carlton Gibson: people coming into the Python landscape. There is a cultural pressure to adopt typing, even if perhaps
Carlton Gibson: it's not relevant to you. It's like, oh, no, but this is how you do it. And there is a you should,
Carlton Gibson: which perhaps doesn't respect that original promise in the dead.
Michael Kennedy: Fair. And I think AI throws a whole spanner into it as well. And let's not go too deeply
Michael Kennedy: down this because we can spend the next three hours on but you know if you ask an ai to write
Michael Kennedy: python a lot of times it'll do typed python now sure without asking yes and um the big issue
Carlton Gibson: with um ai output is can you verify it and so you know type safety any type safety that you get from
Carlton Gibson: the type checker is going to help the ai um verify the output or help you verify the output 100 i
Michael Kennedy: think it's a big bonus to ai as well whether yes people care about that you know that's a different
Michael Kennedy: deal. Indeed. So what's left? Where else do people need to focus? Okay, so performance realities is,
Carlton Gibson: you know, DB parallelism is your limit, right? So each DB connection is a ordered, like,
Carlton Gibson: it takes, you know, it takes a query and it gets a response. And so whether you're coming,
Carlton Gibson: whether you're doing that in threads, the way Django does it, or if you're doing it with greenlets,
Carlton Gibson: the way some other ORMs do it, you're still limited by the size of your connection pool.
Carlton Gibson: Again, and that's whether you're doing it with WSGI or ASCII, the limit always has
Carlton Gibson: been the number of database connections you could hold open at a time, basically.
Carlton Gibson: So that doesn't really change anything.
Carlton Gibson: If you want to scale up, you need to increase the size of your connection pool or handle
Carlton Gibson: that more efficiently.
Carlton Gibson: That's one thing.
Carlton Gibson: Async transactions is something that, because of the way Django's connections are tied to a thread local,
Carlton Gibson: we're never going to have async transactions in the sense that you can call await inside an atomic block.
Carlton Gibson: Why not? Because that await call may not be on the same thread as the connection, right?
Carlton Gibson: So the transaction state is held on the connection, which is on a thread,
Carlton Gibson: and if that await call handles in a different thread, you're going to be in big trouble.
Carlton Gibson: So it's always going to be the case with Django's choice that you need to take if you want.
Carlton Gibson: It doesn't mean you can't have transactions in async.
Carlton Gibson: You just wrap your transaction in a single function, which you then call within a single sync to async.
Carlton Gibson: So that's always going to be the case.
Carlton Gibson: Then there's CPU band work.
Carlton Gibson: Look, if you do work on CPU, you either block the event loop or you throw it to a thread.
Carlton Gibson: And then, you know, if there's a lot of CPU work going on, you've got GIL contention that we'll talk about momentarily.
Carlton Gibson: Or you have to throw it out to a separate process.
Carlton Gibson: But throwing work out to a separate process is just crazily heavy.
Carlton Gibson: You've got to bootstrap that process.
Carlton Gibson: You've got to marshal your data.
Carlton Gibson: You've got to work out returns.
Carlton Gibson: So, you know, async frameworks have tools to throw out to a separate process.
Carlton Gibson: But it's not something you want to address lightly.
Carlton Gibson: Really, really, threading was the way you wanted to go.
Michael Kennedy: But you are going to hit the gill, essentially.
Michael Kennedy: Yeah, yeah.
Michael Kennedy: For people who don't know, if by default, when you use async and await on a standard event loop, that's single threaded.
Michael Kennedy: Even though stuff is happening, it's literally single threaded.
Michael Kennedy: And the way that it time slices it or preemptively shares it is anytime you hit an await block, like on a database call or whatever, it's like, okay, that's waiting.
Michael Kennedy: So now the same thread can go process something else.
Michael Kennedy: But soon as you're back in regular Python, just jamming on something, well, there's no way to time slice that, right?
Michael Kennedy: So everything else is waiting on that computationally.
Carlton Gibson: And you end up with really horrible things.
Carlton Gibson: And I'm going to say it's horrible.
Carlton Gibson: I think it really is horrible, right?
Carlton Gibson: It's where you've got a loop of CPU-heavy work.
Carlton Gibson: I know you're rendering it and you add in an asyncio sleep zero just to release work.
Carlton Gibson: And it's like, why are we doing that?
Carlton Gibson: We're doing that because we're running CPU work on the event loop.
Carlton Gibson: The event loop wasn't for that.
Carlton Gibson: It was for our handling I.O., by async I.O.
Carlton Gibson: And we really want to throw CPU bound work to a thread.
Carlton Gibson: We just want to.
Carlton Gibson: But then we've got Python's guild.
Carlton Gibson: So this is where I'm super excited.
Michael Kennedy: It effectively says, well, you have as many threads as you want, but you still can run
Michael Kennedy: one at a time.
Carlton Gibson: Yeah, exactly.
Carlton Gibson: Either way.
Carlton Gibson: So either you do the CPU work on your one thread, which is running the event loop, or you throw
Carlton Gibson: it out to different threads and they get GIL contention and so you end up with essentially
Carlton Gibson: one cpu or one threads worth of clock time no matter which way you cut it which is python's
Carlton Gibson: real problem and it has you know it it's not actually about switching threads it's not actually
Carlton Gibson: about creating threads it's not actually about spinning up event loops those are relatively quick
Carlton Gibson: things it's about the inability to genuinely run parallel work in in multiple threads in python up
Michael Kennedy: until very recently. Yeah, it's another axis of that. You probably don't need it, but it's a low
Michael Kennedy: upper bound that shouldn't be there for people who need to grow into it. Yes, entirely. And you
Carlton Gibson: shouldn't need it. It can come in at quite moderate scales. Okay, my Hello World blog application,
Carlton Gibson: I'm not going to hit gil contention with my 10 requests a minute. It's not a problem if I'm lucky.
Carlton Gibson: Yeah, that's when it gets popular, yeah, in the article.
Carlton Gibson: Yeah, yeah, yeah.
Carlton Gibson: Oh, I hit Hacker News.
Carlton Gibson: I've got 10 requests in a minute.
Carlton Gibson: You know, you're not going to hit GitGil contention there.
Carlton Gibson: But if you're, again, serious about using Python, a bigger application,
Carlton Gibson: yes, you are going to have to do CPU work at some point.
Carlton Gibson: Otherwise, the computer's not doing anything, right?
Carlton Gibson: The program, if it's going to do something,
Carlton Gibson: it's going to have to use the CPU at some point.
Carlton Gibson: And so if you're doing that at scale,
Carlton Gibson: the Git has been an impediment to that.
Carlton Gibson: And people are, oh, I'm going to switch to Rast.
Carlton Gibson: I'm going to switch to Go.
Carlton Gibson: So do we have to switch language again?
Carlton Gibson: Can we not do that?
Michael Kennedy: Yeah, let's make it so we don't have to.
Michael Kennedy: And you don't have to have an insane amount of requests
Michael Kennedy: to benefit from this.
Michael Kennedy: Kind of like my little example I just showed with the memory thing.
Michael Kennedy: If you have to run enough workers that you needed two servers,
Michael Kennedy: if this free threading thing and the async stuff
Michael Kennedy: let you shrink that back down to one more manageable server,
Michael Kennedy: it saves you on DevOps.
Michael Kennedy: It saves you on complexity.
Michael Kennedy: It saves your money.
Michael Kennedy: So if you want money, all these things.
Michael Kennedy: So you don't have to be Instagram level of Django requests
Michael Kennedy: to benefit from some of these ideas, right?
Michael Kennedy: No, absolutely not.
Carlton Gibson: I mean, it turns out, and I've always said for years,
Carlton Gibson: with a medium-sized box, you can run a very high-traffic server
Carlton Gibson: in realistic terms.
Carlton Gibson: But the more you can do on the smaller box, absolutely the better.
Carlton Gibson: Absolutely.
Carlton Gibson: So three threading is the big win.
Carlton Gibson: It's the big exciting thing because Django kind of looked clumsy almost when it said,
Carlton Gibson: no, let's just put all the sync work into a thread.
Carlton Gibson: But actually, as three threading becomes more established and it works through the ecosystem,
Carlton Gibson: it looks as if Django's bet's going to pay off.
Carlton Gibson: That bet will have aged very well.
Carlton Gibson: Because we always really wanted to do CPU work in the thread.
Carlton Gibson: I think it's great.
Michael Kennedy: Yeah, I mean, you can have a thread pool.
Michael Kennedy: Your threads could each have sort of a hanging around database connection for any time you need it, ready to go.
Michael Kennedy: And yeah, you just delegate it out and you actually get parallelism.
Michael Kennedy: Yeah, no, and that's the thing.
Carlton Gibson: Actual parallelism within Python is really exciting.
Carlton Gibson: And that's for everybody.
Carlton Gibson: I mean, you know, to go back, why did we update the async topic docs?
Carlton Gibson: It's because there are problems that remain with async, but they're not Django-specific problems.
Carlton Gibson: The same GIL contention problems you have, you type FastAPI concurrency in, or scaling problems, and you read the same sort of problems.
Carlton Gibson: And so it's not Django specific.
Carlton Gibson: It's not a Django problem there.
Carlton Gibson: It's a Python structural problem.
Carlton Gibson: Same database scaling.
Carlton Gibson: How do we do it?
Carlton Gibson: What do database pools?
Carlton Gibson: Well, same using Flask.
Carlton Gibson: You're going to scale it that way, et cetera.
Carlton Gibson: It's nice that these are general problems that we all share, I think.
Michael Kennedy: Yes, absolutely.
Michael Kennedy: yeah i mean and let's see i think let's open it no there we go i think it's just so easy these days
Michael Kennedy: to try out free threaded python too it used to be oh you got to get this weird thing and build it or
Michael Kennedy: whatever but now with uv it's just literally uv python install like what do you want do you want
Michael Kennedy: three fourteen six t yeah that's all you're saying in two seconds you've got free threaded
Michael Kennedy: Python to play with and try out.
Carlton Gibson: Yes.
Carlton Gibson: The thing here, there's still work to be done here.
Carlton Gibson: Most of it is about the ecosystem, not about the architecture.
Carlton Gibson: The architecture is already in Plex.
Carlton Gibson: So if you're at an app level, because people have been running threaded Django for a long
Carlton Gibson: time.
Carlton Gibson: We're talking about people deploying Whiskey with threaded workers.
Carlton Gibson: They've been doing that for a long time.
Carlton Gibson: But standardly, at the app level, you don't touch things which are multi-thread.
Carlton Gibson: You might have, I don't know, some module level caching.
Carlton Gibson: You might have a property at the module level.
Carlton Gibson: Well, hang on.
Carlton Gibson: Is that really thread safe?
Carlton Gibson: Do you need to wrap that in a lock?
Carlton Gibson: But it's extensions, it's libraries.
Carlton Gibson: Are they doing these kind of patterns?
Carlton Gibson: And we just need to work through them and run all our test suites against them
Carlton Gibson: and make sure that we're compatible with re-threading.
Carlton Gibson: And then I think we're actually going to unlock an awful lot of performance for everybody.
Carlton Gibson: So instead of having to run multiple processes to get parallelism,
Carlton Gibson: you'll be able to run it all within one process.
Michael Kennedy: You know, it's a really exciting thing.
Michael Kennedy: Yeah, I have some really interesting experiments
Michael Kennedy: I want to put together with free threading,
Michael Kennedy: but the more important work is still out there.
Michael Kennedy: Yeah.
Michael Kennedy: With AI, I'm not ready to, like, go and work on these.
Michael Kennedy: Like, I don't, I can't do another open source project yet.
Carlton Gibson: Yeah, no, and you must avoid it
Carlton Gibson: because the trouble is that,
Carlton Gibson: I maintain a lot of packages, right?
Carlton Gibson: And it's a burden.
Carlton Gibson: It's a thing that once you've taken it on,
Carlton Gibson: you can't just put that.
Carlton Gibson: And you might think, oh, it's just a casual thing.
Carlton Gibson: must be very conscious and careful about what you package up and put out there in the world because
Michael Kennedy: you're making a promise to people like yeah carlton i'm thinking this is going to be a really good gist
Michael Kennedy: not a repo you know what i mean yes right exactly put up a gist do a blog post put up a gist say
Carlton Gibson: here it is but don't put it up as a as a package and unless you mean it if you mean it then it's a
Carlton Gibson: package on pypi and you know all the rest people can install pip installs directly from github
Carlton Gibson: You don't have often version control.
Carlton Gibson: You don't have to put it on PyPI for people to be able to play with it.
Carlton Gibson: Yeah, absolutely.
Michael Kennedy: So one thing I want to talk to you about, I know you're excited about, is the built-in
Michael Kennedy: task framework.
Michael Kennedy: Because all of this stuff about threading and all of that, you know, parallelism and, you
Michael Kennedy: know, event loops, it's fine.
Michael Kennedy: But if you could just say, let's just run that somewhere else.
Michael Kennedy: Don't hassle me.
Michael Kennedy: Tell us about this.
Carlton Gibson: Okay.
Carlton Gibson: So this is a great question, because when we first added async to Django, people were like, oh, this is background tasks.
Carlton Gibson: And it's like, no, no, no, it's not.
Carlton Gibson: It's all about I.O. and multiple connections and long-lived requests and things like that.
Carlton Gibson: It's nothing to do with having a queue where you want to do some asynchronous task.
Carlton Gibson: So asynchronous is the word has appeared, but it means other than making people wait.
Carlton Gibson: So the standard web, you've got a request and you send a response, and you want that to be as quick as you can.
Carlton Gibson: But let's say somebody has a password reset and you want to send them an email so that they can click on the password reset link and they can reset their password.
Carlton Gibson: Well, historically, you would have made the request, sent the email, wait for the email to send, which can take almost any amount of time.
Carlton Gibson: And then only then do they get the HTTP response.
Carlton Gibson: Well, that's a long time to wait.
Carlton Gibson: That's a bad user experience, right?
Carlton Gibson: The much better is to make the request, say, yes, we've accepted it, put it, we'll talk about where we put it in a moment, and just send the response quickly saying, look, it's on its way.
Carlton Gibson: Give it a few seconds to arrive.
Michael Kennedy: It's already email.
Michael Kennedy: It's already a single.
Michael Kennedy: There's nothing you can do to wait for delivery.
Carlton Gibson: Yeah, yeah, yeah.
Carlton Gibson: So all you can do, though, is send.
Carlton Gibson: So what you do now is you quickly write a task to, say, the database with the Django task framework.
Carlton Gibson: And you would send that, there'd be a worker process running totally separately, which could then send out the email, say, for instance.
Carlton Gibson: Now, people have historically done this with either Celery or RQ or Django Q or then Django Q2.
Carlton Gibson: And there are Huey, there's a billion of these task queues out there.
Carlton Gibson: And problem there is that, say, Django itself couldn't rely on them.
Carlton Gibson: And neither could any third party package rely on them.
Carlton Gibson: Well, I could, but then I'd have to commit to, we're using Django Q2 for this.
Carlton Gibson: And all the people who were using Celery or RQ or Huey, they'd be excluded.
Carlton Gibson: And so what Django Tasks does is to provide a kind of back-end API that says, look, any package can use this API to enqueue a task and to check results and do the core activities that you need to do around asynchronous tasks.
Carlton Gibson: And then just by the user, just by configuring in the settings what their back end is, can either go for Celery or RQ or it depends.
Carlton Gibson: As long as those packages have implemented a Django tasks adapter, you can use those for the back end.
Carlton Gibson: And so I think, for instance, Celery hasn't yet done it, but there's an open issue and it will just it will become.
Carlton Gibson: But there are a couple of back ends that are available.
Carlton Gibson: There's a Redis one, there's one that uses the ORM to just store in your database and you can get going with those now.
Carlton Gibson: And for me as a third-party package maintainer, that's fantastic because now I can add tasks to my third-party package and users can benefit from those without me having to know anything about which backend they're using.
Carlton Gibson: Yeah.
Michael Kennedy: Yeah.
Michael Kennedy: Your pip install or uv install instructions for your package aren't like bracket celery, bracket, whatever.
Michael Kennedy: And if none of those are there, it's going to throw an acceptance.
Michael Kennedy: Well, you didn't install any of the queuing options.
Michael Kennedy: So now we're busted, you know, like, yeah, you can just delegate.
Michael Kennedy: Yeah.
Carlton Gibson: And Cellerie's wonderful.
Carlton Gibson: It really is a truly wonderful piece of software.
Carlton Gibson: But it's literally overkill for 99% of projects.
Carlton Gibson: And it's operationally difficult to keep going.
Carlton Gibson: You end up running three or four different things.
Carlton Gibson: You need a monitor, a beat server, the actual worker.
Carlton Gibson: It's designed for a level of sophistication that most applications really don't need.
Michael Kennedy: I love that you call out the operational complexity as well.
Michael Kennedy: Because like you say, it would be nice to just let people who don't have something complicated use this feature without going, yeah, look, I know you used to, look, that was fun when you could just put it on a platform as a service thing and let it run.
Michael Kennedy: But now what we're doing is we're setting up a private network and now we've got poison messages and we've got downtime because the celery version had to change.
Michael Kennedy: Oh my gosh.
Michael Kennedy: It's a step jump, right?
Michael Kennedy: And just to be able to avoid that is great.
Carlton Gibson: No, it's a serious, serious.
Carlton Gibson: If you are taking on celery, then there is a serious question to ask.
Carlton Gibson: You know, if you're an established team, but if you're growing and suddenly it's like, shall we add celery?
Carlton Gibson: It's like, well, hang on, look at your ops capacity and look at your ability to, you know, do you have someone on call for when the workers break down at two o'clock in the morning and page notifications and all those things?
Carlton Gibson: Because it's a world up from self-hosting, you know, your bog standard Django app.
Michael Kennedy: As someone who does a lot of DevOps without a lot of support, I hear that.
Michael Kennedy: So, you know, Carl, I think this could have been like a three-hour show easily, I'm starting to realize.
Michael Kennedy: But let's sort of get some advice to kind of wrap things up.
Michael Kennedy: We're on a glide path here for people.
Michael Kennedy: Should they write async views today?
Michael Kennedy: What do you think about this?
Michael Kennedy: Yes, right.
Carlton Gibson: So if I'm writing a small application, like just my local blog application, I want to add a little bit of async sprinkle to it.
Carlton Gibson: I might just deploy a single ASGI worker by itself.
Carlton Gibson: It's probably big enough.
Carlton Gibson: You're not going to hit scaling problems, you know, with low traffic.
Carlton Gibson: So, you know, just a single ASGI application.
Carlton Gibson: I think the, as I say, the people who are doing this at a bigger level than that, I think they're running their core application as WSGI and the standard ways because the scaling patterns there are so established and known.
Carlton Gibson: and it's almost trivial by comparison.
Carlton Gibson: But then they're running a little sidecar
Carlton Gibson: to handle their app.
Carlton Gibson: So just have, you know,
Carlton Gibson: engine XA can route by the path
Carlton Gibson: or it can route by other things.
Carlton Gibson: But, you know,
Carlton Gibson: if it's got connection header,
Carlton Gibson: keep route,
Carlton Gibson: but that's a little advanced.
Carlton Gibson: Just route by path,
Carlton Gibson: put everything under an A prefix.
Carlton Gibson: And then, right,
Carlton Gibson: those are your async ones for,
Carlton Gibson: I don't know,
Carlton Gibson: your long-lib service center events requests.
Carlton Gibson: And then send everything else back
Carlton Gibson: by your whiskey.
Carlton Gibson: I mean, just do that.
Carlton Gibson: Get the hang of it.
Carlton Gibson: You'll find the scaling,
Carlton Gibson: that scales very well.
Carlton Gibson: And then you can say,
Carlton Gibson: okay, well, now if I move this to async, oh, okay, I start to see some of the complications of async appear.
Carlton Gibson: And I think that's the danger I see is when people dive feet first into async without really understanding
Carlton Gibson: that it is an order of magnitude more complicated to correctly handle async code than to just code synchronously.
Carlton Gibson: For all these reasons about blocking the event loop and you get deadlocks.
Carlton Gibson: These are really complex patterns that grow into them rather than jumping headphones.
Michael Kennedy: yeah yeah but django is ready yes no django's async story is there the problems that i see come up
Carlton Gibson: time and time and time again are problems with python and python's async story that we all share
Carlton Gibson: not django specific problems yeah or even that asynchronous programming in general yes asynchronous
Carlton Gibson: yeah they are yeah they are async or guild problems not um django specific django specific
Michael Kennedy: problems. Absolutely. I want to just put this out in the universe. If you're looking at your web app
Michael Kennedy: and you're like, ah, these are a little bit slow, these requests. So we're going to need to set up
Michael Kennedy: some parallelism so that we can handle multiple slow requests at a time. Like just take an hour
Michael Kennedy: and look at your database indexes, please. Database indexes are magic. And I'm not saying it's not a
Michael Kennedy: benefit to go async or whatever, but if slow is a problem, please just do, you know, look at the
Michael Kennedy: query plans, look and make sure every hot path is using a database index and so on.
Michael Kennedy: Yes, yes, exactly.
Carlton Gibson: I mean, and if it, so when you make a database, we always talk about the database, right?
Carlton Gibson: But if Django makes a database request, there's a little bit of CPU time to compile the request.
Carlton Gibson: And then there's the IO bit where it's talking to the database.
Carlton Gibson: And, you know, PsychoPG already releases the gil in that context.
Carlton Gibson: So you're already getting, you know, what concurrency or parallelism you would have at that point.
Carlton Gibson: And then there's CPU time to sort of marshal the return into,
Carlton Gibson: or structure the returned data into ORM objects.
Carlton Gibson: So those bits are CPU bound.
Carlton Gibson: But that core bit is already releasing the gil.
Carlton Gibson: You're already going to get parallelism there.
Carlton Gibson: So the chances are you're not going to get much more
Carlton Gibson: by jumping to Async or adding more workers.
Carlton Gibson: It was your database all along that was the thing that was taking the time.
Michael Kennedy: These things that we've been talking about,
Carlton Gibson: about CPU contention and all the rest.
Carlton Gibson: It's, ah, they come up in only specialized cases.
Carlton Gibson: They're kind of advanced topics, if that makes sense.
Carlton Gibson: They're often not the problem.
Carlton Gibson: Amazing when you need them, but it's not a panacea, yeah.
Carlton Gibson: Yeah, and we, I mean, how would I phrase it?
Carlton Gibson: We spend so much time thinking about the use cases
Carlton Gibson: for the advanced cases that we sometimes forget
Carlton Gibson: that the simpler ones are much more simple stories.
Carlton Gibson: And yeah, should I be writing async views?
Carlton Gibson: well, do it gently.
Carlton Gibson: Don't jump into it thinking it's some cure-all.
Carlton Gibson: Yeah, but Django's ready.
Carlton Gibson: That's cool.
Carlton Gibson: Yeah, yeah, yeah.
Carlton Gibson: No, absolutely.
Carlton Gibson: And that's why we made the effort to update the topic,
Carlton Gibson: because we realized we were giving users bad advice.
Carlton Gibson: Yeah, you're scaring them off.
Carlton Gibson: Yeah, no, we really were.
Carlton Gibson: We were like, oh, it's still incomplete.
Carlton Gibson: It's not ready.
Carlton Gibson: No, it's there.
Carlton Gibson: And yes, you will run into problems as you scale up,
Carlton Gibson: but that's not Django.
Carlton Gibson: That's async.
Michael Kennedy: Yeah, indeed.
Michael Kennedy: Final call to action.
Michael Kennedy: People consider Django.
Michael Kennedy: Maybe we're considering async for their existing Django projects
Michael Kennedy: or other things like the Django tasks, background tasks and so on.
Michael Kennedy: What do you tell them?
Carlton Gibson: Yeah, I mean, I would get going with Django tasks.
Carlton Gibson: You install the database backend for that,
Carlton Gibson: which is all the Redis ones work perfectly as well.
Carlton Gibson: If you've already got Redis in your stack
Carlton Gibson: and you want a little bit more,
Carlton Gibson: but most people don't need that.
Carlton Gibson: Just use the ORM database queue.
Carlton Gibson: It's a great storage.
Carlton Gibson: That's where you want to throw most of your work.
Carlton Gibson: You don't really want to be...
Carlton Gibson: With Async.io, you can, yes, throw something off to an executor.
Carlton Gibson: No, but don't do that because you've got no queue controls.
Carlton Gibson: You've got no result.
Carlton Gibson: You can't say, did it fail and then have logic to retry,
Carlton Gibson: any of those sorts of things.
Carlton Gibson: It's just running on the event loop.
Carlton Gibson: And if it crashes, well, what do you do about that?
Carlton Gibson: How do you recover from that?
Carlton Gibson: There's no elegance to that.
Carlton Gibson: So, yes, Django tasks is probably where I would point people first.
Carlton Gibson: And then do I need long-lived requests?
Carlton Gibson: Do I want to do things like service and events or WebSockets?
Carlton Gibson: Yeah, that's where.
Carlton Gibson: Or streaming, streaming responses.
Carlton Gibson: Async, great, great example.
Carlton Gibson: Yeah.
Michael Kennedy: You want to adopt Datastar or one of these frameworks that really leverages service and events.
Michael Kennedy: Yeah.
Carlton Gibson: Or HTMX version 4, which is in beta whatever now, which I think is the risk.
Michael Kennedy: Oh, is that coming with that as well?
Carlton Gibson: Yeah, yeah, yeah.
Carlton Gibson: So they basically were like, right, it's okay.
Carlton Gibson: So I think Carson was like, we're never going to do an HTMX version 3.
Carlton Gibson: and he's kept his promise because he's jumped straight from two to four um but the it
Carlton Gibson: was um it was inspired by some of the things from um data star and the surrounding projects it's
Michael Kennedy: like hang on we can have a go at that as well i think said goss you have to get him on and he can
Michael Kennedy: talk you through it yeah i i love carson i think what he's doing is great and i've had him on before
Michael Kennedy: i'm a fan of hdmx so that's cool maybe we'll do another no other round yeah so when i stepped
Carlton Gibson: down as a fellow in 23 i started a new application been building with hdmx and alpine since day one
Carlton Gibson: and just absolutely adore it.
Carlton Gibson: It's combined with template partials,
Carlton Gibson: which we added into Django,
Carlton Gibson: it's really changed the way I write web applications.
Carlton Gibson: It's amazing.
Carlton Gibson: All for the better as well.
Michael Kennedy: It's like JavaScript magic fairy dust.
Michael Kennedy: Yeah, it's how it should be.
Michael Kennedy: Yeah, exactly.
Michael Kennedy: Sprinkle it on there.
Michael Kennedy: It doesn't have to be a spa.
Michael Kennedy: Everyone calm down.
Michael Kennedy: We could still do some stuff on templates and so on.
Carlton Gibson: But when I learned JavaScript, that was how it was.
Carlton Gibson: You detach a few event listeners
Carlton Gibson: and just do your little thing.
Michael Kennedy: And that was enough, right?
Michael Kennedy: hashtag dollar document ready.
Michael Kennedy: Let's go.
Michael Kennedy: A little jQuery back in the day, right?
Michael Kennedy: Yeah.
Michael Kennedy: That's how it was.
Michael Kennedy: Yeah, yeah.
Michael Kennedy: Cool.
Michael Kennedy: Select something, do something.
Michael Kennedy: Exactly.
Michael Kennedy: Carlton, thanks for first all the stuff on Django for everybody
Michael Kennedy: and second, coming on the show to share.
Carlton Gibson: No, thanks.
Carlton Gibson: Thanks for the chat.
Carlton Gibson: It's been really good.
Michael Kennedy: It's really lovely because you pick on the topics
Carlton Gibson: and I'm like, yeah, yeah, this is right.
Michael Kennedy: Thanks.
Michael Kennedy: See you later.
Michael Kennedy: Thank you, Michael.
Michael Kennedy: This has been another episode of Talk Python To Me.
Michael Kennedy: Thank you to our sponsors.
Michael Kennedy: Be sure to check out what they're offering.
Michael Kennedy: It really helps support the show.
Michael Kennedy: Take some stress out of your life.
Michael Kennedy: Get notified immediately about errors and performance issues
Michael Kennedy: in your web or mobile applications with Sentry.
Michael Kennedy: Just visit talkpython.fm/sentry and get started for free.
Michael Kennedy: Be sure to use our code, talkpython26.
Michael Kennedy: That's Talk Python, the numbers two, six, all one word.
Michael Kennedy: If you or your team needs to learn Python,
Michael Kennedy: we have over 270 hours of beginner and advanced courses
Michael Kennedy: on topics ranging from complete beginners to async code, Flask, Django, HTMX, and even LLMs.
Michael Kennedy: Best of all, there's no subscription in sight.
Michael Kennedy: Browse the catalog at talkpython.fm.
Michael Kennedy: And if you're not already subscribed to the show on your favorite podcast player,
Michael Kennedy: what are you waiting for?
Michael Kennedy: Just search for Python in your podcast player.
Michael Kennedy: We should be right at the top.
Michael Kennedy: If you enjoy that geeky rap song, you can download the full track.
Michael Kennedy: The link is actually in your podcast blur show notes.
Michael Kennedy: This is your host, Michael Kennedy.
Michael Kennedy: Thank you so much for listening.
Michael Kennedy: I really appreciate it.
Michael Kennedy: I'll see you next time.
We tapped into that modern vibe over Kingy Storm.
Talk Python To Me.
I-Sync is the norm.
.