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:10.240
This is episode 375, recorded March 19th, 2024.

00:00:10.240 --> 00:00:11.800
I think I got that right.

00:00:11.800 --> 00:00:13.100
And I am Brian Okken.

00:00:13.100 --> 00:00:14.800
And I am Michael Kennedy.

00:00:14.800 --> 00:00:18.960
And our episode today is sponsored by Scout APM.

00:00:18.960 --> 00:00:19.660
Thank you, Scout.

00:00:19.660 --> 00:00:22.480
Listen to their section later in the show.

00:00:22.480 --> 00:00:27.040
If you'd like to connect to us, we're on Mastodon and the links are in the show notes.

00:00:27.040 --> 00:00:32.680
But it's @mkennedy, @brianokken, and at Python Bytes, all on fosstodon.org.

00:00:32.680 --> 00:00:36.000
And if you'd like to listen to the show live, we'd love to have you.

00:00:36.000 --> 00:00:37.360
But it's not necessary.

00:00:37.360 --> 00:00:38.740
You can listen to us later.

00:00:38.740 --> 00:00:46.800
But if you want to listen to us live, go to pythonbytes.fm/live and see all the details and see when the upcoming episode is.

00:00:46.800 --> 00:00:47.560
So, yeah.

00:00:47.560 --> 00:00:50.000
Michael, what do you got for us?

00:00:50.000 --> 00:00:55.060
Well, I would like to start off by telling you about another country, maybe one you haven't heard of.

00:00:55.060 --> 00:00:56.120
Canada?

00:00:56.520 --> 00:00:57.440
You've heard of Canada.

00:00:57.440 --> 00:00:58.480
You've heard of the U.S.

00:00:58.480 --> 00:00:59.240
You've heard of Germany.

00:00:59.240 --> 00:01:00.260
You've heard of Slovakia.

00:01:00.260 --> 00:01:01.620
You've heard of the Philippines.

00:01:01.620 --> 00:01:04.020
Have you heard of Pi Country?

00:01:04.020 --> 00:01:06.400
Oh, this should have a song with it.

00:01:06.400 --> 00:01:07.480
In a Pi Country.

00:01:07.480 --> 00:01:12.460
Does it involve a banjo?

00:01:12.460 --> 00:01:13.800
I don't know what it's called.

00:01:13.800 --> 00:01:14.700
I hope not.

00:01:14.700 --> 00:01:15.360
I know.

00:01:15.360 --> 00:01:16.000
I hope not, too.

00:01:16.000 --> 00:01:18.480
Oh, we should have covered this on the 14th.

00:01:18.480 --> 00:01:18.920
Anyway.

00:01:18.920 --> 00:01:21.240
Pi Country, Pi Day, all the things.

00:01:21.240 --> 00:01:21.520
Okay.

00:01:21.520 --> 00:01:27.000
So, Pi Country is, it solves something that might not sound like a great big problem until

00:01:27.000 --> 00:01:29.420
you try to deal with this and you're like, are you serious?

00:01:29.420 --> 00:01:30.340
There are this many things.

00:01:30.340 --> 00:01:32.620
It's similar to dealing with time zones.

00:01:32.620 --> 00:01:34.120
You're like, how complicated it can be?

00:01:34.120 --> 00:01:34.860
What are there, 24?

00:01:34.860 --> 00:01:35.520
No.

00:01:35.740 --> 00:01:36.880
And what are their abbreviations?

00:01:36.880 --> 00:01:40.280
And what are all the different ways in which they can be abbreviated and so on?

00:01:40.280 --> 00:01:41.920
This is that for countries.

00:01:41.920 --> 00:01:44.300
So, it's a Python library to access ISO.

00:01:44.300 --> 00:01:45.600
These are standards.

00:01:45.600 --> 00:01:47.320
Country, subdivision.

00:01:47.320 --> 00:01:48.340
What's a subdivision?

00:01:48.340 --> 00:01:53.580
Language, currency, and script definitions and their translations for all the countries of

00:01:53.580 --> 00:01:57.980
the world, including deleted countries that used to be countries but are not.

00:01:57.980 --> 00:02:02.300
I would have considered those just former countries, but deleted is a very digital way

00:02:02.300 --> 00:02:03.020
to think of it.

00:02:05.120 --> 00:02:10.500
We just selected that part and we hit, you know, command backslash and it really deletes

00:02:10.500 --> 00:02:11.120
it all the way.

00:02:11.120 --> 00:02:11.460
Yeah.

00:02:11.460 --> 00:02:18.800
Anyway, this is really interesting and it's used by 17.9 thousand different projects, which

00:02:18.800 --> 00:02:19.300
is pretty cool.

00:02:19.300 --> 00:02:20.440
So, here's the deal.

00:02:20.440 --> 00:02:25.760
So, you go in here and somewhere, you can just go into it and you say pi country.countries

00:02:25.760 --> 00:02:27.520
and there's 249 here.

00:02:27.520 --> 00:02:31.460
And you get these, not just a list of strings, but you get rich objects back.

00:02:31.460 --> 00:02:33.740
Like, the first one is Afghanistan.

00:02:33.740 --> 00:02:36.440
So, country, it's a class.

00:02:36.860 --> 00:02:40.820
It has the alpha two code, which is AF, the alpha three code, AFG.

00:02:40.820 --> 00:02:42.280
And that's the kind of stuff I'm talking about.

00:02:42.280 --> 00:02:44.400
That's like, why are there so many variations?

00:02:44.400 --> 00:02:48.800
You can represent, you know, the shorthand version, like just two letters, but you can also

00:02:48.800 --> 00:02:50.800
use three letters or there's numeric versions.

00:02:50.800 --> 00:02:54.240
There's like the full name versus the colloquial name.

00:02:54.240 --> 00:02:58.140
So, Afghanistan versus the Islamic Republic of Afghanistan.

