WEBVTT

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

00:00:05.100 --> 00:00:09.000
This is episode 387, recorded June 12th.

00:00:09.000 --> 00:00:10.540
And I'm Brian Hawken.

00:00:10.540 --> 00:00:11.780
And I'm Michael Kennedy.

00:00:11.780 --> 00:00:14.300
This episode is sponsored by Scout APM.

00:00:14.300 --> 00:00:16.160
Listen to their segment later in the show.

00:00:16.160 --> 00:00:24.020
Connect with your hosts, as always, through Fosstodon, at Adam Kennedy, at Brian Hawken, and at Python Bytes.

00:00:24.020 --> 00:00:25.420
We'd love to hear from you.

00:00:25.420 --> 00:00:28.360
Send in those topics, too.

00:00:28.660 --> 00:00:33.820
You can also, there's a contact list on pythonbytes.fm.

00:00:33.820 --> 00:00:35.000
You can send things that way, too.

00:00:35.000 --> 00:00:40.760
And if you'd like to join the show while we're recording, like some of the people right now,

00:00:40.760 --> 00:00:47.160
you can join us on YouTube at pythonbytes.fm/live to be part of the audience.

00:00:47.160 --> 00:00:50.460
It's usually Tuesdays at 10 a.m. Pacific time.

00:00:50.460 --> 00:00:55.880
And you can also use that to find the link to catch older episodes as well.

00:00:56.160 --> 00:01:04.300
And finally, before we get started, if you'd like to have all these topics and the links to everything we talk about sent directly to your inbox,

00:01:04.300 --> 00:01:12.120
you can go to pythonbytes.fm and become one of our friends of the show and join that list.

00:01:12.120 --> 00:01:14.420
And we'll send those emails to you every week.

00:01:14.420 --> 00:01:15.080
Super useful.

00:01:15.080 --> 00:01:16.320
A lot of people are signing up to them.

00:01:16.320 --> 00:01:20.580
Brian, really quickly, before we jump into the topics, you mentioned Fosstodon.

00:01:20.580 --> 00:01:25.860
I got a comment on YouTube, I suppose, is the right place to, where it came from.

00:01:25.860 --> 00:01:31.280
Somebody said, this guy, me, has gone completely crazy because he joined Mastodon.

00:01:31.280 --> 00:01:36.020
Then he joined invite-only Mastodon because Fosstodon went to invite-only.

00:01:36.460 --> 00:01:41.820
I'm like, but you can join any, there's thousands of servers, join any one you want.

00:01:41.820 --> 00:01:45.740
So you don't have to be on Fosstodon directly to talk with us.

00:01:45.740 --> 00:01:48.780
It's just the same, you know, most people I talk to are not on Fosstodon.

00:01:48.780 --> 00:01:57.500
If you want an invite to that private server or invite-only server, which I think that's just trying to limit the scope for the admins and the cost of it and stuff,

00:01:57.500 --> 00:02:01.060
happy to send you on, but yeah, just any old Mastodon will do.

00:02:01.060 --> 00:02:03.540
It doesn't have to be Fosstodon in particular.

00:02:03.540 --> 00:02:04.940
Nope, doesn't have to be.

00:02:04.940 --> 00:02:05.340
Yeah.

00:02:05.340 --> 00:02:07.760
It's not Slack, it's not Discord, it's something else.

00:02:07.760 --> 00:02:08.900
It's the Fediverse.

00:02:08.900 --> 00:02:16.820
But if you really want to get into Fosstodon, go into the contact form on our site and send us an email and one of us will send you an invite.

00:02:16.820 --> 00:02:17.800
Exactly.

00:02:17.800 --> 00:02:20.920
Well, how should we start the show, Michael?

00:02:20.920 --> 00:02:25.000
Let's herald in a new era of SQL interactions, shall we?

00:02:25.000 --> 00:02:26.100
With the data herald.

00:02:26.100 --> 00:02:30.360
So this comes just under the organization data herald.

00:02:30.360 --> 00:02:42.580
And the idea is you have a SQL database like Postgres or Microsoft SQL Server or whatever, but you are not, either you don't have SQL skills or you don't want to bother your SQL skills.

00:02:42.580 --> 00:02:45.420
This is kind of like for me with regular expressions, right?

00:02:45.420 --> 00:02:51.540
Like I can do regular expressions, but I will take a lot of steps to not actually do regular expressions.

00:02:51.540 --> 00:02:53.200
You know what I mean?

00:02:53.200 --> 00:02:55.440
So this is like that for SQL.

00:02:55.440 --> 00:03:04.700
It's a natural language to SQL engine built for enterprise level question and answering on top of relational data.

00:03:04.960 --> 00:03:13.100
So maybe you've got a database with a bunch of analytics, a bunch of customers, whatever, contacts for like a CRM type thing.

00:03:13.100 --> 00:03:22.400
And you want to let your somewhat technical people just talk to the thing instead of making them learn SQL or use some kind of BI tool.

00:03:22.400 --> 00:03:23.660
So you just put this thing on top of you.

00:03:23.660 --> 00:03:29.580
You're like, tell me all, you know, how much sales did we get from the Philippines last month?

00:03:29.580 --> 00:03:30.580
Something like that.

00:03:30.580 --> 00:03:30.760
Right.

00:03:30.760 --> 00:03:34.280
Which you could write that as a SQL expression, but you don't have to.

00:03:35.280 --> 00:03:35.700
Yeah.

00:03:35.700 --> 00:03:43.480
So some of the features are you can allow business users to get insights into data warehouses without bothering the data analyst.

