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


Transcript #409: We've moved to Hetzner write-up

Return to episode page view on github
Recorded on Wednesday, Nov 13, 2024.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:05 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:40 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:08 So 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:19 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:30 Folks, the drought is over.

01:31 This is something I saw Will throw out as a proof of concept.

01:36 Okay.

01:36 Have you seen this, Brian?

01:37 No.

01:38 So it's pretty cool.

01:40 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,

01:53 working on something.

01:54 And, you know, you've got tree, which is a command that will show sort of a hierarchical view of

02:00 things.

02:01 But wouldn't it be nice if there was something kind of graphical that you could use to explore

02:06 and interact with the file system?

02:08 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

02:26 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.

02:35 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

02:41 tree and go around.

02:42 And you find a file, you can hit P to preview it in a little side tab thing, like side by

02:49 side with the tree.

02:49 You can jump from different roots of this tree by just hitting G and then typing directory

02:55 slash apps, enter, and then you're just exploring whatever your apps folder is or whatever.

03:00 What do you think?

03:00 I think this looks pretty nice, actually.

03:02 Pretty great.

03:03 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

03:14 or nothing, but here, if you're interested, fork it, play with it.

03:18 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

03:23 be able to specify a starting directory?

03:26 Like, create me a tree of this place.

03:28 Right now, it just jumps into your home directory, then you 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 get 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 rich environment,

03:53 all that.

03:53 Oh, nice.

03:54 Right?

03:55 That's the terminal tree as an entry point to this package.

03:58 So, yeah, I think if you're looking for a quick way to explore your file system over

04:03 SSH, this is pretty nice.

04:05 Or even in the terminal on your own machine, although I find that, you know, some people

04:08 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:18 Cool.

04:18 Mm-hmm.

04:19 All right.

04:20 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:30 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 OK, 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:02 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

05:14 APIs out, you can have them up in different collections.

05:17 But I started this quickly.

05:19 I'm like, right before this morning, I'm like, I should try this.

05:23 So I'll give it a shot.

05:24 And I went down and said, get started.

05:26 And similar to like you said, the top installation instructions were to use UV tool.

05:34 So that's a UV tool 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 UV tool install, Python 312, posting.

05:48 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

05:55 the stuff I wanted to talk about.

05:56 It's a beautiful interface.

06:00 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:13 So it is designed to have some quick workflows to work around, like testing an API.

06:22 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:33 And you can save it to a file.

06:35 And it's a version control friendly file.

06:38 So it's something you can diff and stuff if you want to do it a couple times and see how

06:42 things are different.

06:43 One of the things I loved about this is when I've tested APIs before, sometimes I've got

06:48 a whole bunch of header stuff that I need to stuff into an API to just get it working.

06:54 So manual things like, oh, I forget that other one, that manual stuff that you can jump around

07:01 and manually fill things out is a little difficult.

07:04 But this one has, has the ability in postman.

07:07 Yeah, stuff like that.

07:08 Where, and it's great for things that don't have, you don't have to fill in a bunch of header

07:13 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

07:20 run a Python, some Python code before and after or, and or after a request to prepare the

07:26 headers, set variables and stuff to get your, your post ready.

07:30 And this is, this is just excellent.

07:33 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, you can even customize the key binding if the ones that they've chosen

07:45 for you don't work that way.

07:47 That's pretty cool.

07:47 But just an excellent little command thing for, or a terminal application for testing your

07:55 APIs.

07:55 Yeah, 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, 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 So yeah, I was just in postman today, but I don't want to tell you about postman, Brian.

08:14 I want to talk about scout.

08:17 Let me tell you real quick about scout APM.

08:21 They're big supporters of Python bytes, 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

08:30 performance, 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

08:39 and solve performance abnormalities faster and easier.

08:42 Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs, and the

08:48 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:58 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 healing logs and just finding the problems

09:06 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,

09:35 just shoot them a message or something on their pricing page about that.

09:38 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:52 And then they'd stop supporting the show.

09:53 So please use our link pythonbytes.fm/scout.

09:56 Check them out.

09:57 It really supports the show.

09:59 All right.

10:01 Next up, Brian, it's good I had a lot of coffee because this, there was almost a first after

10:07 eight years, nine years, eight years of the show.

10:11 How long has it 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, but I had to have two extra, extra, extras, but they're quick.

10:24 So 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,

10:41 Spacey is a great option.

10:42 Vincent Orberdam, who used to work at Explosion, actually wrote this course.

10:47 So why am I telling you about that?

10:49 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

11:00 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

11:13 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 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 like, can we just go back to something simple

11:48 that will work for like tons of people?

11:50 I think.

11:50 So I'm proposing the idea of stack native, like just enough technology to make what you need

11:56 your web app or your API or whatever to run, not something that'll tie you so deeply into

12:02 all the hyperscale clouds that you end up with a hundred thousand dollar bill, but no idea

12:06 how to move away from it.

12:08 I almost covered this as one of my topics.

12:10 This is a great article.

12:11 Did you?

