Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#445: Auto-activate Python virtual environments for any project

Published Mon, Aug 18, 2025, recorded Mon, Aug 18, 2025
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Python Bytes 445

Sponsored by Sentry: pythonbytes.fm/sentry - Python Error and Performance Monitoring

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am 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.

Michael #1: pyx - optimized backend for uv

  • via John Hagen (thanks again)
  • I’ll be interviewing Charlie in 9 days on Talk Python → Sign up (get notified) of the livestream here.
  • Not a PyPI replacement, more of a middleware layer to make it better, faster, stronger.
  • pyx is a paid service, with maybe a free option eventually.

Brian #2: Litestar is worth a look

  • James Bennett
  • Michael brought up Litestar in episode 444 when talking about rewriting TalkPython in Quart
  • James brings up
    • scaling - Litestar is easy to split an app into multiple files
    • Not using pydantic - You can use pydantic with Litestar, but you don’t have to. Maybe attrs is right for you instead.
  • Michael brought up
    • Litestar seems like a “more batteries included” option.
    • Somewhere between FastAPI and Django.

Brian #3: Django remake migrations

  • Suggested by Bruno Alla on BlueSky
  • In response to a migrations topic last week
  • django-remake-migrations is a tool to help you with migrations and the docs do a great job of describing the problem way better than I did last week
  • “The built-in squashmigrations command is great, but it only work on a single app at a time, which means that you need to run it for each app in your project. On a project with enough cross-apps dependencies, it can be tricky to run.”
  • “This command aims at solving this problem, by recreating all the migration files in the whole project, from scratch, and mark them as applied by using the replaces attribute.
  • Also of note
    • The package was created with Copier
    • Michael brought up Copier in 2021 in episode 219
    • It has a nice comparison table with CookieCutter and Yoeman
    • One difference from CookieCutter is yml vs json.
    • I’m actually not a huge fan of handwriting either. But I guess I’d rather hand write yml.
    • So I’m thinking of trying Copier with my future project template needs.

Michael #4: django-chronos

  • Django middleware that shows you how fast your pages load, right in your browser.
  • Displays request timing and query counts for your views and middleware.
  • Times middleware, view, and total per request (CPU and DB).

Extras

Brian:

  • Test & Code 238: So Long, and Thanks for All the Fish
    • after 10 years, this is the goodbye episode

Michael:

Joke: python is better than java

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 445, can't believe that, recorded August 18th, 2025. I am Brian

00:11 Aukin. And I'm Michael Kennedy. This episode is sponsored by Sentry, Python error and performance

00:17 monitoring. Thank you, Sentry. And if you'd like to get a hold of us, maybe give us some topic ideas that you'd like us to cover on the show, that would be awesome. Or just comment on something or just say hi, you can reach us on both BlueSky and Mastodon, and the links are in the show notes.

00:32 And if you'd like to join us live for the live performance, performance, pythonbytes.fm/live, or you can also use that link to find out when we're going to record next or just find out where the YouTube page is so that you can subscribe and watch them later.

00:51 That'd be great.

00:52 And finally, we'd like to get a hold of you later just to sell you stuff.

00:57 No, just to give you links.

00:59 So we cover a lot of stuff in the show.

01:02 You don't have to keep track of the links.

01:03 They're in the show notes, but they're also the links plus extra information and things you might need to know if you are new to Python or new to a topic.

01:12 Those are all in the email.

01:14 So you can go to pythonbytes.fm and sign up for the newsletter and we'll send that to you.

01:20 And that's all the intro stuff.

01:22 So, Michael, we got some exciting news for number one.

01:26 We have very exciting news.

01:27 And as part of this performance, Brian, I would like to recite The Raven by Edgar Allan Poe.

01:32 Oh, no, wait, this is not a performance.

01:34 And I don't want to do that.

01:35 I want to talk about Astral, actually, because this is a really interesting announcement from them.

01:40 Charlie and team are knocking stuff out of the park.

01:42 They're delivering big time on the tooling for Python packaging, managing Python, right?

01:49 all the layer that you build upon when you're writing applications, right?

01:53 So first they came out with Ruff for formatting and fixing issues.

01:57 Then they came out with uv, and then they upgraded uv to have its project management and Python management, not just alternate pip installs and so on.

02:05 And along all of that time, people have been saying, well, this is so amazing.

02:10 It's so fast and it does all of the things instead of piecing together tools.