00:02:58.640 --> 00:02:59.780
Oh, this is kind of cool.

00:02:59.780 --> 00:03:00.760
I might learn something.

00:03:00.760 --> 00:03:01.700
Yeah, exactly.

00:03:01.700 --> 00:03:02.900
There's a lot more in here.

00:03:02.900 --> 00:03:07.120
And there, it has a dictionary-like access for the variation.

00:03:07.120 --> 00:03:12.260
So, you can say, get alpha two equals DE and you'll get good old Deutschland.

00:03:12.260 --> 00:03:20.060
Or you could say alpha three equals DEU or the name equals Germany or all these different ways

00:03:20.060 --> 00:03:21.500
in which you can kind of query this.

00:03:21.840 --> 00:03:24.940
Or given one, you can obviously just access all these properties.

00:03:24.940 --> 00:03:29.060
Like, Brian, you would know that it's the Federal Republic of Germany.

00:03:29.060 --> 00:03:31.300
It has fuzzy searching for countries.

00:03:31.300 --> 00:03:32.540
So, I can say, give me England.

00:03:32.540 --> 00:03:33.540
It's like, yeah, there's no England.

00:03:33.540 --> 00:03:33.940
What?

00:03:33.940 --> 00:03:38.460
But there's this thing called United Kingdom, which sort of has its center in England, maybe.

00:03:38.460 --> 00:03:41.000
And that's GB and so on.

00:03:41.000 --> 00:03:42.740
So, yeah, pretty neat.

00:03:42.740 --> 00:03:47.080
You can say, fuzzy search for Cote and you get Cote d'Ivoire.

00:03:47.080 --> 00:03:50.340
Sorry, folks, from there.

00:03:50.340 --> 00:03:55.900
But, you know, you'll get, like, it'll even match when it's not exactly the right character, right?

00:03:55.900 --> 00:03:57.140
Like, oh, hat.

00:03:57.140 --> 00:03:57.960
I don't know what that's called.

00:03:57.960 --> 00:03:59.980
Not an umlau, but a hat-looking thing.

00:03:59.980 --> 00:04:02.180
But you don't have that in the search, right?

00:04:02.180 --> 00:04:02.580
Yeah.

00:04:02.580 --> 00:04:06.560
So, this is more, like I said, there's more to this than just like, oh, a list of countries.

00:04:06.560 --> 00:04:08.780
And then, it's historic countries.

00:04:08.780 --> 00:04:09.680
These are the ones.

00:04:09.680 --> 00:04:12.780
Did they, since I read this, did they change it from historic to deleted?

00:04:12.780 --> 00:04:13.120
I don't know.

00:04:13.120 --> 00:04:13.920
Historic countries.

00:04:13.920 --> 00:04:15.600
Subdivisions.

00:04:15.600 --> 00:04:16.980
I'm like, what is a subdivision?

00:04:16.980 --> 00:04:17.700
Of a country.

00:04:17.700 --> 00:04:19.620
This is like states or providences.

00:04:19.620 --> 00:04:22.040
It's not nearly as strange as it sounds.

00:04:22.040 --> 00:04:23.880
There's scripts also.

00:04:23.880 --> 00:04:24.560
What is a script?

00:04:24.560 --> 00:04:27.080
It's written language versus spoken language.

00:04:27.080 --> 00:04:30.440
Those might be the same thing, but they might also not be the same.

00:04:30.440 --> 00:04:32.180
Like Latin, for example, right?

00:04:32.180 --> 00:04:33.460
Oh, yeah.

00:04:33.460 --> 00:04:33.660
Okay.

00:04:33.660 --> 00:04:34.980
Currencies are in here.

00:04:34.980 --> 00:04:36.260
Languages are in here.

00:04:36.260 --> 00:04:37.780
Locales are in here.

00:04:37.780 --> 00:04:41.200
So, if you do anything with countries, this might be worth looking at.

00:04:41.200 --> 00:04:42.220
That's pretty cool.

00:04:42.220 --> 00:04:42.800
Yeah.

00:04:42.800 --> 00:04:45.760
I'm still, like, hung up on that England isn't a country.

00:04:45.760 --> 00:04:45.840
True.

00:04:45.840 --> 00:04:46.580
But, okay.

00:04:46.580 --> 00:04:49.700
According to by country, it's not a country.

00:04:49.700 --> 00:04:50.140
Okay.

00:04:50.140 --> 00:04:53.980
And also, so, yeah, I'll have to look into this more.

00:04:53.980 --> 00:04:55.080
Is it a subdivision?

00:04:55.080 --> 00:04:56.140
Maybe it's a subdivision.

00:04:56.140 --> 00:05:02.000
But also, like, where does the word Deutschland fit in for Germany?

00:05:02.000 --> 00:05:03.320
Is that not even listed?

00:05:03.320 --> 00:05:04.320
Yeah.

00:05:04.320 --> 00:05:04.440
Yeah.

00:05:04.440 --> 00:05:06.760
Well, also, since it has translations.

00:05:06.760 --> 00:05:11.820
So, for example, German, if you ask a German person where they're from, they'll say Deutschland,

00:05:11.820 --> 00:05:13.740
unless they're speaking English to people, right?

00:05:13.740 --> 00:05:15.100
Like, they refer to it as Deutschland.

00:05:15.100 --> 00:05:15.820
Yeah.

00:05:15.920 --> 00:05:17.580
But for some reason, we don't agree.

00:05:17.580 --> 00:05:18.500
We don't call it that.

00:05:18.500 --> 00:05:19.340
We call it Germany.

00:05:19.340 --> 00:05:20.320
Right?

00:05:20.320 --> 00:05:20.860
Yeah.

00:05:20.860 --> 00:05:22.000
So, I don't know.

00:05:22.000 --> 00:05:22.800
It's interesting.