00:03:43.480 --> 00:03:49.140
You can enable Q&A chat on top of production databases inside your SaaS application.

00:03:49.140 --> 00:03:53.620
That one sounds a little risky, but, you know, maybe internally it's fine.

00:03:53.620 --> 00:03:55.920
You got like a self-hosted one or something like that.

00:03:55.920 --> 00:03:59.940
Or you could create a chat GPD plugin for your proprietary data even.

00:03:59.940 --> 00:04:02.640
Pretty interesting stuff, right?

00:04:02.640 --> 00:04:04.080
This is super cool.

00:04:04.080 --> 00:04:04.560
Yeah.

00:04:04.560 --> 00:04:05.000
Yeah.

00:04:05.000 --> 00:04:05.520
Yeah.

00:04:05.520 --> 00:04:06.520
I haven't tried it yet.

00:04:06.520 --> 00:04:10.400
It's half Python, half JavaScript, 0.3% Docker.

00:04:10.400 --> 00:04:18.480
But the 0.3% Docker comes from the fact that if you want to just run it locally, you can just Docker compose up basically.

00:04:18.480 --> 00:04:23.320
So they actually have that all put together in a script, but you just Docker run off it goes.

00:04:23.320 --> 00:04:24.040
Yeah.

00:04:24.340 --> 00:04:30.000
So it's made up of a bunch of different things, an engine, some enterprise rules like permissions and stuff, an admin console.

00:04:30.000 --> 00:04:35.040
And interestingly, one final thing to throw out here before we move on is a Slack bot.

00:04:35.040 --> 00:04:42.280
So you can add the data herald for your database to your Slack channel and then talk to it as part of your Slack conversation.

00:04:42.280 --> 00:04:44.140
What's the deal with this?

00:04:44.140 --> 00:04:44.700
It's like, I don't know.

00:04:44.700 --> 00:04:48.520
Let's just ask the data herald, you know, and go and send it a message.

00:04:48.520 --> 00:04:50.420
And I think that's actually pretty interesting.

00:04:50.420 --> 00:04:53.280
I think it's, yeah, it's funny.

00:04:53.460 --> 00:04:55.080
It's interesting and kind of funny.

00:04:55.080 --> 00:04:57.820
I kind of forgot that a lot of people are still using Slack.

00:04:57.820 --> 00:04:59.300
Are you slacking off?

00:04:59.300 --> 00:05:00.500
You're not paying attention anymore, right?

00:05:00.500 --> 00:05:01.860
I'm slacking off.

00:05:01.860 --> 00:05:02.320
Yes.

00:05:02.320 --> 00:05:05.040
I still have a Slack.

00:05:05.040 --> 00:05:05.360
No.

00:05:05.360 --> 00:05:05.680
Yeah.

00:05:06.340 --> 00:05:11.400
I have a Slack channel for the course and the book, but it doesn't give a lot of activity.

00:05:11.400 --> 00:05:11.760
So.

00:05:11.760 --> 00:05:13.120
Yeah.

00:05:13.120 --> 00:05:14.300
I'm always torn about these things.

00:05:14.300 --> 00:05:15.920
I want to set up something like that.

00:05:15.920 --> 00:05:20.380
But Discord seems to have a little more traction for public places like that.

00:05:20.380 --> 00:05:22.680
The Slack pricing has gotten really weird.

00:05:23.120 --> 00:05:23.400
Yeah.

00:05:23.400 --> 00:05:26.780
It's for free on open source stuff and big projects.

00:05:26.780 --> 00:05:31.780
It's like, it's got a 90 day limit on it and it throws stuff away, which is a problem.

00:05:31.780 --> 00:05:32.080
So.

00:05:32.080 --> 00:05:32.760
Yeah, exactly.

00:05:32.760 --> 00:05:36.020
I want to set up rocket.chat, which is pretty awesome.

00:05:36.020 --> 00:05:42.520
It's like a self hosted or you can buy their hosting, but it's like open source, a lot nicer,

00:05:42.520 --> 00:05:44.580
white label, et cetera, et cetera, et cetera.

00:05:45.020 --> 00:05:49.360
The only thing is like, if you want to get people to come in and use it and they do,

00:05:49.360 --> 00:05:53.240
do they want to have like another app open and remember to go to another place.

00:05:53.240 --> 00:05:55.340
I think that's the challenge with Discord and Slack.

00:05:55.340 --> 00:05:56.760
It's like, well, I already have that open.

00:05:56.760 --> 00:06:00.460
So now I get notifications for that versus here's one more thing to run.

00:06:00.460 --> 00:06:03.300
But yeah, this is something I'm thinking about.

00:06:03.300 --> 00:06:04.180
It could be fun.

00:06:04.180 --> 00:06:12.120
I switched the pytest course recently from Teachable to Podia and Podia has a community

00:06:12.120 --> 00:06:15.060
aspect where you can ask questions and answers and stuff like that.

00:06:15.060 --> 00:06:19.540
I haven't turned it on yet, but I'm planning on doing that soon just because it solves that

00:06:19.540 --> 00:06:20.820
extra login problem.

00:06:20.820 --> 00:06:22.580
They already have a login to get to the course.

00:06:22.580 --> 00:06:23.600
Right, exactly.

00:06:23.600 --> 00:06:25.280
And I can put it right in there.

00:06:25.280 --> 00:06:26.440
So anyway.

00:06:26.440 --> 00:06:27.200
Cool.

00:06:27.200 --> 00:06:27.920
Maybe someday.

00:06:27.920 --> 00:06:28.800
All right.

00:06:28.800 --> 00:06:30.220
Well, Data Herald, check it out, people.