12:11 Oh, thank you so much.

12:12 That's awesome.

12:12 Yeah.

12:13 This is a really, really fun one.

12:14 Related.

12:15 I also wrote, and I talked about it last time, but I wrote this up that we, Python Bytes,

12:21 Talk Python, Talk Python Training, all the APIs, et cetera, et cetera, in like a broad sense,

12:25 have moved to Hetzner.

12:27 Remember I talked about how Hetzner was really interesting and appealing and hey, I took

12:31 the plunge, bought us a, I splurged, Brian.

12:34 I went for the big VM, the big machine.

12:36 Okay.

12:37 Eight virtual CPUs, 16 gigs for a whopping $25 a month.

12:41 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

12:53 it's like from 20 years ago or something, CPU performance, 1.2 times faster than DigitalOcean's

12:59 $112 version.

13:00 And the bandwidth is eight times more, one gigabit bandwidth versus two for $25.

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, 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:27 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

13:34 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

13:41 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

13:50 non-synchronous view method in Flask, it will, when you return a dictionary, it'll use that

13:55 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,

14:03 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

14:17 functions and not async.

14:18 So here's a decorator that looks and sees if it's decorating an asynchronous or asynchronous

14:23 function and creates a different wrapper behavior.

14:26 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

14:34 handle both sync and async, here's a little example for them.

14:37 Okay.

14:38 All right.

14:38 Next, also released a new version of Lismunk, the email API client for Python.

14:47 I think, I have, what's the guy's name?

14:50 Ron.

14:50 Thank you.

14:50 Ron Hudson did a bunch of work adding new features to that.

14:53 So that is out.

14:54 Also-

14:55 You're still on the go-over.

14:57 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-dover.

15:16 Come on.

15:17 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:24 Okay.

15:24 So on here to TOB.

15:27 We all know TOB, TOB index.

15:29 There was big news.

15:29 Hey, guys, what?

15:30 Python's number one.

15:31 Hooray.

15:31 In this other way, right?

15:33 We just talked about GitHub last week and TOB.

15:35 This is not news that Python is number one, 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:48 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% and Java's 1% and C is negative 3%.

16:01 C Sharp has negative 3%.

16:02 So not only is it number one, it's double and is growing many times faster than anything else

16:07 on the list, including Rust.

16:09 That's amazing.

16:09 So I'm not sure if we should really bet our careers on these toy languages yet, but you

16:14 know, you guys do you.

16:15 Okay.

16:17 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:31 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:44 We do have f-strings, but when you're doing things in, say, I want to create the content

16:50 of an HTML page in memory 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

17:07 version that's like f-strings into Python.

17:10 So this is interesting coming along.

17:12 Progress is happening there.

17:13 Cool.

17:13 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

17:30 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

17:40 are coming up.

17:40 Omnivore.

17:41 Remember I told you they're shutting down and deleting everybody's account?

17:45 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:52 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

18:00 scale.

18:00 And it made me sad.

18:01 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

18:10 beach or wherever.

18:11 Yeah.

18:11 Pocket has been around for 10 years.

18:14 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 ebook.

18:24 It's like acquired in 2017, put on the shelf, worked on other random things that have nothing

18:30 to do with Firefox or other things they're selling.

18:33 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

18:43 at.

18:44 But you know what?

18:45 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:50 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,

19:10 but they're expensive, like $100 a year expensive.

19:13 So I don't know.

19:14 I tried them.

19:15 Instapaper is more.

19:16 So I started, I used Instapaper a long time ago and I don't remember why I stopped.

19:21 I don't remember why I stopped either.

19:23 But, well, I know I would switch to Omnivore because it was awesome, but it's gone.

19:26 So say lovey.

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

19:43 and group them 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.

20:07 But it's all about like reimagining the web 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

20:25 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, so they made

20:35 Arc and it became incredibly popular amongst the people who liked it.

20:39 Like it was going really, really, you know, the adoption was going very fast and they decided

20:42 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:56 So a bunch of people are like, ah, what is there?

20:58 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 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

21:14 see the web.

21:15 You know, Chrome was called Chrome because it literally maybe should be anti-Chrome.

21:19 It took away the window Chrome, all the junk that used to be around all the toolbars and

21:23 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, 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, all the things you can see the little tab bar on the side, but

21:38 you don't even have to have that there.

21:39 And isn't this nice?

21:40 Sure.

21:41 It's cool.

21:42 Yeah.

21:42 So anyway, I'm giving this a try.

21:43 It's, it's quite promising.

21:45 The people working on it are releasing versions a couple of times a week.

21:49 So it says alpha, but it's working pretty well.

21:51 So anyway, I do want to shout out like one of the features of the Arc browser is that whenever

21:55 you look at a picture of an animal, you see two.

21:59 Yeah, exactly.

21:59 Of course, because how, 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 No, that's pretty good.

22:08 Okay.

22:08 So I recommend Zen dash browser dot app.

22:10 It's, 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

22:19 or whatever, they'll leave big gaping holes as did Arc.