00:05:22.800 --> 00:05:29.480
I suspect if you use the translations, maybe, and you said, you know, what is the official name of Germany?

00:05:29.480 --> 00:05:33.680
It probably wouldn't say the Federal Republic of Germany would have that translated, right?

00:05:33.680 --> 00:05:34.940
Interesting.

00:05:34.940 --> 00:05:35.460
Yeah.

00:05:35.460 --> 00:05:39.880
Like, Switzerland is, I can't remember exactly.

00:05:39.880 --> 00:05:40.600
But, yeah, it's different.

00:05:40.600 --> 00:05:44.600
It goes by different names and different languages.

00:05:44.600 --> 00:05:47.660
So, I think it also has those when it talks about the translations.

00:05:47.660 --> 00:05:48.340
Cool.

00:05:48.340 --> 00:05:48.840
Neat.

00:05:48.840 --> 00:05:52.460
Well, we could point to countries.

00:05:52.460 --> 00:05:54.040
I'm trying to do a transition.

00:05:54.040 --> 00:05:56.060
Or we could point to objects.

00:05:56.060 --> 00:05:59.240
And does Python have pointers?

00:05:59.240 --> 00:06:01.380
You can't really point to a country.

00:06:01.380 --> 00:06:02.040
I don't know.

00:06:02.040 --> 00:06:03.040
Maybe.

00:06:03.040 --> 00:06:04.420
Point to directions.

00:06:04.420 --> 00:06:06.860
Canada's that way.

00:06:06.860 --> 00:06:07.880
Canada's that way.

00:06:07.880 --> 00:06:09.940
No, Canada's this way.

00:06:09.940 --> 00:06:10.780
Oh, man.

00:06:10.780 --> 00:06:13.500
But we're probably pointing to different directions.

00:06:13.500 --> 00:06:14.460
Anyway.

00:06:14.460 --> 00:06:19.720
So, Ned Batchelder has an article called, Does Python have pointers?

00:06:19.720 --> 00:06:22.220
And I'm like, yeah, no, it doesn't.

00:06:22.220 --> 00:06:23.880
But kind of does.

00:06:23.880 --> 00:06:24.360
Anyway.

00:06:25.620 --> 00:06:35.540
I'm highlighting this because I think it's a really good article for somebody that's coming from a language that does have pointers and stuff to Python.

00:06:35.540 --> 00:06:38.540
Because it's a good entryway into names in Python.

00:06:38.540 --> 00:06:41.680
So, the article does Python and pointers.

00:06:41.920 --> 00:06:48.280
But it's kind of pointing to the idea of, like, talking about the ID function.

00:06:48.280 --> 00:06:52.480
And I know about the ID function really well.

00:06:52.480 --> 00:07:01.060
So, if you say ID of an object or a variable name, it tells you, like, a number for what it points to.

00:07:01.060 --> 00:07:05.040
Like, where the, I don't know, it's a representation of the memory address or something.

00:07:05.400 --> 00:07:07.060
That's kind of what a pointer is, right?

00:07:07.060 --> 00:07:11.600
But you can't, in C and C++ and Rust and other things, you can dereference it.

00:07:11.600 --> 00:07:14.180
Using that, you can create a variable.

00:07:14.180 --> 00:07:17.300
Using the address, you can create a variable that points to that thing.

00:07:17.300 --> 00:07:19.540
And you cannot do that within Python.

00:07:19.540 --> 00:07:20.940
So, it is different.

00:07:20.940 --> 00:07:24.580
But also, kind of everything is a pointer in Python.

00:07:24.920 --> 00:07:34.660
And that's sort of Ned's point, is that with, like, just normal object, we can say, like, my var equals 17.

00:07:34.660 --> 00:07:40.520
And then we can have, if you do my pointer, it doesn't help you any.

00:07:40.520 --> 00:07:45.420
But you can do another variable that points to the same thing, and it works.

00:07:45.420 --> 00:07:48.700
It's when, it's just sort of how names work.

00:07:48.700 --> 00:07:55.480
I'm describing this very poorly, but this is a good entry point into, well, how objects work.

00:07:55.480 --> 00:08:00.620
And luckily, Ned also links to a talk he did, names that refer to objects.

00:08:00.620 --> 00:08:07.660
And so, he did a talk in 2015, and still the slides are up in the video, but even the slides just going through it.

00:08:07.660 --> 00:08:11.920
It's really good to understand just really how names work.

00:08:11.920 --> 00:08:14.860
We're just, in Python, we just kind of point to things.

00:08:14.860 --> 00:08:21.240
And so, we're going to link also to the 2015 article, Python names and values.

00:08:21.240 --> 00:08:23.960
And really, this was the trick.

00:08:23.960 --> 00:08:29.960
When I really could grok this thing with Python, then I could understand Python.

00:08:29.960 --> 00:08:32.220
Everything else seems easy after this.

00:08:32.220 --> 00:08:34.580
So, good job, Ned.

00:08:34.580 --> 00:08:36.180
Yeah, Ned always has good writing.

00:08:36.180 --> 00:08:37.720
I'm subscribed to his RSS feed.

00:08:37.720 --> 00:08:42.800
I think it's interesting to consider whether Python, you know, the article, does Python have pointers?

00:08:42.800 --> 00:08:44.420
Like, boy, howdy, does it?

00:08:44.420 --> 00:08:46.400
Yeah, yeah.

00:08:46.400 --> 00:08:50.260
Like, it has more pointers than C++, which is insane.

00:08:50.260 --> 00:08:53.760
It doesn't have a wider variety of ways to, like, dereference them.

00:08:53.760 --> 00:08:57.160
You know, it starts, like, casting a void star star to something else.

00:08:57.160 --> 00:09:00.740
But everything, literally everything in Python is a pointer.

