Hello and welcome to Python Bytes, where we deliver Python news and headlines directly
to your earbuds. This is episode 472, recorded March 9th, 2026. Incredible. My name is Michael
Kennedy. And I'm Brian Okken. And this episode is brought to you by us. We have a bunch of
different courses, books, links are at the top of the show. I actually have some other things that
I'm going to talk about at the end of this show, Brian. Yet another thing. I have two new things,
but I only want to talk about one thing at a time. So this week gets, well, the one that I
picked for this week. Yeah. Follow us on socials, Brian, me and the show. We all have different
social media accounts you can follow and keep up with all the things that we're talking about,
or, you know, send us recommendations. We appreciate that. We always enjoy getting cool
ideas from other people. Helps a lot, right? We say, I didn't know. I don't think one of these
exists and someone will send us a message. Yes, they exist. And here are four of them. Like,
oh, thanks. We'll talk about those later. Sign up to the newsletter, get notified about
all the stuff that we're up to, but mostly we're sending out detailed, extra enriched
information about what we talked about in the show, not just show notes over email. So people
are finding that really valuable and Brian's sending those out. So that's great. And with that,
I guess, what's our first item, Brian? Oh yeah. So let's, actually, I've got a thing that I'm working
on at work that involves a project that really should be set up as a monorepo.
So, I mean, it's not, we're really, we don't really do monorepo things, but I guess it's a
project that, that has one repository and a bunch of different, like Python projects inside of it.
So I was looking for, for help with that. And I ran across this article called,
three things I wish I knew before setting up a uv workspace. And it is really about setting up a
UV workspace to deal with monorepos. And I actually don't really know. Anyway, so workspaces are a
thing that, that uv can deal with. And, but there's some, some tricks that I guess weren't obvious.
There weren't obvious to me. So there's just a few that I want to cover. One is to give the
root a distinct name. So you've got a top level PI, you've got an application, you've got,
or your repo, there's going to be a top level PI project.toml to handle all of the, to cover
everything. And then each of your sub packages will have its own PI project.toml. And the trick is
they've got to have the workspace names have to be different to make this all work. And so it might be
obvious. It might like in the example, they've got my app as the core project, but then the workspace
is my app also. It can't be that you run into a, a name conflict. So, and that's in the names show up
in a thing you've got member. There's an example of what the workspace looks like and that you have to
set up a different top level name. So project name has to be different. So maybe obvious, but I would
not, it's wasn't obvious to me. So thanks for that help. The other part, which the, one of the other
tricky bits is in order for uv to deal with this. Okay. The top level one, is it the top one? If
workspace packages depend on each other, you got to do a couple of things. You have a normal dependency
declaration and a tool.uv.sources entry telling uv to resolve it locally. So a project will have a
dependency. It's going to have its own name. It's going to have a dependency and that dependency,
if it's internal, you have to, in below say, you know, look, also look for uv sources in this workspace.
So it doesn't go out to PyPI or whatever to try to find those dependencies. And yeah, I would not
have even thought that that's built into uv. So that's cool. Didn't know that was there. The third bit
that was to use import lib mode for pytest. And that's kind of one of the reasons why I wanted
to pick this because I'm not sure what they're talking about here. Apparently there's an issue.
The issue is if you've got like something like the same test name, like test helpers in multiple
projects, that's if you, if you don't, if you have unique file names, it's fine. But if you might not,
and, and, you know, as projects grow, you don't want to like restrict people's file name choice.
We'll go ahead and do this, but I don't, the, there's like a couple of methods. There's the use,
the import lib method, and then there's putting dunder and nets in your test directory. And the,
the comment here is that this is, there's a silent bug with that. I wasn't familiar with this. So I'm,
it's a homework for me for next week is to research this, to try to figure out
what the deal is with this import lib versus dunder and net and how that behaves. So I'm going to,
I'm going to work on that this week. So that's, that's my, my two cents there.
What an interesting idea these monorepos are, huh?
Yeah. Well, I mean, I'm, I was first resistant. I'm like, why not just split it up? But there's a
lot of times where, I mean, for us, for me, that it's really that all the label can be one label for
everything, for everything that's together. If you branch, it's all to branch together.
Merges are all together, all of that. And that's hard to do without a monorepos.
Yeah, it definitely is. Definitely is. I just want to throw in real quick that I
interviewed Yarek and Mark from the Airflow team.
Okay.
About monorepos with uv and Prec. So that's episode 540. And I think that's a couple of weeks,
a couple of weeks out on the official Talk Python channel, but it's on the live stream YouTube
version, because that usually precedes things by a few weeks.
Cool. I'll have to check it out.
As we record them and then let them out. So Airflow has something insane, like over a hundred
sub projects or packages and dependencies across them and stuff. And they actually worked with uv,
I believe, to like help set up that workspace feature and functionality and so on. So pretty cool.
Yeah.
All right. I want to, I want to carry on from last week. So last week we talked about
Data Class Wizard. So now I want to talk about C attrs. So you probably know attrs from Hennig,
but what about C attrs? So C attrs is actually, it works with attrs and data classes and its job
is to take and do very similar serialization and validation that you would find in Pydantic,
but have it as a separate library. And so one of the things that I'm realizing as I sort of go
through these examples. And when I chose my raw queries plus data classes pattern that we talked
about last week, I think it was last week, recently, that I really was valuing the fact that the data
classes themselves were just that data classes. And maybe they got their own computed properties or
something, but they don't, they were not in charge of serialization, deserialization, validation,
but things like Data Class Wizards and C attrs, or just your data access layer, all those can have
really rich, you know, conversions, parsing, validation, et cetera, without actually being part
of your object hierarchy and your class, right? So you can choose those things separately. And this is
right along those lines. So it's super cool. I can import structure and unstructure, which is
to and from different types, but maybe dictionaries is the best mental model. And so I can say just parse
one of these things as a class C, which you defined as a data class or an attrs class or something like
that. And what you get out is one of those parsed and validated, right? Or you can unstructure it and
becomes a dictionary. Okay. So that's pretty neat, but it's not just, it's not just attrs. Also works
on data classes and let's see, there's a bunch of different types of validation. Let me see if I can
find it here in our example. So it does things like a message spec, message pack. It does YAML,
JSON, obviously. So there's a bunch of these different serialization libraries that you might
adopt, right? So it's really cool that you can do all different types of serialization and so on.
And I think it's, yeah, I think it's really cool. You can set up hooks to help transform values and
validate values through just basically decorators, which is kind of cool. Yeah. So more or less,
like, do you want a really nice structured way to serialize classes without making it part of the
object hierarchy and check out see attrs. That's really cool. Yeah. Yeah. It's I really like see
adders, especially for projects that like not reaching for a Pydantic seems like a natural thing to do
with web stuff. But there's a lot of other times where you want similar sorts of data validation
and other things that are like, like not web related. Yeah. This will work for web stuff too,
of course. But yeah. Neat. Yeah. I think it's really cool to have that control. Like for example,
the, what I talked about was if you use Pydantic, it's awesome that it serializes data before it gets
into your database, but it re validates that data when it comes out of your database. Why are you
validating data that's just stored in your database? You don't need to do that. It just happens to be,
well, that's how Pydantic works. You load it with data. It validates it. Great. Right. So I,
that's what I think is neat about this separation, the sort of orthogonality of your validation and
conversion layer and your class structure. Cause you can validate on the way in, but not on the way
out if that's how you like it. You know what I mean? Yeah. That makes sense. Definitely. Cool.
Yeah. Cool. Well, if I were to learn about this, what would you suggest?
well, probably not AI. I don't know. nice transition attempt though. Thanks.
So, I want to cover a, listener suggestion. somebody, wrote in and said, Hey,
um, we've been talking partially sometimes about, AI and LLMs and using agentic coding and stuff.
this is from Jose Blanca. there's a few blog posts around, how do you utilize AI for
learning to program? And, that's kind of an awesome topic. It's something I've been thinking
about too, is, is for people like even, you know, people, my daughter's age and stuff want,
wanting to learn how to code or really anybody wanting to learn how to code. A lot of things like
why, why would you want to learn how to code if there's a powerful AI tools already? how,
like if you, if you're convinced that you do want to learn how to code, how could you use AI as a
tutor rather than a shortcut and, and keep practicing? It's, you know, one of those key
points is practice remains a key to real understanding. And then, you know, what,
what should you learn? and I kind of love how we broke this down. So I'll read like the
summaries of like, you know, why, why, of course, how and what, going through,
there's just a few blog posts altogether, and really formatted nicely and put up. So,
why would you learn for occasional programmer or a professional programmer or just for fun?
There's lots of reasons, to want to learn how to program still. and one of them,
one of the things he brought up as like an occasional programmer is somebody that's doing something else.
Like they have a discipline such as biology, physics, whatever, something other than coding.
And, but they need to, to code. One of the reasons to learn how to code is even if you want to drive
it with AI is learning what kinds of problems that computers can solve easily or the right kinds of
things. And, and with, with, with learning programming, you also learn how to break problems
down into smaller pieces and stuff. There's a lot of stuff you learn with coding, that you,
that it's one of the few places that is practical that to learn how to do those sorts of things,
uh, breaking down problems. So lots of great reasons to, to do it for the why part. Um,
how I love this is, not using AI to solve your exercise problems, because you know,
you're not learning then, but, you could, you could do that and then look at what they're
coming up with, but you can also use AI to, to, to ask you things to describe to an agent,
like what, what level of coding you're at and could they come up with some programming problems
for you? I never thought about that of like getting a coding, coding problems from them.
and then, yeah. and then a caveat that there's limits to this and, and, to making
people aware of, of, of the problem, some of the problems that we're aware of, like, hallucinations
or dreaming up, dreaming up different things. so, but there X, I do think that,
that you can use AI as a teacher, a side teacher to generate tasks, debug things that you're having
trouble with that your code doesn't work. Why is it not working? way back when, when I was
learning how to code, it was, you did just bang your head out against the table, I guess. Um,
and, look at all the syntax, but having, having AI helps a lot, getting hints, reviewing your
code, explaining what different things do. Lots of great stuff that LLMs can help you with. And then,
um, the, what is really great. Don't skip this part. If you're going to look at these blog posts,
uh, because, what you should do, you know, let's see, you know, what you should work on. What
is the, what, what are the real learning objectives, mental models, managing complexity,
and thinking like a software developer. these are all great things to, to focus on, depending
on where you are in your career and how, where you, you know, where you were at. So anyway, this is,
um, and also just what good code looks like. Somebody new to coding doesn't really know what
good code looks like until they, you know, it's good to, good to learn that sort of stuff. So,
um, anyway, good job, Jose. I like, I like this. Yeah. Very nice. It's going to be a challenge.
I think it's so tempting to just press the easy button and go, okay, what's the answer or make it
work. But those of us who are willing to say, this is not working, help me understand what's wrong.
What are the other ways in which I could do it? I see you did it that way. Why did you do it that
way? Was my way not right? Like AI is actually really good at having those conversations.
Yeah. And I think there's, there's some real gems. There's some opportunity here. There's
a lot of, a lot of people, a lot of our youth, are not choosing CS right now. And I think that's
fair, but even if you use, I think there's still room for people to get CS degrees,
but there's also a lot of room for people to, and with AI, a lot of, it's a lot easier for somebody
in another field to add it. Like if, if you're in biology, you're probably going to learn some
coding anyway. But if you're like a history major or a doctor, like medical research or something,
maybe not, but with, with AI's help, you can probably learn how to code also,
and you'll be unstoppable when you get out of college. Yeah, absolutely. All right. It's an
incredible tool. It's an incredible tool. I a hundred percent agree. All right. Let's talk
about other incredible tools, FastAPI. So Savannah Ostrowski points out, says, Hey, how are you? Are
you using FastAPI? I'm reading from her LinkedIn post, of course. So good news. They have released
an official FastAPI extension for VS Code on the marketplaces. So if you drop over there, there's the
GitHub version and the marketplace version, I guess they kind of show you more or less the same thing,
kind of like PyPI. Like the read me just shows up in both places. I was like, do I really need this?
I'm not sure if I need this. Maybe I need this, but if you look at it, it's doing some really cool
things. GitHub anyway, like for example, I can switch over to FastAPI and it shows all of
the different, what is it grouped by here? Does it actually group by router? Like, you know,
how you can break up your routes into organizations by router, or is it just by URL? Anyway, you can see
like slash items and under slash items. It says there's a get items. There's a get items ID.
There's a post items put to the ID. And it actually shows you the function name. You can jump from this.
So really quickly you can navigate around basically by the URL structure of your site. What do you think
of that? That's pretty cool. Yeah. I think it looks really handy. You can also search for routes so you
can hit command shift command P I think, or maybe just command P pull up the command palette. And if
you type sub strings of the URLs or the routes really more accurately, maybe type items, it'll show
you all the things, all the URLs that involve items and you can select them out there and jump to like
get slash items or whatever. That's pretty neat. it has code lens for test client calls. So if you
have a test client calling that URL and you could hover over it, I think that's how it works. You
can hover over it and it'll actually take you to the server side. So that's pretty wild. Kind of like
the, the get lens. If you hover over, it'll say who it was committed by and click on it takes you to
commit. And then you can also deploy to FastAPI cloud. You're not familiar with that. That's like
the hosted super simple way to publish your code over to the internet somehow, wherever that goes,
you just FastAPI deploy and then off it goes. And if it's a FastAPI app, it often can even figure
out how to run it without you doing anything, which is really sweet. So that's great. So you can do that
straight from the extension there as well. And you can also view the logs of your application running
on FastAPI cloud in the terminal of your local VS Code. Yeah. Anyway. So if you are a FastAPI fan,
especially for using FastAPI cloud also had those folks on talk Python, which is out in the main
feed just a few weeks ago. So very fun to dig into that. But if you're a FastAPI person, regardless
of how you cloud checking out the extension for VS Code and presumably cursor windsurf, et cetera,
anti-gravity, you know, all the things. Nice. Yeah. I like it. Well, I think that is it for
all of our, our things, right? Yeah. Just some extras left. You got any?
Yeah. So just noticed this yesterday actually is was that Guido Van Rossum has has a homepage
on github.io and he started some interviews. So if you, if you look down blog posts, there's
interviews with key Python developers for the first 25 years. It's a new series that he's doing.
he's got Thomas Witters and Brett Cannon so far. And, at the preface for Thomas's
interview talks about what he wants, what he's doing here. apparently during the, the,
the recent, documentary that we had around Python, we talked about, there was some,
some people talking about, like, there's a bunch of old timers that were not part of that. And also,
um, you know, trying to, they weren't mentioned in the film, but probably are worth talking to.
And so he decided to do some interviews himself, from his perspective of things that needed
to be part of Python history, which is cool. And also that he likes, he likes, doing these
interviews and just releasing a text form instead of, instead of as a, like a podcast or something.
And actually, I think it's completely valid. It's, it's fine. It's good. but the format's
nice. there's some interesting information. I kind of skimmed through both Thomas and Brett's
interview and, I'm excited that he's doing this. So I'd like, keep it up.
Yeah. That's pretty cool. I know a lot of people, I'm not amongst them, so I'm not going to rant it,
but a lot of people are like, why, if I just want to learn how to do a thing, do I have to watch a 15
minute video that is, should have been a five minute video in the first place. And I just want
to skim the article and jump to it. I like to watch videos and listen to things, but I know a lot of
people are just rather read it. There's room for both, right? That's right. But our listeners should
not stop listening. They should definitely, definitely. They should definitely keep listening.
All right. Carrying on here. I got a speak. You mentioned the documentary for the Python one,
the really nice one that Cult Repo did. Well, they just released one on IntelliJ, the documentary,
an origin story, which is a 40 minute documentary on IntelliJ, which is kind of the foundation of
PyCharm as well. Right. So very relevant to PyCharm fans. So people should check that out. That's
really nice. Cool. I'm looking forward to that. Yeah. It's so easy to go on YouTube and just get
junk, but here's some really nice things. And keeping with the PyCharm theme, right, we did VS Code and
Curse earlier. So PyCharm. Apparently in PyCharm, they have the agent client protocol. And I don't
know all the different organizations involved in this, but this is just completely new to me. I
didn't realize what this was, but this is actually really neat. I'll tell you why in just a second.
So what it does is if you've got some kind of agentic programming tool, like QuadCode or something,
you can then just go to this and say, I would like anything that supports agent client protocol
allows that agent to do agentic coding in your editor. It's a little bit like the language server
allows all these different things to basically integrate with ty and Pyrefly and other stuff.
Right. Pretty cool. So if you scroll down here, the agents on ACP are Juni, Gemini, CLI, Google
Copilot, GitHub Copilot, Codex, Cursor, Cursor, what? Cursor. I thought that was an editor. Kimi,
Quinn, OpenCode, Klein, some of these I've mentioned before, but the noise, the announcement here is that
Cursor joined the ACP registry and Cursor is now available in PyCharm. Cool. So that's interesting,
right? Yeah. I mean, I don't even, I don't even know what to say, but luckily there's a video down
here that says, Oh, you could just watch this and it'll actually show you if you go along,
you just go in here and basically find and install Cursor and then your agentic coding section. One
of the things you can pick is Cursor. If I go far enough, it'll show you like once it's set up,
you can pick your agent source, like Cursor or Gemini wrote, and then you pick your agent mode and
thinking or planning and your actual model and so on. Isn't that wild?
Yeah. It's pretty cool.
Yeah. So I'm pretty, pretty happy to see that. That looks really cool. Okay. One more thing.
I wrote an R. Go ahead.
So one of the things I'm hoping is like that might be a way for, so one of the cool things
about Cursor that I've been trying out is the, one of the models is Composer, which is a cursor
specific model. And, and it's like, for instance, it's one of the best models for doing pytest code.
So that I've found, so it's possible that people, and you, you know, out for other people to be able
to use it then if you're, even if you're not using Cursor. So.
Yeah, exactly. So now you can run Composer 1.5 or whatever the latest one is at your time.
Right. Excited by Charm. Yeah. Pretty sweet. Okay. One article for me really quick. I wrote an article
called what hyper personal software looks like. So a lot of people say, well, if agenda coding is so
good, why aren't we seeing a ton of different pieces of software just overwhelming us with different
new apps? I think that's actually going to happen, but I think there's a lag, but I think what we have
a lot of, and what's going to be interesting is this hyper personal software. That is like something
that you make for yourself and you don't ever have an intention of sharing. You're just like, I just
want this agent. You make this and then you have it. Right. So for me, the example I gave is I'm a big
fan of start page. People probably know these days, that's what I've been using, but start page
started putting ads on their search results. And if they had just been like little ads at the
top, I would have actually looked to click them to support them and so on. But I have a 40 inch
monitor on that. It's like 11 K it's, you know, 5,000 by 2000, something pixels on that screen.
My browser still does not have a single organic search results on above the fold. There's so many
ads and I'm like, that is just this, what is this? So I told Claude, Hey Claude, I need a browser
extension. Here's what we're going to do. We're going to go here. Here's the HTML. I need to get
rid of these sponsored links from search from start page. So I typed in the description. I gave
it some example, HTML and I hit go and walked away to like make breakfast. Came back. It had
something that almost worked. I had to give it a little like, ah, you remove too much. Tell it a
few times. But now I have a browser extension that gives me just the organic results, nothing else.
And I have no intention of sharing it. It's just my own browser extension that just runs on my
computer and I'm happy with it. I'm not published in the store, nothing. And I think we're going to see
a lot of like a lot of things like that. And I think also people should explore those ideas
because they're really fun. They're super low stakes. Like if my search results get screwed
up, I'll just turn off the extension. I don't care. Yeah. Yeah. So anyway, I think there's going to be
this, this wave of hyper-personal software and here's an example. Yeah. I think that, that idea is
going to show up in our joke later. It's absolutely going to show up on our joke and it's going to show up
my next item in the very, very most tangential way. So I'm actually trying something new, Brian.
And this is for people out there who have companies, I would really love them to pay attention to this
part. So I'm, I've done a lot of training. I don't know if people know, I've taught over 100 week long
courses around the world before I started doing the podcast and stuff. Like when I was doing training,
which is a crazy amount of courses to give like professional development type stuff. So I am going to
put my shingle back up for that just on very limited way to help people adopt agentic engineering
practices for their software team. Cool. Not training in general, but if you're, if you've got a Python
team, especially, and you're like, wow, we're just not really having a lot of success with using AI for
coding or our team is afraid of it, or they don't know how to do it. Reach out to me, set up a discovery
call and we'll have a quick chat and I'd love to come. It's been three or four days, one day teaching,
one day like coding along with your engineers and then like some more follow-up stuff to help them
really get this kind of stuff going. Oh, that's great. Cause yeah, a lot of people, a lot of teams
are getting demands from above. Hey, you should be using coding agents, but how? But how, and then how
do you not end up with a bunch of slop or a bunch of bugs or mouth, you know, like code not following
your practices. I really dialed that in over the last year and I think I'd, I'd love to share that with
people. So cool. Nice. Thanks. That's, that's out there. People can find it on my personal website.
All right. And you're right. All of this leads in perfectly to our joke, doesn't it? So are you
ready? Yeah. All right. So this comes to us, this is on Reddit. It looks like it actually came off of,
I don't know, off of X or whatever. It doesn't matter. So there's been this crazy open claw.
It was like molt, there was claw bot and then molt bot. There's like all these variations that it went
through. But open claw is this thing that you can set up and you just give it access to your email,
your calendar, your credit card, everything. And it can just, you could just send it jobs and it'll
just go crazy sometimes in really, really bad ways. But it is kind of supposed to be this thing that
just runs and does a bunch of agentic stuff without your work. Right. So you've heard that AI means that
SaaS, like hosted software created by other people that you subscribe to, SaaS is dead. So here's,
here's this quote or this message from Johan that says, SaaS is dead. Open claw replaced all my
subscriptions. Went from $480 a month on tools to $1,245 a month on API costs plus 15 hours a week
fixing my YAML files. Adapt or be left behind losers. That's so awesome. It's so much of the
zeitgeist, isn't it? Yeah. It's got 2000 upvotes as well on Reddit, but the comments are good.
Okay. Solid math, solid work. If I, if I were you, I would spend the next 200 hours crafting a
premium info product that sells this magic method you've unearthed. Someone says, I must admit,
it's kind of funny, but it doesn't say they misspelled. It says, I must admin. It's kind
of funny. And it says, please update the YAML file. So you don't misspell, misspell admin again.
Oh, that's good. And then there's a really good one. Let me see if I can find it.
This person over here says, SaaS is hardly dead. Kind of foolish to think every business will try
to roll their own suddenly to find out and find that you don't have the skill to fully conceptualize,
blah, blah, blah, blah, blah, blah, blah. Then somebody's, somebody says nude irony, huh?
Yeah. Cause they just took it literally like, Oh my God, I can't believe he's trying to adopt this.
This is not going to work.
Yeah. That's funny.
All right. Let's leave it there. New to, new to irony, huh?
Yeah.
The opposites are frankly.
Yeah. Anyway, that's really funny. I'm, I definitely think that's a good choice.
Just spend all your time fixing the claw bot.
All right.
And I went from a 540 to like over a thousand API costs. That's hilarious.
Exactly. Exactly. I don't know about you, but I've got three broken agents over there.
So I got to get going. I'll talk to you later.
All right. Bye.