00:06:30.220 --> 00:06:32.120
If you want to talk to your SQL.

00:06:32.120 --> 00:06:33.520
Talk to your SQL.

00:06:33.520 --> 00:06:34.220
Talk to your database.

00:06:34.220 --> 00:06:35.360
All right.

00:06:35.360 --> 00:06:39.880
If you'd like to talk to just random stuff in Python.

00:06:40.880 --> 00:06:42.460
I don't know how to transition to this.

00:06:42.460 --> 00:06:48.840
The topic I want to talk about is an article by Trey Hunter called Python's Mini Command Line

00:06:48.840 --> 00:06:49.320
Utilities.

00:06:49.320 --> 00:06:53.240
And I knew a lot of this stuff was around, but I always forget about it.

00:06:53.240 --> 00:06:55.180
So I love it when people bring this up.

00:06:55.180 --> 00:07:02.080
So the thing is, in Python, all the built-in stuff, there's standard library stuff.

00:07:02.080 --> 00:07:07.380
And usually you get at it from your Python code by saying import something, like import data

00:07:07.380 --> 00:07:09.200
classes or something like that.

00:07:09.620 --> 00:07:17.900
But some of this stuff has activities built into the dunder main of it in the subproject.

00:07:17.900 --> 00:07:24.420
So that if you write Python-m and then the built-in module, something happens.

00:07:24.420 --> 00:07:25.840
And there's a bunch of them.

00:07:25.840 --> 00:07:27.480
So this is what this article is about.

00:07:27.480 --> 00:07:39.140
And the famous one that is Python-m anti-gravity, which pops open in the KCD comic, which is kind

00:07:39.140 --> 00:07:40.800
of awesome that we have that in the language.

00:07:42.240 --> 00:07:43.680
I never get tired of that one.

00:07:43.680 --> 00:07:44.240
Yeah.

00:07:44.240 --> 00:07:47.620
But it does the import this thing.

00:07:47.620 --> 00:07:53.380
But so there's a whole bunch of cool tools that I was looking at.

00:07:53.380 --> 00:07:56.820
There's general purpose tools that I didn't even know was there.

00:07:56.820 --> 00:07:59.980
Calendar is one of them that is actually really handy.

00:07:59.980 --> 00:08:05.320
So if you just type Python-m calendar, it prints out the current year's calendar, which

00:08:05.320 --> 00:08:08.900
actually, I used to have a desk calendar.

00:08:08.900 --> 00:08:10.180
I don't have a desk calendar anymore.

00:08:10.600 --> 00:08:13.940
So having something like that pop up really easily, really helpful.

00:08:13.940 --> 00:08:17.060
And you can also give it a specific date.

00:08:17.060 --> 00:08:20.960
So if you're like, well, what's my anniversary going to fall on in a couple years?

00:08:20.960 --> 00:08:22.940
You can look that up.

00:08:22.940 --> 00:08:25.100
So really handy to have that around.

00:08:25.100 --> 00:08:30.060
There's the HTTP server, which is built in, which is fun.

00:08:30.060 --> 00:08:31.980
JSON tool is pretty awesome, actually.

00:08:31.980 --> 00:08:35.340
JSON tool lets you nicely format some JSON data.

00:08:35.340 --> 00:08:38.620
Some great stuff there, general purpose.

00:08:39.840 --> 00:08:43.020
There's categories that Trey has put these into.

00:08:43.020 --> 00:08:47.300
And I love the especially handy on a Windows machine category.

00:08:47.300 --> 00:08:54.860
These are Unix-y utilities that I often miss when I'm on a random Windows setup.

00:08:55.440 --> 00:08:58.860
And I never really remember how to get them safely.

00:08:58.860 --> 00:09:01.940
And so having them built into Python, I didn't even know these were here.

00:09:01.940 --> 00:09:04.540
Like gzip and tar.

00:09:04.540 --> 00:09:10.200
I didn't know that I could use gzip and tar easily on Windows with just Python, built in Python.

00:09:10.200 --> 00:09:11.280
How cool is that?

00:09:12.280 --> 00:09:15.460
There's a FTP lib has a built-in FTP utility.

00:09:15.460 --> 00:09:18.020
You can, it's kind of a quick FTP client.

00:09:18.020 --> 00:09:19.160
Nice.

00:09:19.740 --> 00:09:22.120
I don't really need Telnet very much.

00:09:22.120 --> 00:09:24.160
But some of these are pretty nice.

00:09:24.160 --> 00:09:25.000
IMAP lib.

00:09:25.000 --> 00:09:27.740
I didn't know that you could curl to read email through Python.

00:09:27.740 --> 00:09:28.300
Cool.

00:09:28.300 --> 00:09:31.680
Going down, analyzing.

00:09:31.680 --> 00:09:34.580
These are analyzing Python code.

00:09:34.580 --> 00:09:35.040
Huh.

00:09:35.040 --> 00:09:36.120
Tokenize looks fun.

00:09:36.240 --> 00:09:39.000
AST, actually, I did know that.

00:09:39.000 --> 00:09:44.520
Using AST to get an abstract syntax tree for some code from the command line.

00:09:44.520 --> 00:09:48.440
A couple of the ones, what did I want to highlight?

00:09:48.440 --> 00:09:50.940
There's working with code.

00:09:50.940 --> 00:09:52.640
I don't know.

00:09:52.640 --> 00:09:55.980
There's just a whole bunch of fun stuff in here.

00:09:55.980 --> 00:10:00.340
You can get Hello World as a command line argument, or the command line tool.