00:09:00.740 --> 00:09:02.140
Even numbers are pointers.

00:09:02.140 --> 00:09:05.500
Whereas in C++, numbers usually are value types.

00:09:05.500 --> 00:09:05.960
Yeah.

00:09:06.000 --> 00:09:06.200
Right.

00:09:06.200 --> 00:09:09.420
And you can have stuff that's on the stack that's not a pointer, just has the value.

00:09:09.420 --> 00:09:12.000
In Python, there is no way to have just a value.

00:09:12.000 --> 00:09:13.660
Every, everything is a pointer.

00:09:13.660 --> 00:09:15.060
Often pointers to pointers.

00:09:15.060 --> 00:09:17.420
You know, you're traversing something to something, right?

00:09:17.420 --> 00:09:20.900
It's like, I'm going to find the dictionary of the class.

00:09:20.900 --> 00:09:24.100
And then I'm following that to where it points to to get to the value.

00:09:25.260 --> 00:09:34.480
So it's worth spending some time on, even though you don't ever see a star or an ampersand in the context of, like, juggling pointers in Python.

00:09:34.480 --> 00:09:34.980
Yeah.

00:09:34.980 --> 00:09:43.780
And, like, vectors or lists in Python are not, they're not the plate, the start of a chunk of memory that represents all of your items.

00:09:43.780 --> 00:09:45.040
That's not what's going on.

00:09:45.040 --> 00:09:47.040
It's something completely different.

00:09:47.040 --> 00:09:47.860
Forget that.

00:09:48.500 --> 00:09:49.480
So, yeah.

00:09:49.480 --> 00:09:50.780
Indeed, indeed.

00:09:50.780 --> 00:09:51.460
Very good.

00:09:51.460 --> 00:09:52.060
Very good.

00:09:52.060 --> 00:09:58.680
Well, changing gears a little bit, we'd like to thank Scout APM for sponsoring this episode.

00:09:58.680 --> 00:09:59.900
Yes, we would.

00:09:59.900 --> 00:10:03.780
Let me tell you real quick about Scout APM.

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

00:10:07.440 --> 00:10:13.740
So if you are tired of spending hours trying to find the root cause of issues impacting your performance,

00:10:13.740 --> 00:10:16.540
then you owe it to yourself to check out Scout APM.

00:10:16.900 --> 00:10:21.020
They're a leading Python application performance monitoring tool, APM,

00:10:21.020 --> 00:10:25.780
that helps you identify and solve performance abnormalities faster and easier.

00:10:25.780 --> 00:10:31.060
Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs,

00:10:31.060 --> 00:10:36.060
and the dreaded N plus one queries that you can end up if you do lazy loading in your ORM,

00:10:36.060 --> 00:10:39.060
and then you say, oh, no, why is it so slow?

00:10:39.060 --> 00:10:41.400
Why are you doing 200 database queries for what should be one?

00:10:41.400 --> 00:10:42.840
So you can find out things like that.

00:10:42.840 --> 00:10:46.860
And it links it back directly to source code so you can spend less time in the debugger,

00:10:46.860 --> 00:10:50.220
and peeling logs and just finding the problems and moving on.

00:10:50.220 --> 00:10:53.320
And you'll love it because it's built for developers by developers.

00:10:53.320 --> 00:10:54.980
It makes it easy to get set up.

00:10:54.980 --> 00:10:57.500
Seriously, you can do it in less than four minutes.

00:10:57.500 --> 00:10:58.320
So that's awesome.

00:10:58.320 --> 00:11:01.440
And the best part is the pricing is straightforward.

00:11:01.440 --> 00:11:06.860
You only pay for the data that you use with no hidden overage fees or per seat pricing.

00:11:07.580 --> 00:11:09.340
And I just learned this, Brian.

00:11:09.340 --> 00:11:14.480
They also have, they provide the pro version for free to all open source projects.

00:11:14.480 --> 00:11:19.000
So if you're an open source maintainer and you want to have Scout APM for that project,

00:11:19.000 --> 00:11:21.900
just shoot them a message or something on their pricing page about that.

00:11:21.900 --> 00:11:25.780
So you can start your free trial and get instant insights today.

00:11:25.780 --> 00:11:28.460
Visit buythombice.fm slash Scout.

00:11:28.680 --> 00:11:30.700
The link is in your podcast player show notes as well.

00:11:30.700 --> 00:11:32.120
And please use that link.

00:11:32.120 --> 00:11:36.080
Don't just search for them because otherwise they don't think you came from us.

00:11:36.080 --> 00:11:37.680
And then they'd stop supporting the show.

00:11:37.680 --> 00:11:40.240
So please use our link, buythombice.fm slash Scout.

00:11:40.240 --> 00:11:41.160
Check them out.

00:11:41.160 --> 00:11:43.140
It really supports the show.

00:11:43.140 --> 00:11:44.200
Yes, it does.

00:11:44.200 --> 00:11:44.380
Thank you.

00:11:44.380 --> 00:11:45.220
It does.

00:11:45.220 --> 00:11:45.740
It sure does.

00:11:45.740 --> 00:11:50.000
Now, Brian, let's talk about ingestion, data ingestion.

00:11:50.000 --> 00:11:50.500
Okay.

00:11:50.960 --> 00:11:53.600
So here's an open source CLI tool.

00:11:53.600 --> 00:11:59.540
It's not exactly Python focused, but certainly useful for Python people.

00:11:59.540 --> 00:12:00.500
Ingestor.

00:12:00.500 --> 00:12:04.880
And it's straight out of the web 2.0 days because it's dropping some of the vowels.

00:12:04.880 --> 00:12:12.480
It says copy data between any source and any destination thinking database type things.

00:12:12.480 --> 00:12:15.500
So what you do is you just say ingestor ingest.

00:12:15.500 --> 00:12:18.420
Source database connection is whatever.

