Transcript #409: We've moved to Hetzner write-up
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:04 This is episode 409, recorded November 13th, 2024.
00:11 And I'm Brian Okken.
00:12 And I'm Michael Kennedy.
00:13 And this episode, we've got a couple sponsors, Scout APM and Codeium.
00:18 Thank you both of them and listen to their spots later in the show.
00:22 If you'd like to connect with us, connect on Fostadon.org.
00:26 We're M. Kennedy, Brian Okken, and Python Bytes.
00:29 But any Mastodon client gets to us.
00:32 And now also Blue Sky.
00:35 So I'm trying out Blue Sky.
00:37 So we'll drop a link to that as well.
00:39 And if you're listening to this in a podcast player, you can join us live sometime on YouTube at pythonbytes.fm/live.
00:50 And no need to jot down notes while you're listening, because you can just sign up to be a friend of the show and sign up for our newsletter.
00:59 And we will send all the links to you into your inbox every week.
01:02 That's right.
01:03 The Bytes come to you.
01:04 You don't have to come to them.
01:05 Yeah, exactly.
01:06 So I like to, I think we should jump into the terminal this week a little bit.
01:13 Yeah.
01:13 What do you think?
01:14 We absolutely should jump into the terminal.
01:16 And I just want to point out, I got a lot of stuff to cover.
01:18 I'm on my third cup of coffee, and it's 730 in the morning.
01:22 Let's go.
01:22 We'll start with something from Will McCoogan.
01:25 It's been a while since we've spoken about rich and textual, but the drought is over.
01:29 Folks, the drought is over.
01:31 This is something I saw Will throw out as a proof of concept.
01:35 Okay.
01:36 Have you seen this, Brian?
01:37 No.
01:38 So it's pretty cool.
01:39 Imagine, if you will, as I have actually been.
01:43 If you will.
01:46 Imagine, if you will, that you are SSH'd into your server for a lot of the recent days working on something.
01:54 Hang on.
01:55 You know, you've got tree, which is a command that will show sort of a hierarchical view of things.
02:01 But wouldn't it be nice if there was something kind of graphical that you could use to explore and interact with the file system?
02:08 Yeah.
02:09 A little bit like Mac Finder or something like Windows Explorer?
02:12 Well, that is what this terminal tree is.
02:14 So the idea here is, well, I didn't like that.
02:17 So the idea is that you run this in the shell and it gives you a tree-like view of, here we go, that's a better one.
02:27 It gives you a tree-like view that you can explore with your keyboard.
02:31 It also says mouse.
02:32 I don't think that works on Linux, but it works, it seems to work on macOS.
02:36 Anyway, maybe with your mouse, certainly with your keyboard, that you can sort of open up the tree and go around.
02:42 You can find a file, you can hit P to preview it in a little side tab thing, like side by side with the tree.
02:49 You can jump from different roots of this tree by just hitting G and then typing directory, you know, slash apps, enter.
02:56 And then you're just exploring whatever your apps folder is or whatever.
02:59 What do you think?
03:00 I think this looks pretty nice, actually.
03:02 Pretty great.
03:04 Yeah, I was using it over SSH and it's pretty nice.
03:06 Now, to be clear, it is a, where does it say this?
03:10 I don't know.
03:10 Will says, I don't know if this will become a standalone tool or folded back into textual or nothing.
03:15 But here, if you're interested, fork it, play with it, let me know.
03:18 The one thing I was talking to Will about when I saw this was, wow, wouldn't it be cool to be able to specify a starting directory?
03:26 Like, create me a tree of this place.
03:27 Right now, it just jumps into your home directory and then you've got to navigate from there.
03:31 Also, hat tip to, hey, let's run this using UV with a zero install, zero download.
03:38 You don't even download textual or this file or anything.
03:42 You just run UVX from the Git repo and you specify a Python version.
03:47 I suppose you could probably drop that, actually.
03:49 And then the dash Q so it doesn't output all the, hey, we're creating a virtual environment and all that.
03:53 Oh, nice.
03:54 Right?
03:54 That's the terminal tree's entry point to this package.
03:57 So, yeah, I think if you're looking for a quick way to explore your file system over SSH, this is pretty nice.
04:05 Or even in the terminal on your own machine.
04:07 Although I find that, you know, some people I'm sure would love that.
04:09 It's not how I roll.
04:10 I just use binder or an IDE or whatever it is that I'm working with there.
04:15 But over SSH, this is handy.
04:17 Nice.
04:17 Cool.
04:18 Mm-hmm.
04:19 All right.
04:19 I actually love all the terminal apps or the textual apps.
04:23 Yeah, there's a lot of good ones.
04:25 Yeah.
04:25 I feel like we might be heading in that direction again.
04:29 Yeah.
04:29 So another recent find around textual is this beautiful API client called Posting.
04:40 And I got this from Darren Burns.
04:42 And actually, it's his project, Darren Burns.
04:45 And isn't he part of the textual team?
04:47 I think so.
04:48 If not, my memory is serving me incorrectly.
04:51 But okay.
04:52 So this is a gorgeous client.
04:56 And it's an open source terminal app.
05:00 And it's all color coded.
05:01 And you've got colorization for the output.
05:04 On the left-hand side, you've got collections, which is cool.
05:08 You can hide that as well.
05:10 But different ways, like if you're jumping to different APIs, like if you're trying different APIs out, you can have them up in different collections.
05:17 But I started this quickly.
05:23 So I'll give it a shot.
05:23 So I went down and said, get started.
05:26 And similar to like you said, the top installation instructions were to use UVTool.
05:34 So that's UVTool is, and I'm using it now on lots of things.
05:39 I think it's a little easier than PIPX.
05:42 So that's what I'm using.
05:44 So UVTool install, Python 312, posting.
05:47 And posting will get you started with this.
05:51 And I really loved, I'm just going to go back to the main homepage because it has a lot of the stuff I wanted to talk about.
05:57 It's a beautiful interface.
05:59 I was trying it out with the mouse, actually.
06:02 I'm on a Mac.
06:03 And using the mouse worked great.
06:05 I tried some of the keyboard shortcuts, too.
06:07 There's keyboard shortcuts at the bottom.
06:08 And then the documentation has more that you can just show you how to jump around.
06:12 So it is designed to have some quick workflows to work around like testing an API.
06:23 And it works over, since it's termed textual, works over SSH.
06:28 It saves stuff.
06:29 So when you interact with it, it saves all of your interactions.
06:32 And you can save it to a file.
06:35 And it's a version control friendly file.
06:37 So it's something you can diff and stuff if you want to do it a couple times and see how things are different.
06:43 One of the things I loved about this is when I've tested APIs before, sometimes I've got a whole bunch of header stuff that I need to stuff into an API
06:51 to just get it working.
06:54 So manual things like, oh, I forget that other one, the manual stuff that you can jump around and manually fill things out.
07:03 It's a little difficult.
07:04 But this one has the ability.
07:06 Are we thinking postman?
07:07 Yeah, stuff like that.
07:09 And it's great for things that you don't have to fill in a bunch of header stuff for a post or for a query.
07:15 But if you do, this will work great because it's got scripting capabilities where you can run some Python code before and after and or after a request to prepare the headers,
07:26 set variables and stuff to get your post ready.
07:31 And this is just excellent.
07:32 I'm going to be using this all the time.
07:35 The colors are gorgeous.
07:37 Love the syntax highlighting.
07:38 It's configurable.
07:40 The key maps customize.
07:42 You can even customize the key binding if the ones that they've chosen for you don't work that way.
07:46 That's pretty cool.
07:48 But just an excellent little command thing or a terminal application for testing your APIs.
07:55 Yeah.
07:55 This is one of the more full-featured textual apps I've seen.
08:00 This is great.
08:01 Yeah.
08:01 So we get from Liz in the audience.
08:04 I love this thing.
08:06 I've been wanting to replace Postman for a while.
08:09 Nice.
08:09 Yeah.
08:10 I was just in Postman today.
08:12 But I don't want to tell you about Postman, Brian.
08:14 I want to talk about Scout.
08:16 Let me tell you real quick about Scout APM.
08:20 They're big supporters of Python Bytes.
08:22 So we appreciate that very much.
08:24 So if you are tired of spending hours trying to find the root cause of issues impacting your performance,
08:30 then you owe it to yourself to check out Scout APM.
08:33 They're a leading Python application performance monitoring tool, APM, that helps you identify and solve performance abnormalities faster and easier.
08:42 Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs, and the dreaded N plus one queries that you can end up if you do lazy loading in your ORM.
08:53 And then you say, oh, no, why is it so slow?
08:55 Why are you doing 200 database queries for what should be one?
08:57 So you can find out things like that.
08:59 And it links it back directly to source code.
09:01 So you can spend less time in the debugger and peeling logs and just finding the problems and moving on.
09:06 And you'll love it because it's built for developers by developers.
09:09 It makes it easy to get set up.
09:11 Seriously, you can do it in less than four minutes.
09:13 So that's awesome.
09:14 And the best part is the pricing is straightforward.
09:17 You only pay for the data that you use with no hidden overage fees or per seat pricing.
09:23 And I just learned this, Brian.
09:25 They also have they provide the pro version for free to all open source projects.
09:30 So if you're an open source maintainer and you want to have Scout APM for that project, just shoot them a message or something on their pricing page about that.
09:37 So you can start your free trial and get instant insights today.
09:41 Visit pythonbytes.fm/Scout.
09:44 The link is in your podcast player show notes as well.
09:46 And please use that link.
09:48 Don't just search for them because otherwise they don't think you came from us.
09:51 And then they'd stop supporting the show.
09:53 So please use our link pythonbytes.fm/Scout.
09:56 Check them out.
09:56 It really supports the show.
09:58 All right.
10:00 Next up, Brian.
10:02 It's good I had a lot of coffee because this there was almost a first after eight years, nine years, eight years of the show.
10:11 How long it's been going on.
10:12 We just had our birthday last week, by the way.
10:14 After that, we've never had a straight run of extra, extra, extra as all of the topics.
10:20 I almost have too many topics that I had to have two extra, extra, extras, but they're quick.
10:24 So are you ready?
10:26 All right.
10:26 Here we go.
10:27 First of all, we have our getting started with NLP and Spacey in Jupyter Notebooks course.
10:31 This one is awesome.
10:34 If you do anything with Spacey or anything with text and you want to parse it with Python, Spacey is a great option.
10:42 And Vincent Morberdam, who used to work at Explosion, actually wrote this course.
10:47 So why am I telling you about that?
10:48 Because over at Google Forms here, we're doing a Spacey swag giveaway.
10:55 So they have a Spacey course with illustrated how-to books and all sorts of other cool things that you can get around Spacey.
11:01 So Ines Montani gave us some codes to give away for people who are interested in that.
11:07 So I put a link.
11:08 All you got to do is give us your name and email so that we can find you and give you the code if you want.
11:14 So check that out.
11:15 Links in the show notes, obviously.
11:17 A couple of articles I wrote, Brian, maybe three.
11:20 I've been writing a lot last week.
11:22 One is I wrote something opposite of cloud native is.
11:25 Trying a little bit of a pushback against how many managed services can you have?
11:31 Well, let's use Kubernetes.
11:32 Oh, and with Kubernetes, it's hard to see the logs.
11:35 So we're going to need log aggregation.
11:36 And then with log aggregation, we're going to need some log monitoring.
11:38 And then on and on, it just builds until you've got this super complicated thing.
11:43 And so this article is kind of an homage to, can we just go back to something simple?
11:47 That will work for tons of people, I think.
11:50 So I'm proposing the idea of stack native, like just enough technology to make what you need your web app or your API or whatever to run, not something that'll tie you so deeply into all the hyperscale clouds that you end up with a $100,000 bill, but no idea how to move away from it.
12:07 I almost covered this as one of my topics.
12:10 This is a great article.
12:10 Did you?
12:11 Oh, thank you so much.
12:12 That's awesome.
12:12 Yeah, this is a really, really fun one.
12:15 Related, I also wrote, and I talked about it last time, but I wrote this up that we, Python Bytes, Talk Python, Talk Python Training, all the APIs, et cetera, et cetera, in like a broad sense, have moved to Hetzner.
12:26 Remember, I talked about how Hetzner was really interesting and appealing.
12:29 And hey, I took the plunge, bought us a, I splurged, Brian.
12:34 I went for the big VM, the big machine.
12:36 Okay.
12:36 Eight virtual CPUs, 16 gigs for a whopping $25 a month.
12:42 That is $112 at DigitalOcean, $205 at AWS, and $320 a month on Azure.
12:49 Same machine.
12:50 Okay.
12:50 And if you look, the performance, people are saying, well, it was probably cheaper because it's like from 20 years ago or something.
12:55 CPU performance, 1.2 times faster than DigitalOcean's $112 version.
13:00 And the bandwidth is eight times more, 20 gigabit bandwidth versus two for 25 bucks.
13:07 So anyway, this is really, really excellent.
13:10 And talked a lot about that.
13:12 So another thing I did is I created, I was on vacation for four days, long weekend.
13:18 So I decided to create a package for Chameleon and Flask.
13:23 Chameleon, the web templating language.
13:25 Flask, you know what Flask is.
13:26 Yeah.
13:26 Usually it uses Jinja.
13:28 I don't like Jinja very much.
13:29 I think it's too much Python and not enough pure web, not like view or other things where you just have little attributes.
13:35 Chameleon is like that.
13:36 I like it a lot.
13:37 Plus, I have a whole ton of Chameleon templates I don't want to mess with, but I want to do some Flask things with some of that base.
13:42 So I created a package that if you just put a decorator onto either a async or a regular non-synchronous view method in Flask, it will, when you return a dictionary, it'll use that dictionary to render the Chameleon template.
13:57 It's pretty awesome.
13:58 That's neat.
13:59 And if anyone wants a really cool example, there's some of these that have existed before, but they were super simplistic.
14:07 Like, okay, so technically the Chameleon engine is set up, but then you have to do every view.
14:12 You've got to do all the manual steps to actually render it, or it only works with synchronous functions and not async.
14:18 So here's a decorator that looks and sees if it's decorating an asynchronous or asynchronous function and creates a different wrapper behavior.
14:27 So the wrapper itself is async or not async, depending on which it covers here.
14:30 So if people are trying to write something regardless of whether it's web or not that can handle both sync and async, here's a little example for them.
14:37 Okay.
14:37 All right.
14:38 Next, also released a new version of ListMonk, the email API client for Python.
14:47 I think I have this guy's name, Ron.
14:50 Thank you.
14:50 Ron Hudson did a bunch of work for adding new features to that.
14:53 So that is out.
14:55 Also, you're still on zero over.
14:56 What's up with that?
14:57 Well, it's only been out a couple of days.
15:00 Okay.
15:00 I feel like I should give it a week.
15:02 I'm just now rewriting.
15:04 I've been doing a bunch of work the last day to use that to convert something into Flask.
15:09 I'll talk more about that later.
15:10 And there's been like little tiny issues.
15:12 I want to get it a little bit more.
15:14 I want to test it for a week before I give it a non-zero over.
15:16 Come on.
15:16 Okay.
15:17 Okay.
15:17 That's fine.
15:18 Okay.
15:18 Yeah.
15:19 Oh, and Ron is out in the audience.
15:21 Hey, Ron.
15:21 Awesome.
15:22 Thank you, man.
15:23 Thanks for the help.
15:23 Okay.
15:24 So on here to TOB.
15:27 We all know the TOB, TOB Index.
15:29 There was big news.
15:29 Hey, Python's number one.
15:31 Hooray.
15:31 In this other way, right?
15:32 We just talked about GitHub last week.
15:34 And TOB, this is not news that Python is number one.
15:37 But it was updated for year over year in November.
15:40 And I just noticed, look at the numbers here.
15:43 Python is not just number one over C++, then over Java, over C.
15:47 It's over two times as popular and has a almost 9% year over year growth.
15:54 Whereas number two, C++ has 0.3%.
15:57 And Java is 1%.
15:59 And C is negative 3%.
16:01 C Sharp has negative 3%.
16:02 So not only is it number one, it's double.
16:04 And it's growing many times faster than anything else on the list, including Rust.
16:08 That's amazing.
16:09 So I'm not sure if we should really bet our careers on these toy languages yet.
16:14 But you know, you guys do you.
16:15 Okay.
16:15 I'm betting my career on it, baby.
16:19 A little late.
16:20 So update on PEP 750 being spearheaded by Paul Everett and others.
16:27 I just talked about Jinja versus Chameleon.
16:30 Yeah.
16:31 But these are all external packages that have their own parsers, their own behaviors.
16:35 And wouldn't it be nice if Python itself had a type of a template language?
16:40 Maybe.
16:41 Sure.
16:42 Maybe.
16:42 Well, I mean, we have f-strings.
16:43 We do have f-strings.
16:46 But when you're doing things in, say, I want to create the content of an HTML page in memory.
16:52 Yeah.
16:53 As part of some action, right?
16:55 A lot of people say, well, I guess we could run, like, set up the Jinja engine or whatever.
16:58 So this PEP 750, which is in draft mode currently, targeting 314, is trying to bring some modern version that's like f-strings into Python.
17:09 So this is interesting.
17:11 Yeah.
17:11 Coming along.
17:11 Progress is happening there.
17:12 Cool.
17:14 Switched over to Canary email, Brian.
17:17 I got so sick of Spark and all of their, hey, we're only focused on building AI features.
17:23 Even though Canary says it's your AI email copilot, they actually seem to be working on features that are not just AI, even though that's what their landing page seems to say.
17:34 So that's an interesting experiment I'm running, but not as interesting as a couple others that are coming up.
17:40 Omnivore.
17:41 Remember I told you they're shutting down and deleting everybody's account?
17:44 Yeah.
17:45 All right.
17:45 So I thought, well, let me go back to Pocket.
17:48 Pocket supports Firefox because it's owned by Mozilla.
17:51 That's kind of cool.
17:52 And I had a paid account to them.
17:54 So that's great.
17:55 And then I realized that Pocket kind of represents everything that's wrong with Mozilla on a broader scale.
18:00 And it made me sad.
18:02 So, for example, I told you I just took this four-day trip.
18:04 I'd like to take some things and take it with me and maybe read it on the plane or at the beach or wherever.
18:11 Yeah.
18:11 Pocket has been around for 10 years.
18:13 They were acquired by Mozilla in 2017, I believe it was.
18:18 They don't even support offline mode.
18:20 You can't even read the text offline like an e-book.
18:24 It's like acquired in 2017, put on the shelf, worked on other random things that have nothing to do with Firefox
18:31 or other things they're selling, right?
18:33 Anyway, made me sad.
18:34 Went through a whole bunch of different other things.
18:37 I'm back at Instapaper.
18:38 Instapaper is actually really great.
18:39 The only thing it's not great at is read it to me, which is what Omnivore was so perfect at.
18:43 But, you know, they're dead.
18:45 So I will not speak of them ever again.
18:47 Anyway, Instapaper is actually pretty awesome these days.
18:49 So I know a lot of people are talking to me on Mastodon and other places.
18:53 That's where it's at.
18:54 So other people are saying they like it or don't like it?
18:58 Well, no one really mentioned Instapaper one way or the other, but there's good links.
19:03 There's Readwise.
19:05 There's like a bunch of other premium paid ones that are just, they're not that great, but they're expensive, like $100 a year expensive.
19:13 So I don't know.
19:14 I tried them.
19:16 So I started, I used Instapaper a long time ago and I don't remember why I stopped.
19:20 I don't remember why I stopped either.
19:22 But, well, I know I would switch to Omnivore because it was awesome, but it's gone.
19:26 So say la vie.
19:27 Anyway, onward and upward.
19:30 If you are feeling the open source self-hosted world, there's Hoarder.
19:33 I mean, who doesn't want to be a hoarder, Brian?
19:35 But this is really awesome.
19:37 It's kind of a save your links and notes and articles and then let locally running AI tag them and group them.
19:44 And this thing just, it's a Docker run, open source.
19:47 It's pretty awesome.
19:48 But I do not need more self-hosted things to babysit and backup.
19:52 So not messing with it.
19:53 But people, they really want, this looks pretty neat.
19:56 All right.
19:57 We're getting close to the end.
19:58 I promise.
19:58 Yeah, this is the last one.
19:59 So have you heard about the Arc browser?
20:02 No.
20:03 Super minimalist wrapper around Chrome like Vivaldi, but it's all about like reimagining the web.
20:09 And it's, you don't even see the address bar.
20:12 You just hit a command palette and then you type the, type the address you want.
20:16 And it's just, it's magic.
20:18 And well, if you wanted to, I don't know, take the, the most extreme caricature of a Silicon Valley bro, the person running Arc is that.
20:28 Okay.
20:29 There's some amazing, there's some amazing videos in like a cringy way of.
20:34 So they made Arc and it became incredibly popular amongst the people who liked it.
20:38 Like it was going really, really, you know, the adoption was going very fast.
20:41 And they decided we want to build a browser.
20:43 It's really based in AI and you don't even need to tell it what you want to do.
20:47 It just browses the web for you.
20:48 You're just with it.
20:49 Like seriously, that's their new project.
20:51 And they're kind of like, oh, we're done with this Arc thing.
20:53 We're going to go build something that browses the web for you.
20:55 So a bunch of people are like, ah, what is there?
20:57 Well, it turns out that someone, some group was working on this thing called the Zen browser.
21:02 Now I knocked on Mozilla before.
21:05 This is based on Firefox and it's awesome.
21:07 Okay.
21:08 Okay.
21:09 So this is a super minimalist wrapper that gives you a really clean, nice, just let me see the web.
21:15 You know, Chrome was called Chrome because it literally maybe should be anti-Chrome.
21:18 It took away the window Chrome, all the junk that used to be around all the toolbars and buttons and everything.
21:24 And it minimalized it.
21:26 But this is, you know, the next version of that.
21:29 And it's super neat.
21:31 So in fact, that's what I'm running right here.
21:34 And you can see all the things.
21:36 You can see the little tab bar on the side, but you don't even have to have that there.
21:39 Isn't this nice?
21:40 Sure.
21:41 It's cool.
21:41 So anyway, I'm giving this a try.
21:43 It's quite promising.
21:45 The people working on it are releasing versions a couple times a week.
21:49 So it says alpha, but it's working pretty well.
21:51 So anyway.
21:52 I do want to shout out like one of the features of the Arc browser is that whenever you look at a picture of an animal, you see two.
21:57 Yeah, exactly.
21:59 Of course, because how else are they going to go on the Arc?
22:03 Yeah.
22:04 They're not allowed in if there's just one picture of them.
22:06 Yeah, that's pretty good.
22:07 Okay.
22:08 So I recommend zen-browser.app.
22:10 It's pretty awesome.
22:11 Right now, it doesn't have a built-in ad blocker.
22:14 And if you go to a site that's got a bunch of ads and you somehow block them with, say, DNS or whatever, they'll leave big gaping holes, as did Arc, unlike Vivaldi, which takes them away.
22:24 But I talked to the Zen browser people, and they said that they are very soon releasing a feature that cleans up the pages.
22:30 So it's not just pages with holes where these would be ads, but a clean page.
22:33 So anyway, if you're wondering about that, that is coming.
22:35 I'm still pretty happy with Vivaldi, but you can go for it.
22:40 I'm experimenting, but I'm also still a big fan of Vivaldi.
22:43 So this does have the drawbacks that Firefox itself has in the sense that certain pages don't behave as well based on Firefox, right?
22:51 Because it's really Firefox at the core or Gecko or whatever they call the rendering engine these days.
22:55 Okay.
22:56 All right.
22:56 Over to you for your final item.
22:59 Yeah.
23:01 So for my final item, I wanted to talk about UV.
23:04 Because we actually talked about UV twice at the beginning of the show, talking about how UV install or UV tool install works like Pipex.
23:14 But there's an article from Jeff Triplett saying, UV does everything or enough that I'm not sure what else it needs to do.
23:23 This is a great title because that's how I feel.
23:25 I mean, UV is, it's kind of refreshing that I need to forget about a lot of things.
23:32 And these other projects are still great, but it solves so many problems.
23:37 I'm just going to read here.
23:38 UV feels like one of those old infomercials where it solves everything, which is where we have landed in the Python world.
23:45 Like it slices, dices at Julian's.
23:48 So I've had several discussions with friends about UV.
23:52 And even when we talk about it during my weekly-ish office hours, the list has grown.
23:59 And it starts to sound like not just what can it do, but it's a shorter list to say what it cannot do.
24:05 So let's just come up with some.
24:06 He has a list of things that I think are great of how it's replaced things.
24:10 So UV pip install replaces pip install.
24:13 Not completely, but yes.
24:15 Yeah.
24:17 I am now using that almost exclusively.
24:19 UV venv replaces the Python-m venv.
24:24 And I'm using that wherever I can.
24:27 So yep, using that.
24:29 UV pip compile replaces pip tools compile.
24:32 UV pip sync replaces pip tool sync.
24:35 UV run replaces pip x.
24:37 UV tool run replaces pip x.
24:40 And like we talked before, UV tool install does the installation of tools as well.
24:45 UV Python, actually, we covered that on the show.
24:50 But I haven't really been using that very much because I use virtual environments.
24:54 And a virtual environment just installs Python for me if it's not there.
24:59 So that's what I've been doing.
25:01 Yeah, it's super awesome.
25:02 I don't find I use it very much locally.
25:04 But I do use it in Docker when I got to get Python into a Docker image.
25:08 It's a nice way to do that.
25:09 Yeah, cool.
25:10 UV build, which was new to me, or I forgot about it.
25:16 We'll build your package for PyPI.
25:19 And UV publish publishes it.
25:22 I just, you know, I told you I published those two packages, the chameleon-flask and then the list monk one.
25:27 Yeah.
25:28 Both of those, UV build, UV publish.
25:30 Perfect.
25:31 And what I find is I'm using these like on new packages.
25:35 I'll do UV.
25:36 I'll do build and publish until I get the, workflows going.
25:40 Because after a package is, you know, around for a little bit, then I do a GitHub workflow
25:45 that will just do a build and publish on with a version.
25:50 When I push a version, it does that for me.
25:52 So.
25:53 Nice.
25:54 So there's that.
25:54 And then we talked about this GitHub Actions with setup UV.
26:01 Is there Astral has a setup UV for bringing UV into GitHub Actions to make that faster?
26:07 And then there's a Docker thing.
26:10 Bringing UV and Python to Docker.
26:13 Have you used this?
26:14 Have we talked about this already?
26:15 No.
26:15 I believe it uses multi-layer Docker builds where you have a build image and then you have the destination image and it gets that one and it copies it into the actual running image.
26:26 But I have a base image that just does the curl install and it barely ever updates.
26:32 So it just, it's fine for me to just do it that way.
26:34 I haven't messed with this.
26:35 And so I liked the idea where poetry was going a while ago with trying to have like kind of a unified project feel for, you know, to have these project files.
26:48 But I wasn't ready for it then.
26:51 But now that I've converted everything to pyproject.toml, having that as my project file makes sense.
26:57 And UV does, has add, remove, sync, and lock that do things that are project related.
27:04 So adding a dependency to a project, removing.
27:07 So it'll add, add to pyproject.toml, remove, sync.
27:13 And I'm actually finding I'm using this a lot.
27:16 So I'll, I'll create a, so I'll clone a project, create a virtual environment and do UV sync.
27:23 And it installs everything that's in the, in the, in the project.toml or requirements file.
27:28 Sweet.
27:29 So UV sync is awesome.
27:31 Yeah.
27:32 So then he talks about what is it, what does it not do?
27:34 And does it run custom scripts defined in your project.toml?
27:40 Oh, okay.
27:41 There's a few things it doesn't do.
27:43 It doesn't manage bumper and bump versions like bumper.
27:47 There's so many ways that people do versions of it.
27:50 You know, do you, do you have a bumper sort of a thing that you use, Michael?
27:54 Because I, I used to, I used to use a couple, but, but they were more complicated.
28:00 I mean, it was just an extra thing.
28:02 And I thought all it's doing is make changing a number for me.
28:06 I can just do that.
28:07 Exactly.
28:07 No, not really.
28:09 I have one that sort of keeps track of how many deploys or pushed to productions I have for certain things, but it's kind of meaningless.
28:17 So short answer, no.
28:19 I love the last item.
28:21 UV doesn't replace Python, nor should it.
28:25 But, but I am, I'm really, you know, I don't even feel bad that I'm using UV in all the places where I can, because why not?
28:36 I am your father.
28:38 No, I don't feel bad about it either.
28:41 I love it.
28:42 It's, it's revolutionary in how quick it does things and how comprehensively it does it, especially getting Python versions onto your machine and creating virtual environments with different versions of Python.
28:54 It's glorious.
28:55 Yeah.
28:55 All right.
28:57 Before we get to our extras, are there any other extras?
29:01 No other extras, except for we have an extra sponsor.
29:06 I'd love to tell people about.
29:07 This portion of Python Bytes is brought to you by Codium, the AI tool of choice for professional software developers.
29:14 That's C-O-D-E-I-U-M.
29:17 Codium removes tedium from your development through a suite of state-of-the-art AI capabilities available with extensions in all of your favorite IDEs.
29:26 Use Codium in VS Code, the JetBrains IDEs, including PyCharm, Visual Studio Proper, Eclipse, Xcode, NeoVim, Jupyter Notebooks, and more.
29:35 Uniquely, Codium is fully enterprise-ready with over 1,000 paying enterprise customers, including multiple regulated Fortune 500 companies in completely self-hosted air-gap deployments.
29:47 Join over a million developers and use Codium for free forever.
29:50 Once you see the value, then it's time to ask your company to consider a free trial of the enterprise plan.
29:56 To learn more about Codium and get started today for free, visit pythonbytes.fm/Codium.
30:02 That is pythonbytes.fm/C-O-D-E-I-U-M.
30:06 Don't forget the E.
30:07 Or just click the link in your podcast player's show notes.
30:10 Thank you to Codium for supporting Python Bytes.
30:13 Absolutely.
30:14 So no extras.
30:15 I got an extra.
30:16 Wait, you got extra.
30:17 I have no extras because I am still out of breath from covering all the extra extras.
30:21 Yeah, the extras.
30:23 So I wanted to just, there's a little article from Ned Batchelder, coverage.py originally.
30:30 And it's, what I thought was, I always wondered why it's called coverage.py.
30:35 Is it because it's like all the stuff on PyPI is Python.
30:37 So why .py?
30:39 Well, it used to be one line of code or one file, not one line of code.
30:43 But it was originally a single file.
30:46 So the coverage.py name was literal.
30:49 It was a name of a file and it had only 350 lines of code.
30:52 And it was written by Gareth Rees in 2001.
30:57 And Ned started maintaining it in 2004.
31:01 So a few years later, and he still will tell you, I didn't invent coverage.py.
31:06 I'm just maintaining it.
31:07 But he's maintained it for all but three years.
31:10 And now it's 20,000 lines of code and about 100 files.
31:16 So it's got twice the amount of C code as it originally had.
31:20 And it's almost 20 years later, Ned's still pushing the ball forward.
31:25 So we appreciate that, Ned.
31:26 And that's why it's called coverage.py.
31:29 So that was it.
31:30 Yeah, very cool.
31:31 The other extra.
31:32 And 20 years trying.
31:33 20 years on a project.
31:35 Yeah.
31:35 That's awesome.
31:36 And we couldn't ask for a better maintainer for this project.
31:39 So Ned's awesome.
31:41 The other thing is there's been some news lately about people wanting to shift from what used to be Twitter and now is X.
31:51 And a lot of people are going to Blue Sky.
31:53 I'm trying it out myself.
31:55 So if you're over on Blue Sky, connect with me.
31:58 And we'll play with it a bit.
32:00 See if we want to do something else for the podcast or not.
32:04 All right.
32:05 Cool.
32:05 You might drag me over there.
32:06 I'm not there yet.
32:06 But on the Mastodon and the others.
32:09 Definitely.
32:09 Also, one of the things.
32:11 I was going to try to find this article, but I can't find it.
32:15 There was an article saying that a year ago, or even just a few months ago, there were so many millions of people on Blue Sky, but none of them were very active.
32:25 Like me, I had an account, but it wasn't there very much.
32:30 And it sort of feeds on itself, right?
32:32 It's a network effect.
32:33 If you talk and nobody says anything back to you, it's not fun.
32:38 But now it's got a huge growth.
32:41 Even Taylor Swift said she's switching over to Blue Sky.
32:45 But there's a lot of Python people there now, too.
32:48 And it's not just an echo chamber.
32:50 The people are actually hanging out and replying and stuff.
32:53 So it's getting fun there.
32:54 So just letting you know.
32:56 Awesome.
32:57 And that was my extra, really.
32:59 Go follow Brian in the sky.
33:02 Yeah.
33:02 All right.
33:04 Ready for a joke?
33:04 I am very ready.
33:06 I am.
33:06 Also, a quick shout out to the Momentum extension, which gives you a cool little homepage with all sorts of fun stuff you want.
33:12 Oh, that's on your New Zen thing?
33:14 Yeah, but you can get that in Vivaldi.
33:15 You can get that wherever.
33:16 Yeah.
33:17 Okay.
33:17 Yeah.
33:18 Very neat.
33:18 And a bunch of cool little hot links.
33:21 But that's not funny.
33:22 No.
33:22 Sleeping is funny.
33:23 How about how programmers sleep?
33:25 We talked about how they sit in chairs last time.
33:27 We're down to the basics here, Brian.
33:30 Okay.
33:31 But I think many of us will relate to this.
33:33 So there's a picture of a programmer, cat, sleeping.
33:36 Earthquake.
33:37 Still asleep.
33:38 Thunderstorm.
33:39 Still asleep.
33:40 Alien attack.
33:41 Pew, pew.
33:41 Still asleep.
33:42 Remembers how to fix that error on line 56.
33:45 Boom.
33:45 Shoots out of bed.
33:46 God.
33:48 It's three in the morning, but I can fix it.
33:51 Yes.
33:52 Definitely.
33:55 Liz says, I'm in that picture and I don't like it.
33:58 Okay.
34:00 Sort of related.
34:01 I got to tell this story.
34:02 Last night, I was writing up an article on, not an article.
34:07 I was explaining to some of my sponsors how some requirements cannot be implemented.
34:14 And I listed out the reasons why the implementation is not possible.
34:18 And then at the end, I'm like, either we don't do this or we move the database out of one of the objects.
34:26 Well, we can move.
34:27 That's fine.
34:28 That's all it.
34:29 It's possible.
34:30 Yeah.
34:31 Yeah.
34:31 So sleep or writing it down help to figure out.
34:36 Yeah.
34:36 Or even just going for a walk or something.
34:38 I would do that a lot when I get stuck.
34:39 When I was earlier in my career, I'm like, it's time for a walk around the building.
34:42 I'll be back in 10 minutes.
34:44 And also, yeah.
34:46 Wait, I'm babysitting a kitten right now.
34:49 And he's not letting me sleep.
34:51 So he might be sleeping through a thunderstorm, but I'm not sleeping through the kitten.
34:55 So anyway.
34:56 Very meta.
34:58 I think we got to leave it there.
34:59 What do you think?
34:59 Yeah.
35:00 Let's stop talking.
35:01 Thanks again, Michael, for a wonderful episode.
35:05 Bye.
35:05 Yeah.
35:06 Thanks as always.