22:22 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

22:28 a feature that cleans up this page.

22:30 So it's not just pages with holes where there used to be ads, but a clean page.

22:33 So anyway, if you're wondering about that, that is coming.

22:36 I'm still pretty happy with Vivaldi, but I know.

22:38 Go for it.

22:39 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

22:49 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

22:54 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:05 So we actually talked about UV twice at the beginning of the show, talking about how UV install

23:11 or UV tool install works like Pipex.

23:15 But there's an article about from Jeff Triplett saying UV does everything or enough that I'm

23:21 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 I it's kind of refreshing that I need to forget about a lot of things.

23:32 And I these other projects are still great, but it solves so many problems.

23:37 I'm just going to read here.

23:39 UV feels like one of those old infomercials where it solves everything, which is where

23:43 we have landed in the Python world, 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:58 And it starts to sound like not just what can it do, but when it's a shorter list to say

24:04 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 V ENV replaces the Python dash M V ENV.

24:24 And I'm using that wherever I can.

24:28 So, yep.

24:28 Using that UV pip compile replaces pip-tools compile.

24:32 Pips 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:46 UV Python, actually, we covered that on the show, but I haven't really been using that

24:52 very much because I use virtual environments.

24:55 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, but I do use it in Docker when I got to get Python

25:07 into a Docker image.

25:08 It's a nice way to do that.

25:09 Cool.

25:10 UV build, which was new to me, or I forgot about it.

25:16 We'll build your package for PyPI and UV publish publishes it.

25:22 I just, you know, I told you I published those two packages, the chameleon dash flask and then

25:26 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 because after a package is, you know,

25:43 around for a little bit, then I do a GitHub workflow that will just do a build and publish

25:49 on with a version.

25:50 When I push a version, it does that for me.

25:52 Nice.

25:54 So there's that.

25:55 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:08 And then there's a Docker thing bringing UV and Python to Docker.

26:13 I haven't.

26:13 Have you used this?

26:14 Have we talked about this?

26:15 No, I believe it uses multi-layer Docker builds where you have a build image and then you have

26:22 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's fine for me to just do it that way.

26:35 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

26:44 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:58 And UV 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 to pyproject.toml, remove, sync.

27:13 And I'm actually finding I'm using this a lot.

27:16 So 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 project.toml or requirements file suite.

27:29 So UV sync is awesome.

27:31 Yeah.

27:32 So then he talks about what does it not do?

27:34 And does it run custom scripts defined in your project.toml?

27:40 Oh, OK.

27:42 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:49 You know, do you have a bumper sort of a thing that you use, Michael?

27:54 Because I used to.

27:56 I used to use a couple.

27:57 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 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.

28:15 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.

28:23 Nor should it.

28:25 But I am.

28:27 I'm really, you know, I don't even feel bad that I'm using UV in all the places where I can.

28:32 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 revolutionary in how quick it does things and how comprehensively it does it.

28:49 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:58 Before we get to our extras, there are any other extras.

29:01 No other extras, except for we have an extra sponsor I'd love to tell people about.

29:08 This portion of Python Bytes is brought to you by Codeium, the AI tool of choice for professional software developers.

29:14 That's C-O-D-E-I-U-M.

29:17 Codeium 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 Codeium in VS Code, the JetBrains IDEs, including PyCharm, Visual Studio Proper, Eclipse, Xcode, NeoVim, Jupyter Notebooks, and more.

29:35 Uniquely, Codeium 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 Codeium 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 Codeium and get started today for free, visit pythonbytes.fm/Codeium.

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 Codeium 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:18 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:38 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:53 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.

31:02 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, and it's got twice the amount of C code as it originally had.

31:20 And it's almost 20 years later.

31:22 Ned's still pushing the ball forward.

31:25 So we appreciate that, Ned.

31:27 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 20 years.

31:33 Ryan.

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 a lot of, there's been some news lately about people wanting to shift from what used to be Twitter and now is X.

31:51 And go to, a lot of people are going to Blue Sky.

31:54 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, cool.

32:05 You might drag me over there.

32:06 I'm not there yet.

32:07 But on the Mastodon and the others.

32:10 One of the things, 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.

32:23 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:44 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:55 So just letting you know.

32:56 Awesome.

32:58 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:05 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:13 Oh, that's on your New Zen thing?

33:14 Yeah, but you can get that in Vivaldi.

33:16 You can get that wherever.

33:16 Yeah.

33:17 Okay.

33:17 Yeah.

33:18 Very neat.

33:19 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:28 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:37 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:53 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 I saw it.

34:29 It's possible.

34:30 Yeah.

34:31 Yeah.

34:31 So sleep or writing it down helped 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:43 I'll be back in 10 minutes.

34:44 And also, yeah.

34:46 Wait, I'm babysitting a kitten right now, 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?

35:00 Yeah, let's stop talking.

35:03 Thanks again, Michael, for a wonderful episode.

35:05 Bye.

35:05 Yeah.

35:06 Thanks as always.

Back to show page