00:12:18.420 --> 00:12:20.400
Source table is whatever.

00:12:20.620 --> 00:12:22.500
And then the destination is where it goes.

00:12:22.500 --> 00:12:24.540
And all of a sudden, now you have that.

00:12:24.540 --> 00:12:29.060
So do you want your Postgres data to appear over in BigQuery?

00:12:29.060 --> 00:12:33.100
Do you want your MongoDB collection to show up in Postgres?

00:12:33.100 --> 00:12:35.140
One CLI command, done.

00:12:35.140 --> 00:12:36.140
Oh, that's pretty cool.

00:12:36.140 --> 00:12:37.020
It's pretty cool, right?

00:12:37.020 --> 00:12:37.460
Yeah.

00:12:37.460 --> 00:12:45.140
So it's a command line application that allows ingesting or copying data from any source into any database.

00:12:45.140 --> 00:12:48.120
I mean, this job probably should be a star on any.

00:12:49.340 --> 00:12:52.140
There are, how about many, many data sources?

00:12:52.140 --> 00:12:52.800
Okay.

00:12:52.800 --> 00:12:53.260
Yeah.

00:12:53.520 --> 00:13:00.400
So if we jump over here to their docs where, like, their homepage is kind of just to catch your interest.

00:13:01.000 --> 00:13:03.440
So you can copy, I'll find the sources and tell you about them in a second.

00:13:03.440 --> 00:13:07.220
But it says there's three ways to copy stuff over.

00:13:07.220 --> 00:13:09.140
You can do an append, which is kind of cool.

00:13:09.280 --> 00:13:16.540
Like, if you've got multiple data sources that are localized, saving of data, and you want to put them all into one place.

00:13:16.540 --> 00:13:20.840
Like, if you had a bunch of SQLite files from different locations.

00:13:20.840 --> 00:13:25.440
Say you've got a bunch of, I don't know, a bunch of IoT things.

00:13:25.440 --> 00:13:27.860
Or you've got a bunch of servers.

00:13:27.860 --> 00:13:30.800
And they each keep some data in a SQLite file.

00:13:30.800 --> 00:13:32.960
And you want to put that into one big database, right?

00:13:32.960 --> 00:13:33.780
You could do append.

00:13:33.780 --> 00:13:35.000
Or you could say merge.

00:13:35.000 --> 00:13:38.940
I'm guessing if the primary key is the same, it just skips it.

00:13:38.940 --> 00:13:41.700
Maybe it doesn't update to that thing if the fields are different.

00:13:41.700 --> 00:13:42.160
I don't know.

00:13:42.420 --> 00:13:45.440
Or you can just wipe it free and insert.

00:13:45.440 --> 00:13:47.700
So like a clean replacement.

00:13:47.700 --> 00:13:48.820
Delete and insert.

00:13:48.820 --> 00:13:49.300
Yeah.

00:13:49.300 --> 00:13:49.760
Yeah?

00:13:49.760 --> 00:13:50.340
Pretty cool.

00:13:50.340 --> 00:13:53.040
And then somewhere down here, supported sources.

00:13:53.040 --> 00:13:54.600
Here's where I was joking about the NA.

00:13:54.600 --> 00:13:55.820
Supports Postgres.

00:13:55.820 --> 00:13:58.880
And it has, some of them are bidirectional, source or destination.

00:13:58.880 --> 00:13:59.720
Some are just source.

00:13:59.720 --> 00:14:00.680
Some are just destination.

00:14:00.680 --> 00:14:07.900
Postgres, BigQuery, Snowflake, Redshift, Databricks, DIPDB, Microsoft SQL Server, and CSV files are all bidirectional.

00:14:07.900 --> 00:14:09.960
CSV files are bidirectional, okay?

00:14:11.060 --> 00:14:14.920
But Mongo, Oracle, SQLite, and MySQL are only sources.

00:14:14.920 --> 00:14:23.840
So I don't know why MongoDB is not a destination because it's incredibly easy to just have like a flat file, a flat table, no like nested stuff.

00:14:23.840 --> 00:14:26.480
I know if you're copying from a relational database, but yeah, whatever.

00:14:26.480 --> 00:14:29.940
Still pretty cool, I think, to be able to use this.

00:14:29.940 --> 00:14:36.300
So if you got just data you want to keep in sync or migrate over and you're thinking of writing Python code to do it, you might not have to write any code at all.

00:14:36.300 --> 00:14:37.220
Well, that's pretty cool.

00:14:37.220 --> 00:14:38.640
I don't know what Snowflake is.

00:14:38.640 --> 00:14:39.540
It's a great name.

00:14:39.540 --> 00:14:41.160
Yeah, we're getting out of that season right now.

00:14:41.160 --> 00:14:45.600
It's starting to be warm and summer's coming, but it'll be back in the fall, like maybe December.

00:14:45.600 --> 00:14:46.480
No.

00:14:46.480 --> 00:14:47.740
That's funny.

00:14:47.740 --> 00:14:48.120
Cool.

00:14:48.120 --> 00:14:50.020
Well, yeah, very interesting.

00:14:50.020 --> 00:14:56.680
Speaking of command lines, I ran across David Lord's article, Make Your Terminal Nice.

00:14:56.900 --> 00:15:05.580
And this is just sort of a little shout out because so apparently David is using he's using fish, which I haven't heard about for a while.

00:15:06.380 --> 00:15:08.000
So nicer prompt with starship.

00:15:08.000 --> 00:15:10.520
So nicer prompt with starship and a nicer shell with fish.

00:15:10.520 --> 00:15:16.140
And this isn't really a detailed article, but it's just sort of like things can be nicer.

00:15:16.440 --> 00:15:21.220
And I was reminded about this because I think a long time ago we were talking with.

00:15:23.120 --> 00:15:25.780
Anyway, somebody else about starship.