00:10:00.340 --> 00:10:02.180
It prints Hello World.

00:10:02.180 --> 00:10:03.620
That's funny.

00:10:03.620 --> 00:10:05.380
Sure, why not?

00:10:05.900 --> 00:10:07.080
Python-M this.

00:10:07.080 --> 00:10:08.580
We'll do the Zen of Python.

00:10:08.580 --> 00:10:10.080
But an internal demo.

00:10:10.080 --> 00:10:11.140
Yeah.

00:10:11.140 --> 00:10:14.500
Anyway, fun to check out.

00:10:14.500 --> 00:10:17.180
And these are pretty good stuff.

00:10:17.180 --> 00:10:17.920
Good stuff here.

00:10:17.920 --> 00:10:21.860
Yeah, there's a lot more there than I imagine most people know.

00:10:21.860 --> 00:10:22.520
That's pretty awesome.

00:10:22.520 --> 00:10:23.620
Pretty awesome.

00:10:23.620 --> 00:10:30.880
And there's even a little demo of using cprofile and pstats for getting some profiling of your code.

00:10:30.880 --> 00:10:31.840
Very cool.

00:10:31.840 --> 00:10:33.040
All right.

00:10:33.040 --> 00:10:34.740
What else is cool?

00:10:35.560 --> 00:10:36.660
I would say our sponsor.

00:10:36.660 --> 00:10:40.640
Let me tell you real quick about Scout APM.

00:10:40.640 --> 00:10:44.420
They're big supporters of Python Bytes, so we appreciate that very much.

00:10:45.000 --> 00:10:53.860
So if you are tired of spending hours trying to find the root cause of issues impacting your performance, then you owe it to yourself to check out Scout APM.

00:10:54.080 --> 00:10:55.080
They're a leading Python application.

00:10:55.080 --> 00:11:01.080
They're a leading Python application performance monitoring tool.

00:11:01.080 --> 00:11:02.080
It's an important tool.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:02.080
It's an easy way to find the root cause of the Python application.

00:11:02.080 --> 00:11:03.080
It's an easy way to find the root cause of the Python application.

00:11:03.080 --> 00:11:04.080
It's an easy way to find the root cause of the Python application.

00:11:04.080 --> 00:11:05.080
It's an easy way to find the root cause of the Python application.

00:11:05.080 --> 00:11:06.080
It's an easy way to find the root cause of the Python application.

00:11:06.080 --> 00:11:07.080
It's an easy way to find the root cause of the Python application.

00:11:07.080 --> 00:11:12.740
queries, background jobs, and the dreaded N plus one queries that you can end up if you do lazy

00:11:12.740 --> 00:11:18.060
loading in your ORM. And then you say, oh no, why is it so slow? Why are you doing 200 database queries

00:11:18.060 --> 00:11:22.560
for what should be one? So you can find out things like that. And it links it back directly to source

00:11:22.560 --> 00:11:28.060
code so you can spend less time in the debugger and healing logs and just finding the problems and

00:11:28.060 --> 00:11:32.820
moving on. And you'll love it because it's built for developers by developers. It makes it easy to

00:11:32.820 --> 00:11:37.640
get set up. Seriously, you can do it in less than four minutes. So that's awesome. And the best part

00:11:37.640 --> 00:11:44.080
is the pricing is straightforward. You only pay for the data that you use with no hidden overage fees

00:11:44.080 --> 00:11:51.620
or per seat pricing. And I just learned this, Brian. They also have, they provide the pro version for free

00:11:51.620 --> 00:11:57.040
to all open source projects. So if you're an open source maintainer and you want to have Scout APM for

00:11:57.040 --> 00:12:01.760
that project, just shoot them a message or something on their pricing page about that. So you can start

00:12:01.760 --> 00:12:08.100
your free trial and get instant insights today. Visit pythonbytes.fm/scout. The link is in

00:12:08.100 --> 00:12:12.720
your podcast player show notes as well. And please use that link. Don't just search for them because

00:12:12.720 --> 00:12:16.920
otherwise they don't think you came from us. And then they'd stop supporting the show. So please

00:12:16.920 --> 00:12:21.920
use our link pythonbytes.fm/scout. Check them out. It really supports the show.

00:12:21.920 --> 00:12:24.240
Definitely. Definitely. Thank you, Scout.

00:12:24.240 --> 00:12:27.340
Okay. How about we talk about Wolfie?

00:12:27.340 --> 00:12:28.180
Oh, neat.

00:12:28.180 --> 00:12:29.620
Do you know Wolfie?

00:12:30.000 --> 00:12:31.220
No, but I like the name.

00:12:31.220 --> 00:12:39.860
The name is good. So Wolfie, this comes to us from Patrick Smith. And this is a project from

00:12:39.860 --> 00:12:48.300
Chain Guard, which is a company that makes specialized Docker images. So the idea is,

00:12:48.300 --> 00:12:55.240
it's based on this idea of distro-less images. Have you heard of distro-less images? I never had.

00:12:55.340 --> 00:13:02.520
I'm like, what is this? So normally a Docker image, it shares the Linux runtime kernel,

00:13:02.520 --> 00:13:08.900
but then you layer on whatever else you want to add. So, you know, you get the Ubuntu image,

00:13:08.900 --> 00:13:15.160
it comes with apt and bash and all those kinds of things. Systemd, which you're very unlikely to be

00:13:15.160 --> 00:13:21.420
using in Docker and so on. So those are helpful to have if you might want to run across them,

00:13:21.480 --> 00:13:29.000
but they're also, they have a couple of problems. One is they just make the images larger. So you might have a gigabyte image instead of 50 megabyte image,