02:15 But what if they rug pull us and we slip and we hit our head?

02:18 What if they go and do something else?

02:20 What if they start saying it's a half a cent per pip install or whatever, you know?

02:25 What are we going to do?

02:26 And Charlie has said that he's not planning on monetizing those types of things.

02:33 Instead, he wants to build on top of it.

02:35 So with this announcement, we get our first look at what that might be.

02:39 So it's interesting in and of itself, but I think it's also interesting in like,

02:43 this could be the thing that supports the stuff that people are really starting to depend upon.

02:48 And it's something called PYX, PyX.

02:51 I'm going to be interviewing Charlie on Talk Python in a couple of days.

02:55 By a couple of days, I think it's next week.

02:57 But pretty soon, I put a link to the event on the show notes.

03:01 People can check that out.

03:01 So we'll get the pronunciation.

03:03 I'm going to say PYX for now, like ty and uv and so on.

03:06 Unlike Ruff, not R-U-F-F.

03:08 So PYX, a Python native Python registry now in beta.

03:13 So here's the deal with PYX.

03:15 Think of this as an alternate PyPI, but not as a source of packages, not where, like when I publish something, I also have to publish the PYX, but more of a front end that adds a bunch of features or an intermediate layer, a middleware to PyPI itself.

03:34 Okay.

03:34 And at the moment, the plan is for this to be a full-on paid service for people that really need things like i really need my project to 100 be able to build some thing that's only available as a source distribution right how often have you pip installed something and most things just come down as a wheel and they come flying in but every now and then it'll stop and say

03:58 building something for 10 seconds the very first time before it gets cached then it goes yeah or longer yeah definitely potentially longer like i don't use it anymore we've talked about why

04:09 is micro whiskey because they said please stop using our project we're not going to support it go find something else and we talked about that but that thing took forever to build but also if you're doing a gpu aware types of things you're doing a lot of stuff with pytorch or machine learning more broadly a lot of those things are huge and having the right platform built version is really really tricky okay so the idea is that uv and pyx are going to go together hand in glove So uv can work even better by having complete control over the back end as well.

04:45 They say there's some limitations that uv was able to solve, but not all of them because they don't control PyPI.org and its API and how things get built.

04:54 So the idea is making it easier to install PyTorch or CUDA-based libraries, that kind of thing.

05:02 It also solves the problem.

05:03 Why is everyone rebuilding the same packages over and over on their machine?

05:07 And what if those build tools are no longer the same?

05:09 Why did setup tools break our recent release?

05:12 How do we authenticate against our internal registry?

05:14 The other thing this is going to do is it's going to be a first class private registry.

05:19 So if you have a team, you're like, let's publish our data access layer, not to the world, but to our other people who are working on the projects, to our other applications, and so on.

05:29 So pretty exciting.

05:30 I think there's a lot of stuff going on here.

05:32 They're in beta.

05:33 You can join the waitlist.

05:34 You can get in touch with them.

05:35 It says, beyond the product itself, PYX is also an instantiation of our strategy.

05:40 And this is what I opened with.

05:42 Our tools, uv, Ruff, ty, et cetera, remain free, open source, and permissively licensed forever.

05:47 And this project is pretty interesting because it's a glimpse into how they're planning to make that possible.

05:53 Yeah, I'd be really curious to watch this.

05:56 I'm excited for a lot of reasons.

05:57 So let's say this is only a commercial offering.

06:01 It's a corporate sort of thing.

06:02 You have to pay to get it.

06:04 I'd be still okay with that because the alternatives, there's alternatives out there like JFrog Artifactory is around.

06:10 And there's other ways where you can, there's other products available to set up to mirror PyPI and do other things like as things come in, do like a security scan, your own security scans and things like that.

06:24 And so a mirror in front end, but also something that you can publish to internal, publish internal things to.

06:31 Those are really cool.

06:32 They're a little hard to set up though.

06:34 And I think I trust Astral to make this fairly easy for people.

06:38 It also would be cool if you want to test things out locally.

06:43 There's smaller businesses and smaller teams that aren't large corporations or even individuals that might have a need to try out what a repository might look like when you're doing those sorts of things or you're developing on an airplane or something, a local repo.

06:59 So I don't know if they're going to get down to the point where it's a, like a local person, like a free thing that you can just run on your own.

07:06 So it'll be interesting to watch.

