Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 431, recorded May 5th, 2025.
And I am Brian Okken.
And I am Michael Kennedy.
And this episode is sponsored by NordLayer.
Listen to their spot later in the show.
And if you'd like to connect with us, you can, or suggest topics, please feel free to send us an email or head on over to either Mastodon or BlueSky and the links to both of us and the show are in the show notes.
And you can join this episode live or join it live usually Mondays at 10, but sometimes other times.
But head on over to pythonbytes.fm/live to sign up and see the schedule for the next one.
But also you can, that's on YouTube, so you can watch them later if you'd like.
And I'd also like to encourage people to sign up for the newsletter.
We send out a weekly email with all the links from the show.
plus background information.
It's a lot of fun.
So check that out.
Also, I think it'd be cool to have a cool first topic, Michael.
What you got?
This was a nice, easy one, easy to adopt, easy to appreciate, I think.
So you and I, we spend a lot of time talking about, here's the new things for this, and here's the new thing for Python, and here's the new features, the next version, and test the alpha, test the beta.
And we also talk about when they go out of support, but I don't know how you feel.
I often, that sneaks up on me.
I mean, the fact that 3.8 is out of support seems wrong.
But it is, you know what I mean?
Yeah.
And so you might be sitting at your terminal just going, what's that status again?
And so I present to you Pyrel, P-I-R-E-L.
And what it is, is it's the release cycle of Python at your fingertips.
Ooh,
cool.
Yeah, so
there's a little graphic here, I suppose.
I could open up the image full size, perhaps.
And you just type whatever, doesn't matter how you have Python active.
if it's the system one or if it's a virtual environment one, you can write Pyrelle check and it'll give you a nice summary of what's going on here.
You can say you're using Python 3.13, which is actively maintained, and it will be this good for this long.
You can say Pyrelle list and it'll give you a list of all of the last 10 or so versions when they came and when they went.
So it's pretty cool.
I mean, that's more or less what it does, but it tells you that you can get, you know, go get a new Python version if yours is getting older.
And the status as well, is it still getting feature updates?
Is it in bug fix level?
Is it security fixes or is it YOLO?
I just can't be bothered.
Anyway, that's what this is.
What do you think?
I think that's pretty fun.
Yeah.
Also,
yeah.
Yeah.
And it uses the rocket emoji, which will make a reappearance, right?
Yeah.
I do like the rocket emoji.
Indeed.
So there's a little bit else you can do with it, though it does not particularly interest me as a tool, nonetheless.
You can also type Pyroguess, and it will do things like give you various trivia about the release history of Python.
So, for example, it might ask, when was Python 3.11 released?
Or who is the release manager for 3.6?
And it gives you a multi-choice select, and you can pick, and it'll tell you if you're right or wrong.
So if you like Python release history and seeing the details, you can do that.
But I think the payroll list and the payroll check is pretty cool.
Yeah, I like it.
Neat.
Yeah, that's it.
All right.
Well, I want to cover something that we've covered before, kind of.
Back to the future.
Back to, we're going to go back in time.
This is episode 123, which, when was that?
That was like in May 26, 2019.
We recorded it and it came out on the 29th.
Right.
And we had no idea.
Things were different back then, 2019.
2019, different world.
But one of the things that started in that was when we announced, well, we didn't announce it, but we covered it on the show way back in 2019.
The introduction of FastAPI.
So we talked about it.
This new cool web framework called FastAPI.
Well, FastAPI has been growing and it's now the number one web framework, not just across Python, but across everything.
So it's been an incredible thing to watch and some great work out there.
Well, today, Sebastian Ramirez, the dude that created FastAPI in the first place, he announced that he is forming FastAPI Labs, a new company, and that they are, the FastAPI Labs is a new company and they're building a fast api cloud so we're going to take a look what does this mean it kind of means that you just get to build your fast if you do this the promise is you build a fast api application and you can just deploy it with um fast api deploy just a single line and and then they'll they'll host it on their um like a subdomain of the fast api cloud.dev so um kind of interesting. I'm intrigued. So I've definitely joined the wait list. There is an announcement blog post of by the same team behind FastAPI. So this is, this is kind of an incredible, he's built FastAPI up and it's not just, not just Sebastian. Now there's other people working on it.
It's built on top of Pydantic and a couple of cool things that I can't remember. But, But the team is, the blog post talks about the problems of deploying to the cloud.
Now, there is documentation on the FastAPI.
We've often commented that the FastAPI documentation is excellent.
They've done a great job with documentation.
But it is not trivial to really deploy anything anymore, aside from maybe a static site.
But you have to get concerned with a lot of stuff, especially if you start growing with security.
And so they are looking at that security bit.
So it's so far, it looks like Patrick Armino, Alejandro Sanchez, Sophie Van Langen, sorry, and Sebastian.
And probably more.
I'm not sure if that's part of the team or if that's just anyway.
They might be, I don't know how many people are in the company right now, but he's promising to keep FastAPI open source.
And to also, interesting in this is that he doesn't want to have vendor lock-in.
So whatever processes they build up, it won't make it so that you're stuck with FastAPI with their hosting.
So essentially this is hosting for FastAPI.
So kind of neat.
Yeah,
congratulations, Sebastian and crew.
That's awesome.
Yeah.
It
is a hassle to deploy things.
And presumably these folks know the best way to host FastAPI.
FastAPI might be tuned for the infrastructure that they choose over time.
You know, I'll have to look more into this.
Like how do you host a database and things like that.
But presumably you can do things like use a CNAME for your app at fastapicloud.com and you'll get your own domain name and all that sort of stuff.
But very interesting.
Yeah, it is.
Also, like for, interestingly, that was the first thing I thought is like, well, I probably don't want to use their domain.
But for, you know, for an API endpoint for some internal tools and stuff, I might not care.
So I think some people.
That's a good point.
You would care a
whole lot less, right?
If it's just an API
and it's not
like your landing page or whatever.
Yeah.
Anyway.
Cool.
Cool stuff.
Absolutely.
Well, what else is cool, Brian?
What?
NordLayer. Let me tell everyone about our sponsor and NordLayer here. So NordLayer is actually a pretty neat product. And this episode of Python Bytes is brought to you by NordLayer. So it's a toggle ready network security platform for modern businesses and combines VPNs like you would expect, of course, from the parent company, Nord. However, it's also access control, threat protection, visibility into what's happening in case you spot some sort of malware. All of those in one easy use platform. There's no hardware, no complex setup, just secure connections and full control in less than 10 minutes. So it's easy to start with quick deployment, step-by-step onboarding 24-7 support. It's easy to combine. It works with existing setups in all major platforms.
And NordLater is easy to scale. Just add users, features, servers in a few clicks. SSO and provisioning included. If you want zero trust network access, you got it. It provides those network zero trust solutions. It adds threat protection to keep malware, ransomware, and phishing from reaching your endpoints, including servers. How cool is that? Increases your threat intelligence to spot threats before they escalate and helps businesses achieve like HIPAA compliance and stuff. So if you're responsible for security of your software or data science team, you should definitely give NordLayer a look. As Python Bytes listeners, you get an exclusive offer of up to 22% off NordLayer yearly plans plus 10% off the top with a coupon. And that coupon is Python Bytes dash 10. If you visit the link in your show notes, there's a landing page and it gives you the code right there. So Python Bytes dash 10. Try NordLayer risk-free with their 14-day money-back guarantee.
Visit pythonbytes.fm/nordlayer to get started.
Link is in your podcast player show notes.
Thank you to Nordlayer for supporting the show.
All right.
Next, we, you know, going back in time, a little less in time.
This is just a couple episodes ago in episode 428.
We covered T-strings.
So T-strings are going to come in 3.14 in the Py release.
So there is one of the authors, Dave Beck, or Dave Peck, sorry, Dave.
wrote an article about the Python's new T-strings.
And I'm kind of excited about it because when we talked about it on the show, I'm excited about them, but I also, they're like template strings.
But how are they different than F-strings?
When would I use one over the other?
And I got all these answers in this blog post.
So he talks about what's the big idea of T-strings.
And interestingly enough, We've loved f-strings so much that they're used inappropriately.
And I didn't really realize that there's security problems.
So there's like comments on using f-strings to take user data, user input, and fill in like maybe a SQL statement.
Don't do that.
You want to clean your user input first.
So people have been using it and or possibly to use it to generate a web page.
So you've got a possibility of somebody inserting cross-site scripting or other bad things that you don't expect by just sticking user data into HTML.
So misusing F-strings is one of the reasons why T-strings are kind of a cool thing.
So the template strings are a generalization of F-strings, and they keep things separate.
So f strings actually create a string, but t strings don't create, when you create a t string, you don't get a t string, you get a, or a string, you get a template object.
And this template object has these two separate things.
You've got, it's got a, I'm going to scroll down, it's got a strings section and a values.
And so it keeps, they're both tuples of things, of what's inside of it.
And you can iterate through them.
There's all sorts of cool stuff you can do with templates, these template strings.
But this is a nice, really good walkthrough of kind of what's inside and why they're different than f-strings.
They're very different now.
And but talking about there's inside, there's a what's the value?
There's a interpolations are a thing that's in there.
So you might have it might be a string.
It might be other.
It might be something else.
And the interpolations have all the pieces in place.
And you can even dive really deep into it and have things like what's the value of the variable that you passed in, the expression name, the conversion, the format specifier, even if you've got format specifiers on it.
And this is all sorts of nitty gritty detail.
But the gist I'm taking away is they're just really kept separate.
So you've got like the template and the things you're passing into the template as completely separate things.
Why is that great?
Well, one of the great things about that is you can, like in the example of SQL or HTML, you can take the user data and check all of that and run things over it.
So if you've got user data and you expected a string, you expected people to not be nefarious about it.
You can do like a safe HTML or something, convert like the brackets into something else, strip out SQL statements so that they're not, it's not a, you know, escape things, escaping things and making them cleaner.
One fun example in this, I love this.
A fun example is how to create PigLatin using template strings.
And so there's like this PigLatin converter that takes a template and returns a string.
So you're able to have like a hello world and then you run PigLatin on the template and it converts the template into, we've got these converter functions.
You can convert into actual string.
And I kind of, okay, I went down a rabbit hole on this because this example says to convert, I kind of forgot the rules of PigLatin because it's been a while since I've been a kid.
But it says essentially if the first character is a vowel, if the words in the word, the first character is a vowel, then you append yay on the end.
But if it's not a vowel, you take the rest of the word and take the first character and put it at the end and say a.
And I don't think that's correct.
Or I think it might be correct, but I forgot the rules.
So I looked it up.
And Pig Latin, sorry about this, but Pig Latin, it says that it's not just the first constant, but it's the first constant cluster.
So I don't think this is the correct implementation.
Well,
it might be one that fits on one screen.
Yeah.
So Brian would translate into Ian Bray, not Ryan Bay.
You know, anyway.
Okay.
The diversion.
But anyway.
So there's some great ideas for when we finally have T-strings and we ship Python 3.14, we can do things like possibly having everything more safer and more flexible.
One of the things that's coming up possibly is, oh, where'd it go?
787.
So there's a proposal for safer subprocess usage with like Schlex and Subpros, which I love Schlex.
But you could use a, if those could be implemented with T-strings, they'd be a lot safer.
So there are some security vulnerabilities in these things.
So it could simplify the implementation.
You don't want to ampersand, ampersand, do other thing as part of your command, right?
Yeah.
So this, and then, so having a lot of things that to take user input and create other things, Having them use T-strings might, and having like some quick, safe conversions, instead of having to convert user data ahead of time, you just grab the user data and stick it in a template string.
And then later in your pipeline, clean up the user data.
Those are pretty cool things.
So there's also some attribute things.
There's other ways you can, since they're separate, all the way until you do the conversion, you can do like some cool attribute things that he covers in the article too.
So anyway.
Yeah, looks like a great article.
Thanks, Dave.
Ryan.
I'm going to have Paul Everett on Talk Python, not this week, next week, to talk about T-strings.
Oh, perfect.
Yeah.
We're going to be diving into it some more.
Yeah, it should be fun.
Nice.
Indeed.
Let's go back to the terminal.
And this one, I think, is also pretty interesting, especially if you're learning the terminal or you're just like, how do I do that again?
Zev.
Have you heard of Zev?
No.
It's a simple CLI tool that helps you remember terminal commands.
So if you're sitting here and you're like, you know, I don't really know what I'm doing with this stuff.
I can type Zev and it says, what do you want to do?
It says, show all files in this directory with human readable sizes.
And it says, okay, great.
Here are a couple of things you could do.
And it gives you a select list like ls-lh or I think it was find is one of the options.
But basically it gives you a bunch of options to do those types of things.
And up it goes.
Pretty cool, right?
Yeah.
So this project runs on top of LLM APIs like OpenAI, Google Gemini, or local Olama.
So basically it sends that command over and then it looks at all the responses.
But it probably does a bunch of work to format
it for
you.
But more importantly, it puts it right there in your terminal where you can just select the answer and hit enter.
You don't have to go to chat, copy it, move it back over, run it.
You know, like that sort of round tripping.
Yeah.
Okay.
Yeah, so suggestions that you might use are like show all running Python processes, find all Python files modified in the last 24 hours, show disk usage for the current directory, check if google.com is reachable, etc, etc.
So yeah, pretty neat.
It does say everything's generated by LLMs, so careful.
Because you know how it goes, right?
It could be delete all files like this in this directory, and in this directory part gets forgotten.
rm-rf star, okay.
Slash star, slash star.
Anyway, super
simple, but you set up an LLM provider.
I recently wrote a really cool program that I'm, program, utility, simple tool, that I use that I'm thinking of making public somehow, but I also don't need another thing to babysit.
But basically, if you're in a Git repository, you can just hit a command and it will look at all the new files, the change files, and then correlate that with a local LLM, coding-based LLM.
It says, create me a Git summary of everything, like the header, and then actually a detailed summary, and what happened if you forgot all the things you did.
A little bit like this, but that's not out yet.
But this is cool.
I
like to see this.
Like, what did I do on Friday to run on Monday?
Yeah, exactly.
You could totally
do it.
And it improves it in this way.
You're like, oh, gosh, I did improve it in that way.
Look at this show.
Aren't I smart?
And before we carry on looping back to your topic, the T-strings, Henry Schreiner writes, I've been wondering if this could be supported in the logging module.
Since it's an actual type, it could be detected.
Yeah.
That
would be cool, right?
maybe have a slightly different output with more information about the parts of the string.
Yeah.
Indeed.
All right.
Well, we're back to extras.
I really should have put up.
So one of the things I didn't cover about the T-strings, we'll get to my extra first or second, but in the T-string article, there is a link to a whole bunch of examples of other non-silly examples of T-strings.
So he does Pig Latin in the article, but there's a bunch of others too.
And one of them is a treatment of logging with T-strings.
So check that out.
My extra really is I kind of went – speaking of rabbit holes, found out Monty Python and the Holy Grail turns 50 this year.
So 50 years ago, Monty Python.
I can't believe that.
Bring out the holy hand grenade.
But one of the comments in here, which is, this is, I'm linking to an Ars Technica article.
And I learned a new word today because there were, it says they were, Monty Python and the Holy Grail were nerd gassing before it was cool.
So they were talking about nerd gassing.
And one of the wonderful discussions in the movie is using coconuts.
Because they're supposedly riding horses.
They don't have, yeah.
Yeah, there's just some guy banging coconuts.
And somebody stops and says, like, where did you get the coconuts?
Oh, we found them.
No, you couldn't have found them because, like, they're not native to England.
They're tropical.
So great discussion about coconuts.
And apparently that is nerd gassing.
I didn't know the term.
So I looked that up.
Nerd gassing was coined in 2008 by John Scalzi, a sci-fi author and blogger.
And nerd gassing is the venting nerd, venting, the venting that nerds emit when some often minor detail of a book or movie or TV show, comic book, et cetera, either conflicts with canon or hand waves through some suspect science.
And so I was totally nerd gassing in the, in one of our topics when I went off on what the correct rules for pig Latin
are.
So, yes, that's, you were.
And I do the same thing when people mess up that quote from Captain Picard about may the force be with you.
Okay, so let's go on to the next.
Nice.
Okay.
Please
write us and tell me that that's wrong.
All right.
This is it for your extras?
Yeah.
I would like to also point out for those as a follow-up who don't know, because Python, the community has done a poor job of this.
All the logos for Python are snakes, but the name Python came from Monty Python, which is why it's relevant on this show.
yes
yes and that's why we have wheels because they're wheels of cheese because
they used to the cheese shop for pipey and yeah the
cheese skit i mean if you haven't seen the cheese skit from monty python you have to go watch the cheese skit because it's
awesome
the
rabbit part is my favorite by far okay here's
a quote this is not the joke this is actually a real thing so it has a picture of firefox and it says you either die a hero or you live long enough to see yourself become a villain. And underneath it, it shows the preferences in Firefox for website advertising.
Allow websites to perform privacy preserving ad measurement. This helps the site understand how their ads perform, et cetera, et cetera. Like this is built into Firefox now. And there was like some terms and use changes about how the stuff you submit in Firefox is now being used and being shared and so on and oh right firefox was like one of the last bastions of privacy like real privacy the antithesis of chrome which is you know tracking and correlating and reselling everything
so
both you brian and me we care about these things and for example brian use vivaldi i use vivaldi quite a bit but i also started using zen zen browser that's what's actually on the screen right now. And I love Zen Browser because of it's such a clean, nice little layout. And it's based on Firefox as well. So when this stuff got announced 10 months ago or whenever it was, there was over on the Zen Browser GitHub repo, there was like, so what is Zen going to do about this? And at the time there wasn't a lot of clarity, but now Zen 1.2.1 is out and it's got some features. One of the things it says, if you go read the full release notes, it's got some new But in response to recent privacy concerns, bracket about Firefox, we've significantly strengthened Zen's privacy measures.
Previously, we only disabled telemetry, but other things were being done.
Now Firefox telemetry has been completely stripped out of this.
Basically, they've, much like Vivaldi de-Google-ifies Chrome, Zen has had to go to the step of actually de-Mozilla-fying.
I don't know, whatever, what is the term here?
Extracting evil.
Extracting the in poopification of, yeah.
And I don't necessarily blame Firefox.
They are in a tough spot.
They've squandered their position quite badly for quite a long time, such that if the ruling against Google goes through, they lose 90% of their revenue overnight.
That's a problem.
But they're also doing good things like starting to create like docs alternatives that we've covered before.
But, you know,
I guess things
must be, people must be resold and ads must be put upon people.
And that's the way it seems to be.
I don't know.
I don't agree with it, but that's how it is.
Anyway, I'm happy to see Zen Browser do this.
Yeah.
There's also a ton of cool, well, there are a handful, at least, of cool pytest plugins that I use that started in Mozilla.
So, yeah.
There's lots of great people that have worked there over the years.
And I'm sure still do.
A
lot of people
do.
And I'm...
suspect not all of them are super psyched about turning on all the ad stuff, right?
Just like I'm sure there's people that still work at Google that don't think they should have removed don't be evil from their tagline.
Yeah, but those people are evil.
Okay, let's keep going.
Just kidding.
Please don't email me.
Yeah, email him.
It's Michael at...
Testandcode.com.
Okay.
Next, or you go to jail.
That was such a fun episode that we did last week.
Yeah.
But I pulled up this episode, not because I care about that, but I've changed the way that transcripts work.
So previously we had transcripts are every word spoken for 30 minutes or however long the show is.
And I thought, well, that should go on its own page.
You can go and check it out.
But I'd like you to be able to come to the page and hit Command-F and let you know what we said about, I don't know, AI or...
We'll just pick the sponsor because it doesn't show up too many times.
But now the transcripts show up on the main page just as a section farther down.
You can
collapse them
if you like.
But it lets you click on the time link anywhere and play it back
as you go.
So if you find something in the transcript and you're like, I just want to hear it, you just click right there and boom, off it goes.
Put tons of effort into making these transcripts accurate and good.
They're not perfect.
Please, again, don't email me.
There is an imperfection.
I have discovered you were wrong.
But we make a lot of effort to say things like PyPI are spelled correctly.
And other words are correct in here so that when you search for them, they show up.
It also powers our search engine that you can just search and even add to your browser that we've talked about before.
But transcripts are slightly better.
And the pages are slightly more useful.
So visit the website.
Yeah.
And that helps us track every part of your life because we know we don't do that.
just we need just one cookie to get it
started no just kidding we have no cookies okay that's it for my extras joke yeah this is a this is a re-envisioning a re-envisioning of an old joke i think it's pretty good there's this person running a china shop and there's a big sign that says china shop and then above it my code base and there's a character here holding a giant angry looking bull by a nose ring. And the person holding it says, mind my friend comes in with me and the bull is labeled cursor. Welcome to the error of AI, huh? Just add that one feature.
Sure. We only need 27 changes. You don't mind if we do, do we?
Interesting. That's funny.
So why is this a flashback? This joke actually comes from, this is the original one from when George W. Bush was president in the US and the China shop was not code-based. The China shop was social security.
Okay.
Yeah.
Something like that.
That's, I don't know, somewhere down here in this thread people talk about stuff.
I don't know.
Anyway, I think it's a pretty appropriate joke.
It's pretty good.
Yeah.
It's funny.
Good, good, good point.
Yeah.
Indeed.
All right.
Well, that's what I had for our joke.
Not absolutely hilarious, but amusing, I think.
If you want hilarious, you got to go back to 430, episode 430 last week.
Yeah.
And if you haven't listened to that, you have to watch that video because it's excellent.
That's right.
or you go to jail.
Or you go
to jail.
Listen to it or you go to jail.
Well, once again, wonderful episode.
Thanks everybody for listening and we'll see everybody next week.