00:13:29.000 --> 00:13:34.140
if you're going to push it to Docker Hub or something like that, or other people are going to download it. And you'd rather have that smaller, right?

00:13:34.140 --> 00:13:34.660
Yeah.

00:13:34.820 --> 00:13:53.280
And the other one is those things all open up security vulnerabilities and bugs and other issues, right? If there's a bug in something that you weren't using, but it's there, you know, possibly somebody could use that to level up and hack your system, right? That would be less than good.

00:13:53.280 --> 00:14:08.440
So these often, these distro-less images often, or containers often come with, without even a package manager like apt or a shell at all, which makes them very small and very constrained in what people can do with them, right?

00:14:08.440 --> 00:14:20.440
So you can't like open up a shell and do something if literally the shell doesn't exist. However, debugging them is a challenge because, you know, one thing you can do with a running container that is misbehaving,

00:14:20.440 --> 00:14:33.120
as you can say, Docker exec container name, bash or sh, and then get in there and sort of do exploratory stuff, right? So that is a drawback, but they are way more secure, which is pretty cool.

00:14:33.120 --> 00:14:49.140
So this Wolfie thing, they make specialized distro-less containers, now that we know what those are, and they're just super stripped down, but so much so that in general, the distro-less images are so stripped down that you can't run Python, right?

00:14:49.920 --> 00:15:05.680
For example, or other things. So these come with, where is it down here somewhere? Anyway, it comes with, it's basically distro-less images that are built specifically with just enough to run Python.

00:15:05.680 --> 00:15:27.360
So that you can go in and get it working just right. And then once you're sure it's good, you just push it out to production and, you know, count on your logging, I guess. What do you think? Interesting?

00:15:27.360 --> 00:15:28.360
Yeah, I think so.

00:15:28.360 --> 00:15:36.020
Yeah, much smaller, much more secure because it can't do anything.

00:15:36.360 --> 00:15:42.760
And I found the answer, my thought was, why Wolfie? And it's inspired by the world's smallest octopus.

00:15:42.760 --> 00:15:50.180
Yes, of course. The wolf octopus, no, Wolfie. It's very cool. Octopuses are cool as well.

00:15:50.180 --> 00:16:00.420
And, you know, more and more projects and even projects within companies are caring about software build materials or S-BOMs.

00:16:00.420 --> 00:16:08.100
And so minimizing the things that go in your distribution and helps to make that smaller, your S-BOMs smaller.

00:16:08.100 --> 00:16:17.200
So having that be part of Wolfie, including high quality build time S-BOMs is a good addition there. That's cool.

00:16:17.200 --> 00:16:28.840
Yeah, it's cool you caught on to that. That's another nice thing is they specifically call out all the software build materials and having so much less, well, it makes it easier to do so, I suppose.

00:16:28.840 --> 00:16:30.340
Yeah, yeah, definitely.

00:16:30.340 --> 00:16:30.980
Neat.

00:16:30.980 --> 00:16:32.100
Yeah, indeed.

00:16:33.100 --> 00:16:48.180
I ran across recently some, I really like caching. So things like the idea of a memoization or caching of a function.

00:16:48.180 --> 00:16:58.300
So it's where if you run a function once, it does it, does the work. But if you run it again with the same input, it just remembers the answer.

00:16:58.300 --> 00:17:03.140
But there's different ways to do that. And I'm going to highlight a few that I thought were interesting.

00:17:03.140 --> 00:17:15.080
Funktools cache, of course, and I really like that Funktools cache has the cache shortcut because you can just say at cache for a function.

00:17:15.320 --> 00:17:19.840
And for a lot of stuff that doesn't have a lot of different input, it works great.

00:17:19.840 --> 00:17:31.580
So I've got some projects where it'll be a lot of work, but I call it several times and I could cache that externally, but just throwing cache over the top makes it work great.

00:17:31.860 --> 00:17:36.060
So for a lot of cases, just the built-in Funktools cache works awesome.

00:17:36.060 --> 00:17:45.160
If you need more detail, cache is actually just a shortcut into LRU cache with the defaults filled in.

00:17:45.160 --> 00:17:50.880
But you can set the max size or set type also with LRU cache.

00:17:50.880 --> 00:17:56.220
However, you might need more control. And that's where some of these other things come in.

00:17:56.460 --> 00:18:00.440
So there's an extension or a third-party library called CacheTools.

00:18:00.440 --> 00:18:06.380
And CacheTools has just more, you've got more control over it.

00:18:06.380 --> 00:18:10.340
You've got, you can use an LRU cache or a TTL cache.

00:18:10.340 --> 00:18:15.120
TTL caches are interesting because they have time to live built into it.

00:18:15.120 --> 00:18:23.580
So the cache can disappear after minutes or seconds or whatever makes sense for your application to remember things for a while, but then let them go.

00:18:23.580 --> 00:18:24.740
That's super handy.

00:18:25.180 --> 00:18:26.080
Yeah, really handy.

00:18:26.080 --> 00:18:36.680
Not just because it alleviates the cache management from it being too much, but one of the big problems in computer science is cache invalidation, right?

00:18:36.680 --> 00:18:44.840
Like, if it's doing something, I'd say like calling an API, which is the example right on this page, is you don't want to just hit that.

00:18:44.840 --> 00:18:47.340
For example, there's a weather API at a location.

00:18:47.340 --> 00:18:50.620
Like, given the location, the weather doesn't change that fast.

00:18:50.900 --> 00:18:52.800
So let's only refresh every 10 minutes.