07:07 I guess I'm okay with either if they want to keep it like paid only or something that, you know, small fry can use as well,

07:15 but I'm excited to watch.

07:16 I am as well.

07:17 Yeah.

07:17 There's, I think somewhere Charlie said maybe possibly there's a free version, but right now the plan is to be a paid project.

07:25 Yeah.

07:25 Yep.

07:25 All right.

07:26 That's all I got to say about that for now until I talk to Charlie and more about i want to talk about lightstar a little bit there is an article called um uh where did i i missed it oh here it is sorry james bennett um has an article called lightstar is worth a look and i was looking through our past history a little bit and it looks like um we've talked about lightstar but it's been a while so you brought up um this was earlier this year i think talking about rewriting court um or rewriting talk python in court and lightstar is one of the things you looked at right so that was episode that was back oh that was last year november of 2024 so he asked client hello that was a good one um so we haven't talked about it a bit um so i was taking a look at it uh looking at Litestar i had never played with this and there is some interesting history around that it used to be uh star light like or something like that yeah it was not star

08:21 let star light.

08:23 And there was confusion, whatever.

08:25 Anyway, so this is an interesting James Bennett brought up Litestar is worth a look.

08:31 And he brought up like a lot of people do, if I'm going to do an API, why not FastAPI?

08:36 I mean, that seems like the obvious choice now for setting up an API or something.

08:43 And or a lightweight web framework. So why not?

08:47 There are a few reasons that he brought up. So one things was in scaling and not scaling in traffic, but scaling in, I want more than one file. I want a bunch of, I want my application in a bunch of files. And there was some frustration that he talked about with trying to figure out how to do that within FastAPI because there's the app dot.

09:10 And how do you have multiple routings in different files if you have one app? I don't know if this is easy or not. But he had some frustrations that it took him 40 pages into the documentation to the user guide to find that. However, it's kind of built in with Litestar is that you don't, it's not a top level app. You can, you can set it up, I guess, into multi-file, multiple files easier is one, one thing. The other thing was that FastAPI is tied to Pydantic. And I don't know if you can break that or not but um lightstar is not tied directly to pydantic and you can use it can use yeah it can use pydantic but it also has other options yeah uh um he he brings up um maybe adders you could use adders for validation which um some people forget that that's one of the cool things about adders is it can validate things um or sequel alchemy even can do um some of that so um Or a little combination of both, I guess.

10:11 Anyway, so that's interesting.

10:14 If you'd rather use SQLAlchemy for that or adders, why not?

10:19 The third option, what is the third thing he brought up?

10:23 Is, I guess, just the architecture.

10:26 I had another note.

10:27 Anyway, it's interesting that there's another option out there.

10:32 So do you know more about Litestar?

10:35 I interviewed the guys from Litestar over on Talk Python, so I know a little bit more.

10:39 not a ton more i would say one thing kind of a mental model i have about Litestar and i'm not sure how accurate this is but you know it's mine so i gotta have it is fast api is kind of flask esque in that it gives you enough to be have a bunch of cool building blocks but then you pick you build the other pieces and so on whereas Litestar seems to me a little bit more of the django philosophy where it comes with a bunch of batteries included like see all those little boxes down there look at all like the different pieces right it's got middleware it's got data stores it's got multiple it's got ORM integration caching like a lot of those things don't come off in that sort of stuff don't come with fast api which is both a good and a bad thing right like if it comes with

11:25 it but it's not what you want then it's just a hassle to battle against all the time yeah but

11:29 that's how i sort of perceive Litestars it's it's like fast api with more options and like more stuff included.

11:37 - I know.

11:38 - It is interesting.

11:39 Yeah, it's definitely interesting.

11:40 - Yeah.

11:41 - All right, also, also interesting is our sponsor.

11:45 Sentry is back and I want to tell you about them.

11:48 So this episode is brought to you by Sentry, of course.

11:52 It's been incredibly valuable for tracking down errors in our web apps, other code that we run, that's web apps, APIs, even the Talk Python mobile apps use it and send in errors when something goes wrong for somebody in some far flung place in the world.

12:06 Ian, I've told you the story more than once about how at Talk Python, I learned one user was encountering a bug through Sentry.

12:13 I fixed the bug and I let them know before they contacted me.

12:16 It was pretty wild, right?

12:17 Yeah.

12:18 So how does this work?

