Brought to you by Michael - take a Talk Python course and support the show

#488: tau - it's 2pi and it writes code

Published Tue, Jul 14, 2026, recorded Tue, Jul 14, 2026
0:00
00:32:15
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Calvin #1: The trusted-publishing debate: how to do it right vs. why you shouldn't trust it

https://snarky.ca/how-to-publish-to-pypi-using-github-actions-securely/ (Brett Cannon) and https://blog.yossarian.net/2026/07/07/You-shouldnt-trust-trusted-publishing (William Woodruff)

  • Trusted Publishing (PyPI's OIDC-based auth scheme, also now used by npm, RubyGems, crates.io, NuGet) replaces long-lived API tokens with short-lived, auto-scoped credentials tied to CI/CD machine identity.
  • Yossarian's post: it's purely an authentication mechanism between a machine identity and a package — it says nothing about package safety or quality. PyPI deliberately avoids any "verified/trusted" badge for it, unlike its verified-URL checkmarks.
  • Same logic applies to PyPI attestations: anyone can sign with any machine identity they control, so an attestation's presence isn't itself a trust signal.
  • Bottom line from that post: don't confuse "trusted" (machine-to-machine) with "trustworthy" (human judgment about the package).
  • Snarky.ca's companion piece is more practical: given GitHub Actions compromises in the news, the real fix is 3 concrete steps — run zizmor to lock down workflow permissions/checkout credentials and pin actions to commit hashes, adopt Trusted Publishing to eliminate stored PyPI tokens, and require manual approval via a GitHub environment before any publish job runs.
  • Takeaway for listeners: Trusted Publishing is good hygiene for how you authenticate to PyPI, but it's not a substitute for securing your CI pipeline itself — or for actually vetting the packages you install.

Michael #2: JupyterLab 4.6 and Notebook 7.6 are out!

Michał Krassowski's rundown - a chunky minor release: 68 features, 97 bug fixes, 95 contributors, one of the biggest ever.

  • Scratchpad console (Notebook 7.6 headliner) - a console next to your notebook sharing its kernel, for throwaway experiments. Ctrl+B.
  • Jump to last-edited cell - new commands hop through recently edited cells.
  • File browser glow-up - Date Created column, editable breadcrumbs with Tab-completion, and Open in Terminal.
  • Debugger - sources open in the main area, floating step/continue overlay, live kernel-sources filter.
  • Custom layouts (Lab) - activity bar top/bottom, draggable panels, four-way tab splits, per-panel Ctrl+scroll zoom.
  • ~5x faster extension builds - webpack → Rspack, and jupyter-builder means no full Lab install needed to build extensions.
  • Keyboard/a11y - add shortcuts from the UI (no JSON), Find & Replace in Edit menu (Ctrl+H).

Calvin #3: Tau – new small, readable terminal coding agent

  • Tau – new small, readable terminal coding agent (Python 3.12+), built as both a working tool and a teaching project for how coding agents work under the hood
  • Install via uv tool install tau-ai, pipx, or pip; ships a tau CLI
  • Three-layer architecture: tau_ai (provider-neutral model layer) → tau_agent (reusable "brain": messages, tools, events, loop) → tau_coding (CLI/TUI, file & shell tools, sessions)
  • Supports OpenAI, Anthropic, OpenAI Codex, OpenRouter, Hugging Face, and custom/local OpenAI-compatible endpoints
  • Built-in tools (read/write/edit/bash), durable JSONL sessions with resume/branching, project instructions via AGENTS.md, and context compaction
  • Core harness is UI-agnostic — same brain can power the TUI, print mode, or a custom frontend — usable as a standalone library too

Michael #4: Django Tasks and Django 6.1

  • Django 6.0 finally ships first-party background tasks (django.tasks) - out of Jake Howard's DEP 14, accepted May 2024, after two decades of everyone bolting on Celery/RQ/Huey.
  • It's an API, not a worker. Django handles task definition, validation, queuing, and result storage - it does not execute them. You bring the backend.
  • The default backend traps people. ImmediateBackend runs tasks inline on the request thread and blocks until done - so out of the box .enqueue() backgrounds nothing (a 5-second task means a 5-second response). The other built-in, DummyBackend, runs nothing at all. Both are dev/test only.
  • Nice API otherwise: slap @task on a function, call .enqueue(), get back a TaskResult you look up later by id - with async twins like aenqueue(). Gotcha: args and return values must survive a JSON round-trip, so a tuple sneakily comes back as a list.
  • The community local backend to know: django-tasks-local by Chris Beaven (SmileyChris). A ThreadPoolExecutor backend that gives real background threads with zero infrastructure - no Redis, no Celery, no database - plus a ProcessPoolBackend for CPU-bound work → github.com/lincolnloop/django-tasks-local
  • Its catch: results live in memory, so pending tasks vanish on restart or deploy. Great for dev and low-traffic production; for persistence, drop to Jake Howard's django-tasks (DatabaseBackend + worker command).

Extras

Calvin:

Michael:

Jokes:

  • What's the object-oriented way to become wealthy? Inheritance
  • To understand what recursion is... You must first understand what recursion is
  • 3 SQL statements walk into a NoSQL bar. Soon, they walk out They couldn't find a table.

Episode Transcript

Collapse transcript

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 488, and it is Tuesday, July 14, 2026. I'm Michael Kennedy.

00:13 And I'm Calvin Hendryx-Parker. Happy Bastille Day.

00:15 Yes, indeed. Happy Bastille Day to you. And this episode is brought to you by us, so check out our things. Courses over at Talk Python. I have many in the works, competing for what comes next, maybe Rust.

00:28 I think a Rust course is going to be next out the gate.

00:30 So we'll talk more about that at some point soon.

00:33 If you have a project and you would like some expert help for the really hard projects, reach out to Six Feet Up.

00:40 You can subscribe to our newsletter.

00:42 Got some nice announcements there.

00:44 Follow us on all the socials and watch us live or the replays on YouTube.

00:50 Every episode has a little YouTube thumbnail.

00:53 If you click it, guess what you get?

00:54 YouTube, YouTube version.

00:56 So we appreciate the people who are part of the live show, but definitely not required.

00:59 And with that, Calvin, I would say, I want to talk about the Eno Such blog.

01:06 Yes, who do you trust?

01:08 It's interesting.

01:08 This is actually a pair of blog posts that both came out last week on the 7th.

01:14 One from William Woodruff, that's this blog right here.

01:17 And the other one's actually from Brett Cannon, which I'll show here in a second.

01:20 But they're both around trusted publishing and who you should trust.

01:25 What I think is important to understand, and I think what they both emphasize in their posts, is that trusted publishing is not for you. It is for the machines. So if you're not familiar

01:34 with trusted publishing, it is PyPI's OIDC-based auth scheme. So you can now, it's used by other groups too, NPM, RubyGems, Crates, and Nougat. They basically want to replace long-lived API

01:48 tokens with short-lived auto-scoped credentials tied to the CI/CD machine identity. So this may sound really great and like you could trust everything coming out of these tools, but really

01:59 what it's about is making sure places the software is coming from and going to is trusted. And you can actually see that in this post, William goes into why you shouldn't trust trusted publishing

02:12 alone. And then the other post is actually from Brett Cannon, but that was actually quite interesting, which is how to publish to PyPI using GitHub Actions securely. And he actually

02:23 mentions Zizmor, how do you pronounce that? Is that the right pronunciation of the tool?

02:28 So William wrote the tool mentioned in here, and he also mentioned in his own post.

02:34 All right, the security episode I just did with the Python security folks, Mike Fiedler and Seth and Juanita, they called it Zizmor, I believe?

02:45 We'll go Zizmor. We'll go Zizmor then.

02:46 I believe.

02:48 Mike would know, and Mike will correct me momentarily.

02:51 I'm sure.

02:51 But you've got to trust me.

02:53 I mean, speaking about trust, you've got to trust that I'm remembering this correctly.

02:56 Right, they're remembering correctly.

02:57 But this is a tool that will help you clear, make the CI/CD actions happy.

03:03 So once you make Zizmor happy, it's going to reduce scopes of tokens and double check for things like the old API tokens being in existence and what their scopes may be.

03:16 It'll also make sure that when you do a checkout in GitHub Actions, the credentials that are used for that checkout act as you.

03:23 And then you can make sure that things like those remain short-lived.

03:27 And so that those don't persist throughout the rest of that run.

03:30 Keeping the building of your package or your software separate from the publishing of your package and the software.

03:38 So keeping those kinds of concerns separate from one another helps you make sure that these kinds of attestations can be made and have some level of assurances that you're doing the right things, that things are going to the right places,

03:52 that no one's exploiting something they shouldn't be. So it's a little bit of like least privilege wrapped around the ability to establish trust between the machines that are building and the machine that would be publishing it. If you want to see an example of this,

04:07 You can look at the Zismore package.

04:10 You'll see this is a Williams package that does the kind of work you need to make sure that you're doing the right practices.

04:16 You'll see this verified details over here on PyPI.

04:19 Again, this does not mean that this package is of a known quality, or you should definitely include it as a dependency into your system.

04:26 It just means that these are verified and have come from trusted sources, that the person who is listed here as maintainer has some level of control or has exercised some proof of ownership over these pieces,

04:40 you'll also notice in PyPI that there are unverified details like the homepage and documentation in this specific case.

04:45 So you can look for those as levels of quality that you want to check into when you want to look into including a package like this.

04:54 But don't confuse trusted with trustworthy.

04:59 Make sure you have human judgment in the loop about the package you're getting ready to bring in to your potential project.

05:06 This is no substitute also for securing your own CI pipeline or actually vetting the packages that you install.

05:13 So stay diligent out there, but this is another great way to keep things tidy, secure, exercise some least privilege.

05:20 If something does happen, it can help contain the blast radius.

05:23 If something were to sneak into your CI pipeline and try and exploit something that it shouldn't, hopefully you've narrowed down the scopes for the OIDC tokens so that they couldn't do those actions.

05:33 Sounds good to me.

05:34 Yeah.

05:35 William Woodruff is, by the way, from the Astral team.

05:38 Yes.

05:39 And uv and all that.

05:41 So they've thought a little bit about this.

05:43 Yeah.

05:43 So, I mean, table stakes, just use this tool no matter what.

05:48 It's going to give you at least some level of clarity around your current state of operations for the CI/CD pipeline.

05:54 Yeah.

05:54 I asked at the end of the Talk Python episode was about there's a whole security track at PyCon.

06:01 I said, let's go through that, all the talks there and kind of like talk about the arc that that's telling about Python security, right?

06:06 Yeah.

06:06 And at the end, I said, what is one thing people can do to be better at Python security?

06:11 I think two out of three people said Sismar.

06:14 Yeah.

06:14 Just use it.

06:15 Yep.

06:15 And Brett Cannon's post here is a really just a straight walkthrough of the three or four things you should just be doing out of the box by default.

06:25 So follow his instructions.

06:26 He knows a lot of this stuff, you know, better than we all do.

06:29 I trust Brett and Brett will make sure you get trusted publishing in place, but don't just trust it blindly.

06:35 Okay.

06:35 Amazing.

06:36 Michael, what you got?

06:37 I want to talk about what I thought would be just a small little extra at the end.

06:42 Oh, hey everyone.

06:43 New release, point release, Jupyter Notebooks and JupyterLab.

06:47 Nope.

06:47 Nope.

06:47 It is a lot.

06:49 And let me just jump to the end here and I don't need to see a pop up.

06:52 That's fine.

06:53 It says, as large as minor releases get, basically.

06:58 So Jupyter Lab.

07:00 Pumped right up against the ceiling.

07:02 Exactly.

07:02 They're like, we almost called it a new release, but we didn't want to update the docs dropdown.

07:08 So it says this Jupyter Lab release includes 68 new features, 97 bug fixes, 38 documentation improvements, 95 contributors, and 171 maintenance tasks.

07:19 Very minor.

07:21 I would just call this, like, you know, consider it a pretty big release, let's say.

07:25 So there's a couple of things.

07:26 And I think probably the most efficient way is to just pull up this little diagram that they've annotated of Jupyter's JupyterLab.

07:34 By the way, you can test this out online.

07:36 And there's a test it in JupyterLite.

07:40 Are you familiar with JupyterLite?

07:41 No.

07:42 So if we go to JupyterLite, available in JupyterLite.

07:46 Let me click that and just see what happens.

07:48 I'm glad that that opened a new window.

07:50 So JupyterLite is basically a WASM WebAssembly powered Jupyter and uses local storage and stuff for it.

07:57 So like I'm pulling up here and there you have it.

08:00 Like full on JupyterLab, but running JupyterLite.

08:03 Like in a browser, right?

08:04 In the browser.

08:05 That is pretty sweet.

08:06 Yeah, yeah, yeah.

08:07 Like full client side, nothing but just a download there.

08:09 Well, I think that's a smart move.

08:11 Yeah, yeah.

08:12 So you can test this out.

08:13 Bring your Jupyter notebook to your data wherever it lives.

08:17 Exactly.

08:18 It's all powered by Pyodide.

08:19 So you can test these changes out there.

08:21 But let me pull up the little diagram.

08:22 And it says you have a new activity bar options, like files or extensions or whatever.

08:28 There's a breadcrumb.

08:29 So like on the left in JupyterLab, you've got a file browser.

08:33 So you can open Python or IPYNB files.

08:38 And now there's a breadcrumb that you can edit.

08:41 macOS should take this to heart, please, someday, maybe, that you can just type up there.

08:48 And it'll say, you're in this directory.

08:49 and you put your cursor there, and guess what you can do?

08:51 You can go to a subdirectory or another folder.

08:55 Very cool, so that's there.

08:57 I guess it was missing that it didn't show the creation date.

08:59 It only showed modified in Files before, so now you can figure out the creation dates.

09:03 You can move the sections in that whole left panel, and I guess the right one around as well.

09:09 You can take stuff out of the sidebar, like widgets out of the sidebar.

09:12 That's kind of cool, and make them more top level, so you can create a feeling that you might like this.

09:17 Calvin, you can create this like custom layout here.

09:21 Yeah, I do like my tiles.

09:22 Yeah, it's got a kind of a VS Code like dropdown when you hit play for the debugger.

09:28 So that kind of drops in right in the middle.

09:29 So it's easy to understand your debugging and chase that around.

09:33 You can add hotkeys from the editor.

09:36 It has a cell number count in the debugger.

09:39 You can like filter out your different sources and interact with the kernel.

09:43 And you can go forwards and backwards in history of your edits.

09:47 So one of the things that's kind of chaotic, you know, chaotic good, I guess, of character of Jupyter is that you can edit and execute things in different orders.

09:57 Yeah.

09:58 It's mind bendy and will mess most new people up for sure.

10:02 Yes, exactly.

10:03 It's like, oh, go to is bad, but maybe you could just manually go to at whim.

10:07 Anyway, one of the features is you can jump forwards and backwards in terms of last edits.

10:13 So maybe you edited cell seven and then cell 22 and then 20.

10:18 So you can jump around in that through like some UI.

10:21 So it's like a history order of like where you've been.

10:23 Yeah, it's like a back forward button.

10:25 Now if I could just have something similar in Slack to know where the heck I've been in Slack.

10:29 That's fair.

10:30 That's totally fair.

10:31 Let me just flip through, see what else there is.

10:33 There's a bunch of other things.

10:34 Like there's only some of them, right?

10:35 That's just the stuff they had annotated.

10:37 The terminal is a little more, how shall we say, coding agent friendly.

10:41 So you can open stuff in the terminal.

10:44 Oh, we should get nerd fonts.

10:46 I don't know if you can put nerd fonts in there or not.

10:48 But there's a way they say it.

10:51 That's not it.

10:52 Yeah.

10:53 So the terminal no longer traps keyboard focus, which is interesting.

10:57 And here we go.

10:58 This is the one.

10:59 Pressing shift enter in the terminal now inserts a new line without executing the current line.

11:04 This matches the behavior expected by certain terminal applications.

11:09 I wonder which ones those are.

11:11 It's a...

11:12 Pi, Claude Code, et cetera, et cetera, right?

11:15 The annoying thing is that some of the web UI versions of those tools uses like command enter or control enter or shift enter instead of a standard shift enter.

11:27 I had to fix that for some folks around here who wanted the consistency between OpenAI and Anthropic tooling.

11:33 That's fair.

11:34 Yeah.

11:35 So I think I'm going to leave it there.

11:36 There's a bunch more features, as you can see, and I kind of called out and so on.

11:40 But yeah, it's if you notebook and especially if you do stuff with Jupyter, a lot of changes there.

11:45 People can.

11:46 I mean, it looks like they got a ton of new features, like a lot of like creature comforts.

11:50 That's pretty exciting for folks who are living day in and day out in the Jupyter notebook, Jupyter server world.

11:55 But let's talk about another AI agent that got released very, very recently.

12:01 This is probably within the last two weeks.

12:03 The fine folks at Hugging Face have released Tau, which is two times pi.

12:09 and it is a agent built mimicking a lot of pies.

12:15 I think they were inspired by the fact that how minimalistic pie was, but they wanted pie to do some other things.

12:22 And most of it being written in Python, watching it and teach you how it is working under the cover.

12:29 So part of the goals with this coding agent is actually to have small readable layers, have it output back to you what it is working on, what it's doing.

12:39 A lot of that gets kind of, if you've ever used Claude Code or even Pi, you'll see a lot of thinking dot, dot, dot, or, you know, conjugulating, whatever the verb of the randomizer put in there for you.

12:51 But it kind of hides what's going on under the covers.

12:54 But here, this is actually the opposite.

12:56 They're trying to know hidden machinery.

12:57 Every moving part is put on the page.

13:00 I think it's kind of, it's pretty, I tried it out yesterday.

13:03 The models become streams.

13:04 you basically want to build an agent loop. So tau, it's going to be hard not to say pi, tau is made up of three pieces, the tau AI, the tau agent, and the tau coding. And any of these

13:17 pieces are able to be swapped out. So the idea is you could make your own front ends for the tau coding part of this, build your own TUI, CLI, shell scripts, tools, et cetera, that are on the front

13:30 of that. What's nice is every part is visible. If you've used one of the things I liked about Claude Cowork is it on the sidebar inside of Claude Cowork, it shows you like the to-do list it's

13:40 putting together for the actions it's going to take. It shows you which skills have been picked up and used, which connectors got pulled into the context window. This one goes a step further and shows you what tools are currently active in the current window. If there's anything else

13:55 interesting down through here. One thing I wanted, I'll just, let me just show it. I've got it running over here. I will unshare this bit here and I'll put my terminal in here. This will be

14:07 obviously live real-time potential danger, but it's kind of pretty. I'm here for it. I'm here for it.

14:13 I saw many people say, oh, you should never do demos. I'm like, you know what? No, that makes it real. Let's do it. Yeah. Seeing on the left-hand bar here, you've got details about the session,

14:22 what provider you're currently running, what level of thinking, number of tools, number of skills.

14:27 I think this is important because a lot of this gets hidden under the covers when you're using Claude Code. Unless you go and investigate and kind of ask it specifically what it's using in its current context window, I like having this available because then you could see something get out of

14:40 hand. If there's all of a sudden brought in 20 tools and the context window is exploding and you're not sure why you're getting back poor results, this would surface that sooner for you.

14:51 You can see what skills are currently loaded.

14:52 Actually, that skill I wrote as part of this session.

14:55 So I came in and I said, let's build a memory system for my AI agents.

15:02 And so the memory system, then I kind of asked it for an explanation about what a memory system would be.

15:08 And you can see it.

15:09 It's really more like reading a textbook than it is having it code up the just the code for you.

15:15 So it really gives you full examples.

15:17 I'm getting a little bit of notebook vibes.

15:20 actually it's got a little bit of like a storytelling UI. That's the goal is for it to tell

15:25 you as it goes teach you even here it doesn't need to output all this to do its work it's outputting all this to help you understand and that was me asking it about dictionaries but then I went in

15:37 and was like okay from the dictionary let's let's start a new here it is the memory piece right here we've got the idea of semantic memory episodic memory and procedural memory and so it explains

15:47 each of those terms to you, what the goals are, you know, what the memory retrieval loop would be.

15:53 And this was just the explanation. At some point, then I said, okay, great. Build me a simple memory system that understands episodic, semantic, and procedural memory. So then it goes into planning.

16:04 It looks at what's already inside the system, created the whole first couple of modules, created some documentation, and then it shows me how to run it. At some point, I'm like, oh, updateagents.md to make sure we're always using uv. So if you want to check out Tau,

16:18 you can uv install, tool install tau-ai, and that will get you the Tau CLI ready for you to use.

16:27 It is, again, very early days. It is only a couple weeks old, but I'm a learner at heart, so I love the idea of having this explained to me so that I understand what's going on. I can make

16:39 better decisions about the code and I can have fun playing at the same time. So this actually built the skill, installed the skill into the system, and now is using its own skill for memory. So again,

16:49 that essence of Pi where you build your extensions, you make your coding environment the way you want it to be. That's what they're trying to take, but also with more of the explainer going on behind

16:58 the scenes too. So pretty cool. It actually reminds me a little bit of Hermes, which I talked about last week in the sense that it's kind of self-improving and you can sort of change around the pieces honestly this inspires me a little bit more than Claude Code the terminal version well and

17:13 that's the piece i didn't do yet is like in the docs and talk about it is take this to the next level by establishing what your harness looks like and then you create a loop you add the looping part to it to schedule and do work so i was one step away from i've got memory now i can now create the

17:27 loop and have it set it loose on tasks yeah very neat very cool i see you got yeah you've got gpt 5.5 yeah have you tried 5.6 soul or any of these i have not yet no i haven't had a chance to um i i did

17:42 the most basic of basic thing i said slash login open ai and that's what it gave me like let's go

17:48 perfect well it definitely definitely looks really cool yeah so thanks to the fine folks over hugging

17:53 face they're doing still doing great work over there year after year love it yeah also i was

17:58 gonna say like you said it has a kind of like just getting started vibes and so on and i would be a little bit, not concerned, but just hesitant to go all in on something that's like a side project of someone's, but hugging face.

18:12 Yeah, and it's already got like 1500 GitHub stars.

18:17 I think I like it.

18:18 It's beautiful.

18:18 It does look nice.

18:19 It shows me all the information I want to see.

18:21 That's important.

18:22 I'm about the experience of my workstation.

18:25 So this definitely falls into that.

18:27 Yeah, and I think the other thing is I really like how it shows you and what it's doing and how it's thinking because it's so easy to just make these things become an easy button, turn your brain off and go.

18:36 But on the other side, it can be an incredible learning thing.

18:39 You're like, what?

18:40 Okay, I don't make, that is actually new to me.

18:43 Tell me what that does.

18:43 Why are you doing this?

18:44 You know what I mean?

18:45 If you don't know what's happening, how do you know to ask that?

18:48 Well, it's funny because I asked about memories.

18:50 And so it actually looked into its memories and obviously says user prefers uv.

18:54 And then I love to execute Python from uv and I created a simple memory system.

18:59 So it's already using its own memory system they built.

19:01 with two prompts. That's awesome. Yeah. Super cool. Very cool. All right. If you're going to have a

19:07 some kind of agent, you probably want to run it in the background. So let's talk about Django.

19:13 I just had a really cool episode with Carlton Gibson over on Talk Python about, he basically rewrote Django's async documentation saying it's gotten really out. It was really out of date and it had a lot of warnings like, oh, you shouldn't do this or this won't perform that well. And they're

19:28 actually like, you know what? That's not true. The stuff is really good now. You should probably use async in Django, but our docs tell people they should be weary. So let me rewrite that. And part of that conversation, we talked about Django's new task framework, which is part of version 6,

19:43 6.0. So, so often you have got to think like, all right, well, I'm working on some requests and maybe it's slow. So I could use async and await on it potentially, but a better way often is like people don't actually even need the response.

19:57 They don't need to wait on this.

19:58 Like I'm going to send you a reset email.

20:01 Email already is oddly asynchronous and non-verifiable.

20:04 So what are you going to, you're going to send an email and like what, wait for a pixel to open before you respond?

20:09 Like you can't do that, right?

20:10 You just got to just send it and let it go.

20:12 And so a lot of times people would do something like Celery or RabbitMQ or some other mechanism to run.

20:18 Which is heavy, yeah, very heavy.

20:19 Yeah, exactly.

20:20 It's like you've gone from running like a single worker and a platform as a service to Now you've got a DevOps and a virtual private network for your servers to live in.

20:29 It's like a huge jump, right?

20:31 So this task framework kind of attempts to solve that in a framework-y way.

20:36 What you can do is it's not exactly a task execution story.

20:41 It's more of a way to like, I guess, like an adapter or a facade type of design pattern that says, here's how you program tasks in Django.

20:49 the task backend that you stick in it means maybe it still goes to Celery or maybe it runs in a background thread.

20:55 I don't know.

20:56 We'll figure that out.

20:57 You configure the thing in different ways.

20:59 All right.

20:59 So basically that's how it works.

21:01 You set up your tasks.

21:02 You define the backend.

21:04 There's only one that comes with it and it's oddly unsatisfying to me.

21:07 It's the immediate execution backend, which means like when you enqueue a task, it just blocks and executes.

21:13 It goes, okay, it's enqueued when it's done.

21:15 And really that's just for execution as a developer so you don't have to set up anything.

21:21 I'll tell you what I wish was actually in there for development and for like 75% of all deployments.

21:27 There's also the dummy backend.

21:29 They missed a chance at like the null backend, like the null pattern.

21:34 Like here's the thing you don't have to check for null or see if it's configured, but it just does nothing, right?

21:38 So this is for like testing.

21:40 So you can enqueue things and so on and like, you know what?

21:42 No, nothing happened.

21:44 Basically like a built-in way to say turn off tasks, which is, I would imagine, really just for testing.

21:51 Anyway, so there's third-party backends, and there's an ecosystem here.

21:55 It also has async support.

21:56 Yeah, that's what I was going to say.

21:58 Yeah, that's pretty neat.

21:59 So a lot of cool stuff here.

22:02 You can just put the at task decorator on a function, and it's now a task and so on.

22:07 This is so nice compared to what it used to be.

22:08 So Django has had this level of ability, like with Django channels and async and workers, backend workers, but the usability of it as a developer was always tricky.

22:20 Like it wasn't very well published.

22:22 It wasn't, it was hard to use.

22:23 You had to do a little bit of, we did this back in 2020 when we first launched the Loudswarm platform.

22:29 We had to use background async workers like that to establish connections, WebSocket connections to things like Discord.

22:35 And it was some gymnastics to make it work.

22:38 This looks so much nicer.

22:40 So thank you all to whoever put in the effort to make this usability and the API, the usability as a developer for this to be so nice.

22:49 Yeah, it looks really, really nice.

22:50 And then the community stuff is good.

22:53 Yeah, Loudsworn being your online conference stuff that you launched at a very timely time of 2020.

23:01 Definitely.

23:02 So for 75% of the people, I would recommend, I would point them at this project by Lincoln Loop called Django Tasks Local.

23:11 And the idea here is it uses either threading or processing backends.

23:17 No Celery, no Redis, no database, no configuration necessary, right?

23:23 So this is really cool.

23:23 You basically just plug this in, and then when you run it, it just runs in a background thread.

23:28 And so it really does immediately return, and it really does do these things.

23:31 The one thing that you've really given up here, I guess, depending on what you choose in Threadpool, until you do free-threaded Python, you're still subject to the guild.

23:40 But most of these background tasks are not heavily computational.

23:44 They're talking to a database.

23:46 They're talking to a SMTP.

23:47 There's some kind of weight.

23:49 Yeah, it's not a lot of CPU.

23:50 It's mostly probably IO weight, or you just need to be unbounded and get a quick response back to your end users.

23:57 Or you have startup tasks.

23:59 That was the thing we needed it for.

24:01 We needed something to happen at Django startup.

24:03 Oh, interesting.

24:03 Okay.

24:04 So you just fire that off.

24:05 Yes, you could choose process backend if you really want like true separation.

24:08 The one thing that you're giving up here is durability, right?

24:11 Like if you deploy a new version and the task thing is grinding through some tasks and Docker says, time for a new one, goodbye.

24:20 Yeah, well, you go into it knowing that I's wide open and you account for, I'm okay if it dies, but I know how to handle recovery.

24:27 Yeah, sure.

24:28 And how most projects, how much back end traffic do they really have?

24:33 Right.

24:34 They're sending an email because you said reset my email or something.

24:36 But yeah, most most sites are, you know, a thousand people at your company use this internal thing.

24:41 And that would be a big deal, you know, or something like that.

24:44 Right.

24:45 It's not it's not Netflix scale or.

24:47 No.

24:48 But when you need celery, you know, you need celery.

24:50 And then you can get into more durable cues and retry patterns and those kinds of things.

24:55 Right.

24:55 Or temporal or something like that.

24:56 Yeah.

24:57 Absolutely.

24:57 Yep.

24:58 That's awesome.

24:59 Yeah, cool.

25:00 So check out Django Task and Django Task Local.

25:03 All right, Calvin.

25:04 I got one extra for you.

25:07 The current release manager for Python 3.14, they've always been looking for fun little puns to do on the fact that this is the Py release of Python.

25:19 But actually, it ended up becoming a fix in the dictionary.

25:22 And Michael, it's not the dictionary you're thinking of.

25:25 It is actually the Oxford Dictionary.

25:28 They found a bug in the dictionary in its own citation usage of pi symbol from 1706.

25:37 So they have upstreamed the fix.

25:39 It's got approved and published.

25:41 And so because of the messings around and playing with pi and the latest release of Python, we got stumbled upon an actual markup bug in their own dictionary and got it published.

25:54 So thanks to Hugo for doing that for us.

25:57 It is not the dict.

25:58 It is the actual dictionary.

26:00 Oh, okay.

26:01 I didn't see that coming.

26:02 Yeah.

26:03 Oxford English Dictionary.

26:04 Not quite a joke, but almost.

26:06 Almost.

26:07 Very cool.

26:07 Very fun, though, to think that the Python community has gotten a fix upstreamed into the Oxford English Dictionary.

26:14 Well, I sure hope they use Oxford commas when they...

26:19 You're inciting some flames, Michael.

26:21 Exactly.

26:22 Like, rejected, improper use of comma.

26:24 So I want to talk about for my one extra.

26:27 Yeah, I think that's the only thing.

26:28 I have other stuff, but I'm going to leave it with this.

26:30 So I'm a big fan of Bunny.net.

26:32 I mean, Cloudflare is all the rage, right?

26:34 I've never used this.

26:36 Bunny.net is awesome.

26:37 The pricing is great.

26:38 It's so easy to use.

26:39 I use it for CDN.

26:40 So, for example, when you get a download of Python Bytes, like the weekly episode, that comes through the CDN for, if I can pull it up, comes through the CDN of Bunny.net.

26:52 But primarily, the reason I chose it, Ian Maurer recommended this to me, is because I want to use it for the courses.

26:58 So for the course videos, one of the things that's a hassle is you can use CDNs a lot.

27:03 There's a bunch of options there, but it's not very common that you can share private files through CDNs, which you can with bunny.net.

27:12 So that's super cool, right?

27:13 So for kind of like an S3 URL, you can sign it temporarily.

27:17 Like this URL is good with this special link for 20 minutes.

27:21 Play it.

27:22 Something like that, right?

27:23 Yeah.

27:23 And so you can do that here, which is really, really great.

27:26 So that's kind of how it just pays you go, which is cool.

27:29 That's not what I want to talk about, though, but that's why I was interested.

27:32 They announced that this is another thing I use is BunnyDNS.

27:36 I probably should have pulled up my DNS dashboard because I've got some ridiculous DNS, ridiculously complicated DNS stuff that would have been fun to show.

27:44 But I'm not logged in on this machine.

27:45 It would take too long.

27:46 So bunny DNS, all you do to use it is you go to your fork bun or hover or name cheap or whatever you're using and you go to your domain and you just change two things.

27:57 You just change what your, gosh, what's it called?

28:00 Name servers.

28:01 You just change your name server.

28:02 There's two.

28:03 Usually you got to enter for redundancy.

28:05 Yeah.

28:06 And then that's it.

28:07 And so then you're basically running your DS through this really nice DNS management console instead of whatever crappy thing that like GoDaddy gives you.

28:16 Like, why is this so hard?

28:18 So you just like make one change.

28:19 You don't change your provider.

28:20 You don't move your domains.

28:21 You just flip the name server and you're over here.

28:23 And this has really cool things like, I would like this key or this domain or this TXT, whatever, right?

28:30 Whatever you manage in DNS.

28:31 Like I want this valid for 15 seconds because I'm testing right now or things like that.

28:36 So it's really cool.

28:37 That's packed into their API platform.

28:38 That's pretty cool.

28:39 Yeah, yeah.

28:40 So, I mean, you can put it for an hour or a day or whatever for the time to live.

28:43 But if you're working, like while you're setting stuff up, That is so painful because if you leave it in a half an hour or an hour, then you change something.

28:49 You're like, oh no, I set it up wrong.

28:52 Well, I'm going to go to lunch.

28:53 We'll try it again.

28:54 Hope I get it right next time.

28:55 But if you put it on five, 15 seconds or whatever, it's just like, try it again, try it again, try it again.

29:00 And it's really, really sweet.

29:02 Gives you a bunch of cool graphs and stats and analytics.

29:05 So all this is free.

29:06 So play with it.

29:07 It's cool.

29:07 I'm a fan of bunny.net.

29:08 Very cool.

29:09 Do you know if they have a Terraform or a Tofu provider?

29:12 Fine question.

29:13 I have no idea.

29:15 For next time.

29:15 I do know that they do a Google Fonts alternative.

29:21 Oh, that's nice too, yeah.

29:23 And what's really nice about this is it's, I believe they're a European company, and this is like a privacy first Google Fonts.

29:29 No tracking, yeah.

29:30 Exactly, no tracking.

29:31 And it also means if the only reason you had one of those terrible, you didn't think about the consequences when you made this law, did you?

29:38 Cookie banners, because you used Google Fonts, you can switch to this, and then you don't have to have a cookie banner, which is great.

29:45 I like that.

29:45 i like that a lot if if it was google fonts the only reason right there's obviously yeah other

29:50 other ones so anyway check it out it's free i'm a fan you got any jokes for us michael i do have

29:56 some jokes now these jokes they cracked me up are you peaked oh okay i think i think they're gonna be fun so a lot of times we just have um pictures or some kind of cartoon or something these

30:10 are just i hesitate to call them dad jokes i was gonna say they're good old i think they're good old school dad jokes yeah so i got three i picked three maybe we'll come back with some more but

30:19 you know so here we go are you ready calvin i'm ready hit me what's the object oriented way to become wealthy inheritance i mean oop is not as popular as it used to be especially in the python

30:33 world but i'm definitely a designated laugher for dad jokes i i can't help myself i know i'm

30:38 My daughter and I found like a 200 dad jokes page once and just sat there all day and ran it.

30:44 It was great.

30:46 I mean, think of how rich Java and.NET people are.

30:49 Tons of inheritance.

30:50 Tons.

30:51 I mean, so much more.

30:52 It's so corporate.

30:53 It's just money flows through that.

30:54 But is it inheritance if it's tech debt?

30:57 I don't think so.

30:58 And you spread it out.

30:59 Everyone's getting inheritance.

31:00 That's the difference, right?

31:02 It's diluted.

31:04 All right, next one.

31:06 this is very confucius or neo to understand what recursion is you must first understand what

31:13 recursion is that one hits that one hits for sure uh because yeah you have to sit and think

31:18 i still remember my first uh cs class that i took i only took a couple because i was a math major but the first one in the lisp as well like we're gonna tell you about recursion like first of all what is this language why are there so many parentheses and why is it always recursion this is so crazy

31:33 Yeah. I only took a couple of CS classes in college as well, but I remember my first time I hit recursion hardcore production problem. I was like, whoa, this is crazy what it can do.

31:44 Totally. All right. The last one to take us out of here is three SQL statements walk into a no SQL bar. Soon they walk out. They couldn't find a table. Oh, it's too good. It was good.

31:56 And some people have a knack for joke telling like this. I'm a consumer of them, not a creator of

32:03 Yes. I'm always impressed with people that can come up with these jokes as well, but I do love them.

32:08 I love it.

32:08 That's right.

32:09 That's awesome.

32:10 All right, Calvin. Awesome to spend some time talking Python with you.

32:13 Yeah. See you later. Thanks everyone.

32:14 Yeah.


Want to go deeper? Check our projects




Subscribe to Python Bytes