00:18:52.800 --> 00:18:55.580
You put that on there and boom, and it's completely managed it, right?

00:18:55.580 --> 00:18:56.100
Yeah.

00:18:56.100 --> 00:19:04.080
And I like the example of weather because we know weather doesn't, the weather forecast isn't going to change that much in the next, you know, I don't know what the 600 is.

00:19:04.340 --> 00:19:05.640
I think it's seconds, 10 minutes.

00:19:05.640 --> 00:19:06.120
Okay.

00:19:06.120 --> 00:19:09.480
So yeah, it's not going to change in 10, you know, refresh it every 10 minutes.

00:19:09.620 --> 00:19:16.060
But for various other APIs, you might know about the API, how often it's updated.

00:19:16.060 --> 00:19:23.180
And if it's only updated once an hour, you don't need to hit it every time your code hits it.

00:19:23.180 --> 00:19:24.000
You can cache that.

00:19:24.000 --> 00:19:25.620
That's pretty neat for TTL.

00:19:25.620 --> 00:19:26.080
I love that.

00:19:26.080 --> 00:19:30.700
So building on top of this is another tool called CacheBox.

00:19:30.700 --> 00:19:33.780
So the other one, first one we talked about was CacheTools.

00:19:33.780 --> 00:19:36.700
Now CacheBox is a similar kind of thing.

00:19:36.700 --> 00:19:44.960
We've got lots of APIs that we can use for it, like LRU Cache and TTL Cache.

00:19:44.960 --> 00:19:47.840
It's a similar API as this other one.

00:19:47.840 --> 00:19:53.080
But there's also like an LFU Cache, least frequently used.

00:19:53.080 --> 00:19:54.340
Least frequently used, I bet.

00:19:54.340 --> 00:20:01.720
And so some other things, but one of the fun things about this is it's written in Rust.

00:20:01.720 --> 00:20:04.340
So for a couple of reasons.

00:20:04.340 --> 00:20:06.440
It's to speed it up a little bit.

00:20:06.440 --> 00:20:13.660
And I mean, but there's also, you could probably do larger objects in there because it's a low memory usage.

00:20:13.660 --> 00:20:17.640
It says it's a third of the size of a dictionary.

00:20:17.640 --> 00:20:22.640
So you're going to use less memory than you would storing it as Python objects.

00:20:23.440 --> 00:20:31.040
So that's pretty cool, especially if you're caching like the output of an API that's a big JSON blob or something.

00:20:31.040 --> 00:20:38.840
So really cool projects if you're trying to speed things up or save memory with the caching.

00:20:38.840 --> 00:20:40.180
So nice.

00:20:40.180 --> 00:20:41.940
Yeah, that's very cool.

00:20:41.940 --> 00:20:43.480
I did not know about it.

00:20:43.480 --> 00:20:44.140
I'm excited.

00:20:44.140 --> 00:20:45.080
Yeah, that's very neat.

00:20:45.380 --> 00:20:49.360
Cachebox just showed up a few days ago that I was aware of.

00:20:49.360 --> 00:20:51.000
I thought, oh, this is interesting.

00:20:51.000 --> 00:20:53.640
And yeah, it looks like it's only a couple weeks old.

00:20:53.640 --> 00:20:54.840
Two weeks old for the repo.

00:20:54.840 --> 00:20:55.100
Yeah.

00:20:55.100 --> 00:20:55.660
Very new.

00:20:55.660 --> 00:20:56.560
Excellent.

00:20:56.560 --> 00:20:57.920
I will definitely give that a look.

00:20:57.920 --> 00:20:59.220
All right.

00:20:59.220 --> 00:21:00.960
Any extras?

00:21:01.840 --> 00:21:07.040
I have had one extra, but then our conversation made me have two extras.

00:21:07.040 --> 00:21:08.960
So I'll just throw it out there.

00:21:08.960 --> 00:21:12.380
I'll just throw into the show notes, the rocket.chat.

00:21:12.380 --> 00:21:13.000
So people have that.

00:21:13.000 --> 00:21:13.820
We already talked about that.

00:21:13.820 --> 00:21:20.840
So Brian, I've been for many, many years a fan of bartender, not the drinking, but the Mac app.

00:21:20.840 --> 00:21:21.280
Yeah.

00:21:21.280 --> 00:21:24.300
You know, in Mac, you have this bar across the top.

00:21:24.300 --> 00:21:28.900
It's sort of equivalent to the task notification area on Windows.

00:21:29.680 --> 00:21:33.360
For some reason, putting stuff up there on Mac is super popular.

00:21:33.360 --> 00:21:34.560
I just counted.

00:21:34.560 --> 00:21:37.940
I have 28 icons in that thing, and it's ridiculous.

00:21:37.940 --> 00:21:39.580
Yeah.

00:21:39.580 --> 00:21:42.120
Being able to control that, it's not a little nice.

00:21:42.120 --> 00:21:42.560
Yeah.

00:21:42.560 --> 00:21:48.960
It's super nice, especially if you're doing presentations like at a conference or for courses or live streams.

00:21:48.960 --> 00:21:55.040
You can just hide more stuff away, and you don't have to have it there, you know, showing weird notifications and stuff.

00:21:55.040 --> 00:21:58.520
But it turns out, like, this bartender app is pretty cool.

00:21:58.940 --> 00:22:03.900
There's some uncertainty about its current status, though.

00:22:04.400 --> 00:22:10.820
So bartender was recently sold to another company, but no one announced that it was sold.

00:22:10.820 --> 00:22:19.600
And they were trying to kind of like, there's nothing to see here until app monitoring service said, you know, that this is, this is looking a little suspicious.