12:19 I'll walk you through a few simple steps on how you might add error monitoring and distributed tracing through some kind of e-commerce app that's got a JavaScript front end, Flask back end.

12:31 So if it's Flask on the front, React, sorry, Flask on the back end, React on the front end.

12:36 You wanna make sure there's no errors during some checkout process for an e-commerce page.

12:41 For me, anytime money and payments are involved, I always get a little extra nervous writing that code.

12:45 So here's what you do.

12:46 You enable distributed tracing and error monitoring in both your Flask backend and your React frontend.

12:51 Then you want to add enough context to that frontend and backend action so they can be correlated.

12:57 And to do that, you enrich the spans, a Sentry concept with business context.

13:03 So in your React checkout, You wrap the submit handler in a start span and add information to that.

13:08 Then you want to see the requests.

13:09 You build a real-time Sentry dashboard.

13:11 You spin up one using span metrics to track key attributes, part size, checkout duration, and so on, giving you a single place to see both performance and error data.

13:21 That's it.

13:22 When an error happens, you open up the entry on the error on Sentry and you get end-to-end requests and error tracebacks and so on.

13:29 They also have a new product called Seer, which is C-E-E-R.

13:33 is a thing that looks at your app and uses LLMs to understand what's going wrong and possibly even suggesting, you know, here's actually what's causing that bug and it could even potentially do a PR and help you fix it, things like that. Really cool. So it's not just looking at the error, but even, you know, going further than that. So if your apps and your customers matter to you, you'll definitely want to set up Sentry like I have over at Talk Python and Python Bytes and so So visit pythonbytes.fm/sentry and use the code pythonbytes, all caps, just in a word.

14:03 That's pythonbytes.fm/sentry.

14:05 Use the code pythonbytes.

14:06 The link is in your podcast player show notes.

14:08 Thank you to Sentry for supporting the show.

14:10 Awesome.

14:10 Over to you, Ryan.

14:11 Yeah.

14:12 Sleeping on the job.

14:13 Sorry.

14:16 So for the next topic, I want to follow up from last week.

14:19 So just last week, I think it was last week.

14:22 Yeah.

14:23 444, Be Gone Python of Yore.

14:25 Two thirds of a beast.

14:28 That took me too long to figure that out.

14:31 So one of the things we talked about was an article called Stop Using Django's Squash Migrations.

14:37 And we had some feedback.

14:39 So from Bruno Alla said, hey, just a follow up and a plug for one of my own projects.

14:46 There is a project called Django Remake Migrations.

14:49 So that's really kind of what I want to talk about.

14:52 This looks pretty cool.

14:53 So it sort of does a lot of the stuff.

14:55 But one of the things that I like isn't just there's a tool that you can use to do a lot of this work for you.

15:00 You don't have to follow the step by step.

15:02 However, it's cool that it talked about the problem.

15:04 So it says a Django admin command.

15:08 There's a Django admin command to recreate all migrations in a project.

15:13 This new one is like squash migrations, but it's on steroids.

15:17 So it says the built in squash migrations command is great, but it only works on a single app at a time, which means that you need to run it for each app in your project and on a project with enough cross app dependencies that can be tricky.

15:30 Yeah, that sounds tricky.

15:31 So this command aims to solve this problem by recreating all the migration files in the whole project from scratch and mark them as applied by using the replaces attribute.

15:41 I don't know what that does, but there's some caveats like all migrations are marked as one as replaced once.

15:49 So I'm glad I'm using Git when I'm using any of this stuff so I could try it.

15:55 And if it doesn't work, roll it back.

15:57 But this looks pretty cool.

15:59 So I wanted to just shout out to people to maybe try this as well, if you want to try to remake your migrations easier.

16:09 While I was looking at this, I was like scrolling down, and it says the package was created with the copier template, and that rung a bell and it looked down and this was a while ago so michael brought up on this show talked about copier but that was back in 2021 so i'm going to go ahead and do a shout out to copier again because it looks pretty cool um copier is a is something like cookie cutter uh but it it's a cli app for rendering project templates but it looks kind of fun um uh so i'm going to check this out. I've got, I have some sort of project template needs coming up. And so I might take a look at this. They have a comparison too. So they're like, this is kind of like cookie cutter.