00:15:25.780 --> 00:15:27.980
And I was like, I should try starship.

00:15:27.980 --> 00:15:28.860
And I tried it.

00:15:28.860 --> 00:15:30.880
And for some reason, didn't work for me.

00:15:30.880 --> 00:15:31.840
But I'm like this.

00:15:31.840 --> 00:15:33.420
I think it's time to start again.

00:15:33.740 --> 00:15:35.660
And so I looked into both of these.

00:15:35.660 --> 00:15:36.980
I tried fish.

00:15:36.980 --> 00:15:45.040
And I do really appreciate that it says, finally, command line shell for the 90s, which is awesome and funny.

00:15:45.040 --> 00:15:49.660
And it's also in Comic Sans, which I ironically appreciate.

00:15:49.660 --> 00:15:53.560
But the scripting language is a little different.

00:15:53.560 --> 00:15:56.540
And I've got a lot of customizations for Bash.

00:15:56.540 --> 00:15:59.540
And ZShell is very compatible with Bash.

00:15:59.540 --> 00:16:02.200
So I usually use either Bash or ZShell.

00:16:02.360 --> 00:16:03.860
And I think I'm going to stick with that.

00:16:03.860 --> 00:16:06.680
But Starship, Starship's amazing.

00:16:06.680 --> 00:16:09.400
And so I switched to Starship.

00:16:09.400 --> 00:16:13.300
And when you go to Starship, there's an installation guide.

00:16:13.300 --> 00:16:15.160
And really, it was so easy.

00:16:15.160 --> 00:16:18.220
There's a macOS line.

00:16:18.220 --> 00:16:20.140
You just curl install it.

00:16:20.140 --> 00:16:21.340
Or you can homebrew.

00:16:21.340 --> 00:16:23.500
I think I did the homebrew thing.

00:16:23.500 --> 00:16:26.040
Anyway, but then how do you use it?

00:16:26.040 --> 00:16:30.360
There's a usage of just, so I was on ZShell.

00:16:30.720 --> 00:16:34.160
So you just add one line to your ZShell RC.

00:16:34.160 --> 00:16:39.640
But there's instructions on how to do it within Bash or Fish or PowerShell.

00:16:39.640 --> 00:16:40.640
Oh, cool.

00:16:40.640 --> 00:16:41.540
It works with PowerShell.

00:16:41.540 --> 00:16:44.680
That's pretty neat for all you Windows people out there.

00:16:45.780 --> 00:16:56.480
So what you get, what I really like is this notion of the directory is right there listed above your command.

00:16:56.480 --> 00:17:05.020
And then listing what I really like is what my Git branch is, my directory, which version of Python I'm using.

00:17:05.020 --> 00:17:06.900
The example here shows a Rust.

00:17:06.900 --> 00:17:10.180
But it shows which version of Python you're using.

00:17:10.180 --> 00:17:12.860
And then also what virtual environment you're in.

00:17:12.860 --> 00:17:15.340
So having, and I didn't configure that at all.

00:17:15.340 --> 00:17:16.340
That's just the default.

00:17:16.340 --> 00:17:17.420
And I'm like, that's good.

00:17:17.420 --> 00:17:18.500
I'm good with that.

00:17:18.760 --> 00:17:20.620
So I haven't configured it at all.

00:17:20.620 --> 00:17:22.200
Just the default right out of the box.

00:17:22.200 --> 00:17:23.640
It works really good.

00:17:23.640 --> 00:17:25.440
So I'm pretty happy so far.

00:17:25.440 --> 00:17:25.660
Anyway.

00:17:25.660 --> 00:17:28.420
Yeah, I think there's a lot of options here, right?

00:17:28.420 --> 00:17:29.520
There's on my ZShell.

00:17:29.520 --> 00:17:31.080
There's Starship.

00:17:31.080 --> 00:17:33.200
There's all the different shells.

00:17:33.200 --> 00:17:34.840
These days I'm using Warp.

00:17:34.840 --> 00:17:36.400
Warp.dev, which is pretty excellent.

00:17:36.400 --> 00:17:37.740
I talked about that on the show before.

00:17:37.740 --> 00:17:39.040
I kind of forgot about Warp.

00:17:39.040 --> 00:17:39.580
We should try it.

00:17:39.580 --> 00:17:40.980
Warp is cool.

00:17:41.400 --> 00:17:48.220
I think the big thing, the big message people should take away from this is don't just take what your operating system gives you.

00:17:48.220 --> 00:17:50.320
It's really quite bad.

00:17:50.320 --> 00:17:52.820
It's not just not great.

00:17:52.820 --> 00:17:53.680
It's bad.

00:17:53.680 --> 00:17:59.920
And a lot of people who are like, I don't really like, I'm not really a terminal person or I'm not a CLI person.

00:17:59.920 --> 00:18:06.400
That's because they didn't spend 30 minutes once getting it to where like, oh, actually, oh, that's nice.

00:18:06.400 --> 00:18:09.520
And you point out like, oh, well, is there a virtual environment active?

00:18:09.520 --> 00:18:10.700
What is its version?

00:18:11.080 --> 00:18:13.540
And then all these other things, you know, are there Git changes?

00:18:13.540 --> 00:18:14.860
Am I in a Git repository at all?

00:18:14.860 --> 00:18:15.560
Are there changes?

00:18:15.560 --> 00:18:16.180
Et cetera.

00:18:16.180 --> 00:18:19.620
Like all those little, every one of those is just, oh, that's nice too.

00:18:19.620 --> 00:18:21.140
And, you know, it really adds up.

00:18:21.140 --> 00:18:32.080
Well, and I've always been one to, I mean, for my career, I'm usually juggling multiple projects, multiple branches on projects and everything.

00:18:32.080 --> 00:18:35.560
And I've kind of been okay knowing what I'm doing.