00:22:19.600 --> 00:22:24.520
It's just like, maybe people are buying this to do more deeper tracking.

00:22:24.520 --> 00:22:25.940
Maybe they were doing this to do more.

00:22:25.940 --> 00:22:31.400
Not illegally, but just sort of digging deeper into seeing what you're doing.

00:22:31.400 --> 00:22:36.980
This is bad because it has full screen recording access, access to hotkeys, all sorts.

00:22:36.980 --> 00:22:39.140
So it's got a lot of permissions, this app.

00:22:39.140 --> 00:22:39.500
Yeah.

00:22:39.560 --> 00:22:43.100
So on Mac rumors, let's see.

00:22:43.100 --> 00:22:44.020
What's the CEO?

00:22:44.520 --> 00:22:50.980
So the original article was PSA bartender Mac app under new ownership, but lack of transparency raises concerns.

00:22:50.980 --> 00:22:56.860
Like the guy who sold it didn't even, wasn't willing to acknowledge it until months later.

00:22:56.860 --> 00:22:59.560
And the company that bought it still doesn't, won't talk about it.

00:22:59.560 --> 00:23:01.520
So it's like, a little sus.

00:23:01.520 --> 00:23:02.220
Anyway.

00:23:02.340 --> 00:23:04.560
So I want to link to a thing on Mac rumors.

00:23:04.560 --> 00:23:06.000
Sorry, windows people.

00:23:06.000 --> 00:23:12.860
I know this is not that interesting, but for you, but six bartender alternatives to manage your Mac's menu bar.

00:23:12.860 --> 00:23:15.280
And a lot of them are open source.

00:23:15.280 --> 00:23:24.020
So for example, I'm using ice, which is available on GitHub with like 8,000 stars, you know, pretty nice.

00:23:24.020 --> 00:23:24.860
And guess what?

00:23:24.860 --> 00:23:27.720
It works almost exactly the same.

00:23:27.720 --> 00:23:28.560
It's free.

00:23:28.560 --> 00:23:29.420
It's open source.

00:23:29.420 --> 00:23:31.560
You know, why didn't I just use this earlier?

00:23:31.880 --> 00:23:36.320
There's a few features coming that it doesn't quite have, but for the most part, I think it's really good already.

00:23:36.320 --> 00:23:37.120
That's pretty cool.

00:23:37.120 --> 00:23:38.100
I should check that out.

00:23:38.100 --> 00:23:38.480
Yeah.

00:23:38.480 --> 00:23:43.480
So I've, I've banished bartender just out of a abundance of caution sort of thing.

00:23:43.480 --> 00:23:43.900
All right.

00:23:43.900 --> 00:23:44.820
That's it for my extras.

00:23:44.820 --> 00:23:45.520
How about you?

00:23:45.520 --> 00:23:47.060
just a couple.

00:23:47.060 --> 00:23:47.680
Let's see.

00:23:47.680 --> 00:23:53.860
I just wanted to let people know, the Python 3.12.4 is out.

00:23:53.860 --> 00:23:55.400
So, decent.

00:23:55.400 --> 00:23:59.460
I haven't checked to see what is new in dot four, probably book fixes.

00:23:59.460 --> 00:24:00.560
So don't know.

00:24:01.200 --> 00:24:02.860
but, it's there.

00:24:02.860 --> 00:24:08.340
and then, another, another recent release is, I don't usually keep up on these

00:24:08.340 --> 00:24:14.200
two tightly, but VS Code, the June is Python for Visual Studio Code.

00:24:14.200 --> 00:24:19.160
and then, the June release, includes, a pytest improvement.

00:24:19.160 --> 00:24:23.140
So, there is, there's an ongoing, it's been going on for a while.

00:24:23.140 --> 00:24:28.220
They're, they're rewriting some of the Python testing, functionality.

00:24:28.720 --> 00:24:33.580
And there's a link in this, in the release note to, to how to, how to change that so that

00:24:33.580 --> 00:24:34.140
you can see it.

00:24:34.140 --> 00:24:39.460
But if you're using the updated, testing rewrite, there's some changes that should,

00:24:39.460 --> 00:24:43.520
should help, just help, help things work a little better.

00:24:43.520 --> 00:24:45.440
So, very cool.

00:24:45.800 --> 00:24:47.120
nice, nice additions.

00:24:47.120 --> 00:24:48.300
That's all my extras.

00:24:48.300 --> 00:24:49.320
Yeah.

00:24:49.320 --> 00:24:54.960
I, want to say that when I saw you put into the show notes about an hour ago, or when I

00:24:54.960 --> 00:24:58.900
saw that they were in the show notes, oh, that three, three 12.4 is out.

00:24:58.980 --> 00:25:02.120
I just quick updated a number in the Docker setup.

00:25:02.120 --> 00:25:02.760
Boom.

00:25:02.760 --> 00:25:08.600
All the apps are upgraded to three, four, 13.4, which is, three, 13.4, which are 12.4,

00:25:08.600 --> 00:25:10.220
which is pretty awesome.

00:25:10.220 --> 00:25:11.540
No way that all works, right?

00:25:11.540 --> 00:25:12.460
All right.

00:25:12.460 --> 00:25:13.780
how about a joke?

00:25:13.780 --> 00:25:14.900
That sounds great.

00:25:14.900 --> 00:25:20.300
So before I show this, you know, in CSS, we've got different, different settings.

00:25:20.300 --> 00:25:24.120
You've got visibility, importance, opacity.

00:25:24.620 --> 00:25:29.720
What if you made a series of superheroes or villains or cartoons out of CSS?