16:54 Yeah. They know it's kind of like cookie cutter. There's some differences here. They've got a table in the documentation. One of the things I kind of like is that the configuration files in YAML format instead of Jason for cookie cutter. I don't, I'm not really a fan of either, but if I got to handwrite stuff, I'd probably rather handwrite YAML files. So anyway, interesting to take a look

17:16 at. Nice. I think the biggest difference, other than I think being a little more maintained these days, is that it has, like with cookie cutter, you run a template, it generates a thing, and then you make changes to it, and that's it. With copier, you can apply, if there's a new version of the template, you can theoretically, at least, it has the option to try to apply a migration from the old version the new version.

17:41 Oh, that's cool.

17:42 Yeah, I think that's its biggest selling point.

17:44 Template updates, yeah.

17:46 That's actually awesome.

17:47 Yeah.

17:48 And it looks like it's composable too.

17:50 So you can like, if you might have different, like say for instance in a Django, you might have several applications that you would add.

17:58 You could use multiple copiers to pull an app, different apps into one application.

18:04 Right, add a CRM action or something, yeah.

18:07 Yeah, so interesting.

18:08 Very interesting indeed.

18:10 Cool.

18:11 All right.

18:11 On to the next one.

18:12 This is kind of like the Django show.

18:13 And one more Django shout out on top of this, by the way.

18:16 I'm going to be doing a happy birthday, happy 20th birthday Django panel with a bunch of the creators in an hour and a half, two hours from now.

18:26 Neat.

18:26 Now, if you're listening to the audio version, there's a good chance that's already over.

18:30 However, you can still either check out the live stream or in a few weeks, check out the Talk Python episode on it.

18:35 So keeping with that theme, Django Kronos.

18:39 This one's a quick little topic, but it's really cool.

18:42 So I want to know how fast my page is loading.

18:45 And I know there's the Django toolbar and all that, but here's a nice way to add more information about performance right into your browser.

18:53 So it's Django Middleware that shows you how fast your pages load right in your browser.

18:58 You simply add it as the first and last thing.

19:02 You know, the quick start says add it as your last installed app.

19:06 And it has a start and an end that has to be the first and last middleware.

19:10 So it gets the full picture of all the middleware actions and all that kind of thing.

19:15 I also would recommend saying probably show in production false, unless you really, really want to show in production, something like that.

19:24 But the idea is it just shows you how long did your middleware take to run?

19:27 How long did your view take to run?

19:29 How long did your SQL queries and commands take as part of the middleware, as part of the view?

19:35 And then how long did it take total?

19:37 And how many queries?

19:39 If you see the little screenshots of 7Q, 5Q, 12Q total, I'm guessing those are the number of queries.

19:44 One of the really big problems when you're working with ORMs, like Django has, but many, is they have lazy evaluation for relationships.

19:54 That can be tremendously slow because the programming model doesn't change if you do an eager query and join two things or you just use it.

20:02 It's really just about how the query was structured, not how you program against it.

20:05 So you might have, hey, I got a hundred things back from the list as one query, and then I loop over it and I interact with a field where each one of those is doing another query, a hundred more.

20:14 So 101 queries, hence they typically called the N plus one.

20:18 So you would see something like that.

20:19 You'd be like, whoa, the view is doing 107 queries.

20:22 I think I got two things, what's happening?

20:23 Well, N plus one, some version there probably.

20:26 Anyway, if this is interesting to you, It's not super big in terms of popularity, but it's also pretty straightforward and simple.

20:33 And yeah, people might like it.

20:35 - Remind me, where does the information pop up?

20:37 Is it in the browser when you're developing or something?

20:41 - I think it's at the bottom of the page.

20:43 I haven't installed it and tried it, but it's somewhere in the page as part of it.

20:47 - Okay.

20:48 - Yeah.

20:49 So basically, I believe what it does, it actually gives your template, your Django template, these pieces of information and you show them how you want.

20:57 So it gives you middleware CPU time, SQL time, view, count total time.

21:02 Basically the stuff that was on the screen.

21:04 So you can put it in.

21:05 It provides it as data values, and then you would put it into your view as you see fit.

21:10 Right.

21:10 I believe that's how it works.

21:11 Okay.

21:12 Cool.

21:12 That's neat.

21:14 Indeed.

21:14 Well, those are our topics.

21:17 I have a little bit of an extra.

21:20 Go for it.

21:21 All right.

21:23 I'm going to go back in time a little bit.

21:24 And so Test and Code is a podcast I started in August of 2015.