00:18:35.820 --> 00:18:42.700
However, recently, I just have leveled up that of using way more branches, way more projects.

00:18:42.700 --> 00:18:50.000
And just having that information for me right there to make sure that I know what version of Python I'm using, what branch I'm on.

00:18:50.000 --> 00:18:54.680
And having that just ever present is like, oh, my God, I don't have to think about that anymore.

00:18:54.680 --> 00:18:55.400
Awesome.

00:18:55.400 --> 00:18:56.140
It's just right there.

00:18:56.140 --> 00:19:01.480
So I just hit that, hit that like pain point where having that information is helping me.

00:19:01.480 --> 00:19:03.340
And so I appreciate it.

00:19:03.340 --> 00:19:03.960
So yeah.

00:19:03.960 --> 00:19:04.660
Very nice.

00:19:04.660 --> 00:19:05.100
Cool.

00:19:05.100 --> 00:19:05.440
Nice.

00:19:06.000 --> 00:19:07.180
How about any extras?

00:19:07.180 --> 00:19:08.260
Do you have any extras for us?

00:19:08.260 --> 00:19:09.620
I'm feeling extras today.

00:19:09.620 --> 00:19:10.780
I got a few extras for folks.

00:19:10.780 --> 00:19:15.760
First of all, I spoke about uv or no, Brian, you spoke about uv and I just jumped on.

00:19:15.760 --> 00:19:17.900
We both wanted to talk about it, but you had it first, I believe.

00:19:17.900 --> 00:19:18.380
Yeah.

00:19:18.380 --> 00:19:20.460
It was officially your topic on the show.

00:19:20.460 --> 00:19:24.740
However, and you had Charlie Marsh on testing code.

00:19:25.140 --> 00:19:34.640
And so I just published an episode of Talk Python having a conversation with Charlie about uv and a little bit of rough and just life in general.

00:19:34.640 --> 00:19:42.720
But I have a big backlog of shows over there that I'm working to release because I've recorded faster than weekly release cadence.

00:19:42.720 --> 00:19:45.500
But this one seemed very timely.

00:19:45.500 --> 00:19:48.640
So I put it, put it to the front of the queue so people can check that out.

00:19:48.640 --> 00:19:50.060
I can't wait to listen.

00:19:50.060 --> 00:19:51.380
Yeah, it was fun.

00:19:51.380 --> 00:19:56.580
Also follow up here is there's this really interesting YouTube channel.

00:19:56.580 --> 00:19:58.660
I don't know if it's in general interesting.

00:19:58.660 --> 00:20:01.360
Just the one I watched is called Dark Matter.

00:20:01.360 --> 00:20:10.000
And they have like highly produced video versions of what would be a podcast, which is kind of interesting.

00:20:10.000 --> 00:20:15.660
So they had the one with David DHH talking about the leaving the cloud, cloud fugitive.

00:20:15.660 --> 00:20:20.140
But just like if you look at the video side of it, it's like could be a documentary sort of thing.

00:20:20.140 --> 00:20:21.280
So anyway, that's interesting.

00:20:21.280 --> 00:20:21.920
And we're checking out.

00:20:21.920 --> 00:20:24.480
You want to follow up on all my leaving the cloud talk I did.

00:20:24.480 --> 00:20:34.380
For those who like to live out near the front of the leading edge, Python 3.13 alpha 5 is available.

00:20:34.380 --> 00:20:36.440
And people can go check that out.

00:20:36.440 --> 00:20:38.140
So it's not quite beta.

00:20:38.140 --> 00:20:40.460
And once it hits beta, there's no more changes.

00:20:40.460 --> 00:20:43.000
But right now, they're still potentially breaking changes.

00:20:43.000 --> 00:20:43.900
Things could be added.

00:20:43.900 --> 00:20:44.740
Things could be removed.

00:20:44.740 --> 00:20:45.400
So on.

00:20:45.400 --> 00:20:50.160
But in this thing I'm linking to, there's a nice list of, you know, what's some of the improvements like.

00:20:50.160 --> 00:20:54.220
For example, how exciting a preliminary experimental JIT was added, by the way.

00:20:54.220 --> 00:20:56.140
Just like throwing that out there as if it's nothing.

00:20:56.140 --> 00:20:59.040
Your Python will be compiled.

00:21:00.040 --> 00:21:02.880
And then finally, this one comes to us from Pat Decker.

00:21:02.880 --> 00:21:03.960
Target Tech.

00:21:03.960 --> 00:21:06.020
So the tech blog at Target.

00:21:06.020 --> 00:21:07.000
This is really cool.

00:21:07.000 --> 00:21:12.460
Said Target posted something on their blog, which I didn't know they had a tech blog.

00:21:12.460 --> 00:21:13.660
So that's, I guess, news.

00:21:13.660 --> 00:21:14.900
But cool for them.

00:21:14.900 --> 00:21:17.200
Announcing Target's open source fund.

00:21:17.200 --> 00:21:17.800
Oh, cool.

00:21:18.100 --> 00:21:18.340
Yeah.

00:21:18.340 --> 00:21:23.040
And it says, we created Target's open source fund as a commitment to support open source projects we use.

00:21:23.040 --> 00:21:30.660
In short, Target now directly donates the projects through an internal process that prioritizes representation of Target's technology team.

00:21:30.660 --> 00:21:31.580
Perfect.

00:21:31.580 --> 00:21:32.420
This is perfect.

00:21:32.420 --> 00:21:38.100
Like, it says, look, we're basing this on some of the prior work that's out there.

00:21:38.100 --> 00:21:44.960
And in fact, the success of Sentry and Microsoft's open source funds have inspired them to go further.

00:21:44.960 --> 00:21:55.800
And then it lists projects like, you just gave a shout out to Homebrew, OpenAPI Generator, SDKman, MockK for Kotlin and HTTP 4K.