00:25:29.720 --> 00:25:31.200
Well, that's the joke.

00:25:31.200 --> 00:25:33.380
So I'll link to this and we won't go through all of them.

00:25:33.380 --> 00:25:39.500
You guys can check it out, but it's called CSS cartoons by Alvaro Montoro.

00:25:39.500 --> 00:25:43.160
And we've got the cloud developer and the cloud developer.

00:25:43.160 --> 00:25:46.220
this is a CSS class dot cloud developer.

00:25:46.220 --> 00:25:47.820
Background is Azure.

00:25:47.820 --> 00:25:50.660
The color isolation is isolate.

00:25:50.660 --> 00:25:51.780
Rest is none.

00:25:51.780 --> 00:25:54.420
Stress is a 100 and content is none.

00:25:54.420 --> 00:25:57.940
They have like cool little pictures of, of like graphics of each.

00:25:57.940 --> 00:25:58.880
So check them out.

00:25:58.880 --> 00:25:59.800
We have a King.

00:25:59.800 --> 00:26:01.640
The position is absolute.

00:26:01.640 --> 00:26:02.980
The richness is 100.

00:26:02.980 --> 00:26:04.940
The color is Royal blue.

00:26:04.940 --> 00:26:07.380
And it says, you got to know your CSS.

00:26:07.380 --> 00:26:10.480
It says ampersand greater than colon first child.

00:26:10.480 --> 00:26:14.940
So stuff can, you know, the first child of all the things contained directly within it.

00:26:14.940 --> 00:26:17.160
All, all colon inherit.

00:26:17.160 --> 00:26:17.880
Isn't that awesome?

00:26:17.880 --> 00:26:21.440
let's see.

00:26:21.440 --> 00:26:21.920
That's great.

00:26:22.260 --> 00:26:23.900
We've got phantom of the opera, Brian.

00:26:23.900 --> 00:26:25.820
This is a, there can only be one of these.

00:26:25.820 --> 00:26:26.900
So it's not a class.

00:26:26.900 --> 00:26:28.140
It's a, ID.

00:26:28.140 --> 00:26:32.820
So hash phantom of the opera mask URL hash face.

00:26:32.820 --> 00:26:38.560
Backface visibility, hidden visibility, hidden pitch is low.

00:26:38.560 --> 00:26:39.700
Volume is soft.

00:26:39.700 --> 00:26:41.820
Phantom of the opera.

00:26:42.320 --> 00:26:42.900
All right.

00:26:42.900 --> 00:26:43.820
We have a winner.

00:26:43.820 --> 00:26:46.980
Order is one running first color gold.

00:26:46.980 --> 00:26:53.880
And then after, you know, colon colon after content is, the, like the first place trophy.

00:26:53.880 --> 00:26:55.620
We have a dictator.

00:26:55.620 --> 00:26:57.500
See the dictator down here in the bottom, Brian.

00:26:57.500 --> 00:26:58.120
See how he looks.

00:26:58.120 --> 00:26:58.880
He's so forbidding.

00:26:58.880 --> 00:27:02.440
a dictator is a class because there can be more than one.

00:27:02.440 --> 00:27:04.720
Of course, position fixed exclamation mark.

00:27:04.720 --> 00:27:05.200
Important.

00:27:05.200 --> 00:27:06.140
Cannot be overridden.

00:27:06.140 --> 00:27:07.380
Will change.

00:27:07.380 --> 00:27:08.020
Order.

00:27:08.460 --> 00:27:08.900
Important.

00:27:08.900 --> 00:27:09.960
Opacity.

00:27:09.960 --> 00:27:10.380
Zero.

00:27:10.380 --> 00:27:10.940
Important.

00:27:10.940 --> 00:27:13.700
Everything's important because of the dictator.

00:27:13.700 --> 00:27:15.060
You can't overwrite it or change it.

00:27:15.060 --> 00:27:15.820
Border.

00:27:15.820 --> 00:27:17.120
Double solid.

00:27:17.120 --> 00:27:19.140
And then dot country has.

00:27:19.140 --> 00:27:20.800
Not dot supporter.

00:27:20.800 --> 00:27:22.120
Will change.

00:27:22.120 --> 00:27:22.680
Orphans.

00:27:22.680 --> 00:27:23.160
Widows.

00:27:23.160 --> 00:27:23.700
Important.

00:27:23.700 --> 00:27:25.320
And translate.

00:27:25.320 --> 00:27:27.540
100 V max to zero.

00:27:27.540 --> 00:27:29.480
Anyway, it just goes on and on.

00:27:29.480 --> 00:27:30.660
Like the scroll bar goes forever.

00:27:30.660 --> 00:27:31.720
We've got a basketball player.

00:27:31.720 --> 00:27:33.680
I encourage people to check this out.

00:27:33.680 --> 00:27:34.980
It's pretty awesome.

00:27:34.980 --> 00:27:35.380
That's pretty good.

00:27:35.380 --> 00:27:35.860
Yeah.

00:27:35.860 --> 00:27:36.160
Yeah.

00:27:36.500 --> 00:27:38.620
CSS jokes or cartoons.

00:27:38.620 --> 00:27:39.380
Very good.

00:27:39.380 --> 00:27:41.060
All right.

00:27:41.060 --> 00:27:43.780
Another awesome episode.

00:27:43.780 --> 00:27:47.780
Thank you, Michael, for meeting me today to talk about Python.

00:27:47.780 --> 00:27:50.200
As always, thank you everyone for listening.

00:27:50.200 --> 00:27:50.840
See you later.