21:31 So it's August.

21:32 So it's now, it's August 20.

21:35 It's almost two days.

21:36 In two days, it'll be like 10 years.

21:39 I think that's enough.

21:40 I'm looking at like episode two.

21:42 Episode one was terrible.

21:43 So I deleted it a long time ago.

21:45 So episode two is a pytest versus UnitTest versus Nose.

21:48 And I didn't even capitalize pytest correctly.

21:51 That's bad.

21:52 And Nose is just, if I were to redo this, it would just say, don't, just pick by test.

21:59 There's one option, really.

22:00 Anyway, unit test is fine also, but let's get real.

22:04 Don't use Nose.

22:06 So what is this?

22:07 Why am I bringing this up?

22:08 Well, I just released on Friday, episode 238, So Long and Thanks for All the Fish, where I announced that I am no longer doing testing code.

22:17 So closing the book on that chapter.

22:19 I listened to that episode and yeah, I think what I'll say is congratulations.

22:24 10 years and 238 episodes is quite a run and those things will be around.

22:29 People can listen to them and enjoy them.

22:31 Yeah.

22:31 So that's another thing is I'm seeing.

22:34 I'm not sure how long I'll leave it live because podcast hosting is something you have to pay for.

22:40 So I am.

22:42 You know what?

22:42 I say you take it, write a little web scraper and just generate a static site and just leave it there.

22:48 that's not something I might be able to give you work how about that actually so that yeah but the

22:55 point was to remove work from my plate but you know we'll see all right can't leave that up in the air um all right what you got for us do you have any extras yes I have some extras let me get it ready

23:07 so we have python 3 13 6 big question will this be the final 3 13 before 3 14 probably not but It's plausible, right?

23:19 We're talking October, which is sadly not that far away.

23:23 Not ready for rain.

23:24 Not ready for it.

23:26 Anyway, 3.13.6 is out.

23:28 And there's actually a lot of changes.

23:30 If you flip through the library, I don't know how many pages that is, but we're talking a lot of pages.

23:36 So there's actually a ton of changes here that you might want to check out, you know, like little security fixes and other stuff.

23:42 Does it have that zip?

23:44 There was some kind of zip issue where you could trick it into do.

23:50 And I don't think that was in Python.

23:51 I think that was in pip.

23:53 And uv also had it.

23:55 So update your uv, by the way, folks, as well, which is uv self-update.

23:59 Easy enough.

23:59 Anyway, this is out.

24:00 Because of our sweet Docker setup, I just did a rebuild on Python Bytes.m.

24:05 And it said uv install Python.

24:07 And we have 3.13.6 powering everything all of a sudden.

24:11 Very nice.

24:12 Anyway, quick and easy.

24:13 Yeah.

24:13 on top of that the final 13 the final countdown i was just listening to that song uh i have this

24:19 really cool script and i think this is kind of it's kind of interesting and please don't write me and tell me other things are out there that do this because i know there are some that sort of do this but it's interesting in and of itself but it's also interesting as we get better and better llm and agentic coding tools i just say instead of just like depending on something that has 100 features and I'm going to take one or two of them and then deal with that. I just want this one thing. Could I just ask to have that one thing created? The answer is probably yes. So I wanted something that would auto activate Python virtual environments built with uv, named like I like, exactly as I navigate around my shell. So I asked Claude, I think, something like that. And it said, sure, here's a cool little bash script that as you enter a folder that either itself has a virtual environment or somewhere up in the higher hierarchy of it as a virtual environment it'll just activate it and if you leave that portion of the directory tree it'll go back and unactivate it and i know that dur env does some things along these lines but like i said i just like i think it's really cool you can just say really all that needs to be is like 35 lines of bash and then it never changes so i put up i decided someone was like oh that's really cool is that happening i'm like i'll just

25:31 put that up as a gist and people can check it out i like it also something small that you can change if it's not quite what you want, change it.

25:40 Exactly.

25:40 I'm not looking for something that solves every problem for every programming language

25:44 in the most.

25:45 I just want this one little feature.

25:48 And I don't really, to be honest, I don't know enough Bash to do this really well.

25:53 But guess what?

25:54 Either chat or cloud sure knows it.

25:55 And it took care of it.

25:57 So I'm really enjoying that.

25:58 Yeah, I'm totally going to use this, although I'm going to change venv to.venv because Brett - The Canon convinced me that the dot is good.