00:21:55.800 --> 00:21:57.960
So it looks like they do a lot of stuff with Kotlin.

00:21:57.960 --> 00:21:59.360
So they're supporting that.

00:21:59.360 --> 00:22:00.300
But whatever, right?

00:22:00.300 --> 00:22:01.700
You support what you use.

00:22:01.700 --> 00:22:02.320
I think that's cool.

00:22:02.320 --> 00:22:02.840
Yeah.

00:22:02.840 --> 00:22:03.900
I think, yeah.

00:22:03.900 --> 00:22:04.700
Every company.

00:22:04.700 --> 00:22:08.820
I mean, every company, even companies you don't even think use open source, use open source.

00:22:08.820 --> 00:22:09.360
So.

00:22:09.360 --> 00:22:11.000
Yes, exactly.

00:22:11.000 --> 00:22:11.260
Yeah.

00:22:11.260 --> 00:22:19.500
There was a quote they gave in here that said, the Linux Foundation estimates that 90% of the code in production is of open source origin.

00:22:19.500 --> 00:22:22.100
Probably, you know, using libraries based on open source.

00:22:22.100 --> 00:22:27.460
I would imagine, you know, like the fact you use Flask would make your stuff of open source origin, I would imagine.

00:22:27.460 --> 00:22:27.920
Yeah.

00:22:27.920 --> 00:22:36.060
And I know that there are some wrinkles in how the money often gets distributed, but some money getting distributed is better than none.

00:22:36.060 --> 00:22:37.360
So that's a good thing.

00:22:37.360 --> 00:22:41.880
I'll say one more thing just to encourage other companies, people within other companies to do this.

00:22:41.880 --> 00:22:47.060
We recognize that it's our responsibility to engage across a broad spectrum of activities.

00:22:47.060 --> 00:22:54.940
This includes contributing our own software to open source, joining communities and patching software used by others, plus funding with money the others.

00:22:54.940 --> 00:22:56.160
That's pretty cool.

00:22:56.360 --> 00:22:56.900
Yeah, cool.

00:22:56.900 --> 00:23:05.780
Well, the only extra I've got is that I have been working on a side project that I'm starting to ramp up a little bit.

00:23:05.780 --> 00:23:10.240
And I've decided to have a start in a SAS project.

00:23:10.240 --> 00:23:18.500
And I've started, thought I would get a little head start by using Corey Zhu's SAS Pegasus.

00:23:18.660 --> 00:23:21.340
So I'm, I talked with him just the other day.

00:23:21.340 --> 00:23:24.760
So his interview will be on, on, on Python test.

00:23:24.760 --> 00:23:29.820
But as I go along, I'll be reporting how it's going.

00:23:29.820 --> 00:23:32.340
And yeah, I'm just excited to get started.

00:23:32.340 --> 00:23:33.240
So nice.

00:23:33.240 --> 00:23:35.760
You're going to live blog it, blog, blog the progress.

00:23:36.200 --> 00:23:36.500
Yeah.

00:23:36.500 --> 00:23:43.940
It's just, it's just going to be slow going because there's a lot, there's a lot more going on in my life, but I want to get it off the ground.

00:23:43.940 --> 00:23:44.600
Indeed.

00:23:44.600 --> 00:23:45.100
Yep.

00:23:45.340 --> 00:23:46.820
I know the feeling.

00:23:46.820 --> 00:23:48.900
How about something funny?

00:23:48.900 --> 00:23:49.440
Yes.

00:23:49.440 --> 00:23:50.760
Let's talk about something funny.

00:23:50.760 --> 00:23:54.220
So this comes to us from DevHumor directly submitted by admin.

00:23:54.560 --> 00:23:57.920
This has, it's got like a kind of a cybersecurity thing here, Brian.

00:23:57.920 --> 00:23:58.460
Okay.

00:23:58.460 --> 00:24:01.740
So, you know, like social engineering, like, Hey, I'm from IT.

00:24:01.740 --> 00:24:06.400
You're going to get a pop-up on your authenticator that says, you need this.

00:24:06.400 --> 00:24:07.520
We're just checking some systems.

00:24:07.520 --> 00:24:09.980
So if you don't mind just approving that, you know what I mean?

00:24:09.980 --> 00:24:13.600
I know it's your personal email, but we're just working on it for you.

00:24:13.600 --> 00:24:15.580
So anyway, here's the joke.

00:24:15.580 --> 00:24:22.060
If a person who tries to trick others into giving them personal or sensitive information is a social engineer,

00:24:22.340 --> 00:24:26.320
does that mean that the person who tries to prevent that is an anti-social engineer?

00:24:26.320 --> 00:24:36.520
Well, I mean, I've met a lot of cybersecurity people and I, maybe, I think it might be an overgeneralization, but yeah.

00:24:36.520 --> 00:24:37.420
Yeah.

00:24:37.420 --> 00:24:37.900
It's funny.

00:24:37.900 --> 00:24:40.560
Anyway, are you an anti-social engineer?

00:24:40.560 --> 00:24:41.600
This time it's a good thing.

00:24:41.600 --> 00:24:45.460
I know just who I need to send this to.

00:24:45.460 --> 00:24:46.220
This is awesome.

00:24:46.220 --> 00:24:47.120
Perfect.

00:24:47.120 --> 00:24:48.060
Awesome.

00:24:48.060 --> 00:24:48.500
Thanks.

00:24:48.500 --> 00:24:50.600
Well, that was a fun episode.

00:24:51.100 --> 00:24:54.080
And thank you everybody for listening and watching and everything.

00:24:54.080 --> 00:24:54.980
And thank you, Michael.

00:24:54.980 --> 00:24:55.460
Yep.

00:24:55.460 --> 00:24:55.740
You bet.