26:06 - I got tons of respect for Brett, but not my thing.

26:10 I want to be able to look either via LS or in the macOS Finder and see that it has a virtual environment.

26:18 And you can if it's a dot, right?

26:19 So anyway, fair enough.

26:21 I want to be able to look at it and go, yep, it absolutely has a virtual environment, right?

26:25 'Cause that tells me what my next action needs to be.

26:28 All right, I just, I spent a long time this summer writing up this huge long post.

26:32 I don't know if it'll actually tell us how many minutes of reading time it is, if I ask.

26:37 24 to 34 minutes of reading time for this article that I wrote.

26:41 Okay.

26:41 And it's called The State of Python 2025.

26:45 I wrote this in partnership with JetBrains.

26:47 And it takes the PSF JetBrains survey results and does like a ton of analysis on it and predictions and concrete actions people could take based on the trends that we're seeing and so on.

27:00 So I'll put that here now.

27:01 I think I might make this one of next week's items and we can dive into some of the trends and recommendations and you can tell me how I'm wrong or right.

27:10 But it just came out this morning, so I thought I'd go ahead and just throw it out there as an extra for now.

27:14 Cool.

27:15 Yeah.

27:15 Next, if you run local LLMs, as I do, and there's a really interesting option, you can now run OpenAI's.

27:25 Well, first of all, hey, guess what?

27:26 OpenAI has a public open weights model you can use and you can run it locally.

27:31 So I'm running here in LM studio in developer mode and programming against the GPT OSS 20 billion parameter model.

27:40 How cool is that?

27:40 That's pretty cool.

27:41 Yeah.

27:41 So I have some, maybe, I don't know.

27:43 It's super cool.

27:44 I have some other things that I created, like little utilities.

27:47 I'm like, Hey, I want this utility to work and it needs an LM.

27:50 And I knocked it out real quick in combo with some agentic coding.

27:54 And it was using when, which was pretty good.

27:57 But then when this came out, I'm like, let me try this and see if it'll give me better answers.

28:01 Sure enough.

28:01 So now I'm just running this locally on my Mac mini and talking to it.

28:04 And it's pretty good.

28:06 So that's a cool option.

28:06 You run it in Olama or other places as well.

28:09 And finally, just remind people that we just released the Just Enough Python for Data Scientists course for $29 over at Talk Python.

28:18 So you're getting started in your data science journey or you feel like you've been doing it for a long time, but you just don't quite have the software engineering techniques and tools and so on.

28:27 Check this out.

28:28 Just talkpython.fm.

28:29 Click on courses.

28:30 Be right there.

28:31 That's it from extras.

28:32 Awesome.

28:33 That's all over extras.

28:34 Do we have, do you have something funny for us?

28:36 I have a quick follow-up before we do from Pat Decker says, I saw your post on Blue Sky.

28:40 Listen to 238.

28:41 I agree with Michael.

28:42 Congratulations on 10 years, Brian.

28:44 Thank you.

28:45 Thanks, Pat.

28:46 Indeed.

28:46 Okay.

28:47 Yes, we have a joke.

28:48 Let's check it out.

28:48 This one, you know, people don't like if I, they don't like generally when, when one language bashes on another.

28:54 Well, some of them do, but not, not generally.

28:56 So keep folks, before I show you this joke, it's supposed to be lighthearted.

29:00 Please don't, Don't email us, tell me.

29:02 So the joke is, Python is better than Java, says someone.

29:06 Another person says, prove it.

29:08 So the original person fires up Python, creates two strings, one named Python, one named Java, and then asks, as writing in the interpreter, Python greater than Java as strings?

29:20 True.

29:20 True, says Python.

29:22 It's greater.

29:23 Yeah, sure.

29:25 Truth.

29:26 It's true.

29:27 There you have it.

29:27 Anyway, I just thought that was funny.

29:29 Yeah.

29:29 It's too bad that Python doesn't have a better operator.

29:32 Not necessarily greater, but just better.

29:34 Exactly.

29:36 Well, there it is.

29:38 Yeah, that's the joke.

29:39 All right.

29:40 Cool.

29:40 Well, thanks again.

29:42 Thanks, everybody, for listening.

29:43 And see you next time.

29:44 Yep.

29:45 See you later.

29:45 Bye, all.


Want to go deeper? Check our projects