WEBVTT

00:00:00.001 --> 00:00:04.020
I'm sure you're familiar with package managers for your OS, even if you don't use them.

00:00:04.020 --> 00:00:09.420
On macOS, we have Homebrew, Chocolaty on Windows, and Apt, Yum, and others on Linux.

00:00:09.420 --> 00:00:15.380
But if you want to install Python applications, you typically have to fall back to managing them with pip.

00:00:15.380 --> 00:00:19.100
Maybe you install them for your account with the --user flag.

00:00:19.100 --> 00:00:25.460
But with pipX, you get a clean, isolated install for every Python application that you use.

00:00:26.020 --> 00:00:30.460
And if you distribute Python apps, pipX is definitely worth considering as a channel.

00:00:30.460 --> 00:00:37.540
On this episode, we have Chad Smith, creator of pipX, to tell us all about it, how it works, and how to use it.

00:00:37.540 --> 00:00:45.100
This is Talk Python To Me, episode 371, recorded June 22, 2022.

00:00:45.100 --> 00:01:01.680
Welcome to Talk Python To Me, a weekly podcast on Python.

00:01:01.680 --> 00:01:03.420
This is your host, Michael Kennedy.

00:01:03.420 --> 00:01:09.100
Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past episodes at talkpython.fm.

00:01:09.100 --> 00:01:12.640
And follow the show on Twitter via at Talk Python.

00:01:12.880 --> 00:01:16.320
We've started streaming most of our episodes live on YouTube.

00:01:16.320 --> 00:01:23.840
Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.

00:01:23.840 --> 00:01:26.520
This episode is brought to you by Mergify.

00:01:26.520 --> 00:01:29.920
Take control of and automate your GitHub workflows.

00:01:29.920 --> 00:01:34.660
As well as the Python at Scale Summit conference being held in October.

00:01:34.660 --> 00:01:37.620
Reconnect with your data science colleagues this year.

00:01:38.740 --> 00:01:42.220
Transcripts for this and all of our episodes are brought to you by Assembly AI.

00:01:42.220 --> 00:01:44.920
Do you need a great automatic speech-to-text API?

00:01:44.920 --> 00:01:47.440
Get human-level accuracy in just a few lines of code.

00:01:47.440 --> 00:01:50.300
Visit talkpython.fm/assemblyai.

00:01:50.300 --> 00:01:52.720
Chad, welcome to Talk Python To Me.

00:01:52.720 --> 00:01:53.260
Thanks, Michael.

00:01:53.260 --> 00:01:54.800
It's fantastic to have you here.

00:01:55.320 --> 00:02:05.940
I and many listeners are such a fan of PipX and really just love to have that tool around to allow us to use Python libraries and commands like applications.

00:02:05.940 --> 00:02:07.380
And it's going to be so fun to talk about.

00:02:07.380 --> 00:02:10.200
And if you're out there and you haven't heard of PipX, you're in for a treat.

00:02:10.200 --> 00:02:12.860
So before we get to that, though, let's start with your story.

00:02:12.860 --> 00:02:14.040
How do you get into programming in Python?

00:02:14.040 --> 00:02:21.960
So I got into programming back when the internet was kind of like really popular with GeoCities, like early web development type stuff.

00:02:21.960 --> 00:02:24.900
This is the time when people had like the animated digging Giphy.

00:02:24.900 --> 00:02:25.340
Yeah.

00:02:25.340 --> 00:02:27.680
And like a lot of sites were still permanently under construction.

00:02:27.680 --> 00:02:28.140
Yes.

00:02:28.140 --> 00:02:30.540
And flashing text and stuff like that.

00:02:30.540 --> 00:02:32.080
So I thought that was pretty cool.

00:02:32.080 --> 00:02:33.960
I messed around with some GeoCities pages.

00:02:33.960 --> 00:02:39.520
I wrote a little bit of JavaScript to where you can like hover over text and it will change the image and stuff like that.

00:02:39.520 --> 00:02:46.980
And I kind of messed around with web pages for a while, but I didn't really get too serious with programming, with web development until later, much later.

00:02:46.980 --> 00:02:49.980
So when I got more into programming was in college.

00:02:49.980 --> 00:02:52.420
I went to, I got a degree in aerospace engineering.

00:02:52.420 --> 00:02:54.680
And so we did like kind of like scientific computing.

00:02:54.680 --> 00:02:56.160
We used MATLAB a lot.

00:02:56.160 --> 00:02:58.140
So I used a lot of MATLAB in college.

00:02:58.140 --> 00:03:00.820
And then in my first job, we did a lot of MATLAB.

00:03:00.820 --> 00:03:06.760
So in the aerospace industry for making airplanes and like control systems, we use MATLAB a lot.

00:03:06.760 --> 00:03:17.780
And so I kind of started hacking out MATLAB and making like a bunch of programs and automating stuff, not really going into other programming languages, which were probably better suited for the job.

00:03:17.780 --> 00:03:19.500
I just kind of did everything in MATLAB.

00:03:19.500 --> 00:03:25.440
That's the way I think most people do it is they have a set of tools to pick from that they know how to work with them.

00:03:25.440 --> 00:03:27.640
And they're like, well, which one of these is going to be best?

00:03:27.640 --> 00:03:31.600
And if your programming environment is MATLAB, then, you know, that's not a terrible choice, really.

00:03:31.600 --> 00:03:37.120
Yeah, I got like really into programming MATLAB and then eventually ended up at a job where I got to start doing a little Python.

00:03:37.120 --> 00:03:37.580
Nice.

00:03:37.580 --> 00:03:39.560
What kind of airplanes were you working on?

00:03:39.560 --> 00:03:43.160
First job was on the space shuttle, which was, which has been retired.

00:03:43.160 --> 00:03:44.960
Then I worked on like, I worked for Boeing.

00:03:44.960 --> 00:03:45.780
Of course.

00:03:45.780 --> 00:03:46.840
Oh, that's fantastic.

00:03:46.840 --> 00:03:48.980
Yeah, I worked from the 747, 787.

00:03:48.980 --> 00:03:49.880
So I worked for Boeing.

00:03:49.880 --> 00:03:54.100
So Boeing worked on the space shuttle and as well as obviously a bunch of other planes.

00:03:54.540 --> 00:03:56.940
And then none of the Python work was there, though.

00:03:56.940 --> 00:04:02.060
And the Python stuff started at a startup funded by Google co-founder Larry Page.

00:04:02.060 --> 00:04:05.280
So it was an EVTOL, electric vertical tick off and landing plane.

00:04:05.280 --> 00:04:06.700
So it's like a small plane.

00:04:06.700 --> 00:04:07.440
It was a startup.

00:04:07.440 --> 00:04:08.580
It was a small company.

00:04:08.580 --> 00:04:12.040
And we needed like basically some tools to be made.

00:04:12.040 --> 00:04:17.000
And I didn't really know Python, but I like to just take on new challenges and learn new things.

00:04:17.000 --> 00:04:21.760
So my first experience with Python was with Python 2 and working on a Django app.

00:04:21.760 --> 00:04:27.100
It was an app to track all of the parts and weights and moments of inertia of the aircraft.

00:04:27.100 --> 00:04:30.360
Another project was like called a protocol compiler.

00:04:30.360 --> 00:04:34.980
So all the C code that ran on the avionics was a lot of it was generated.

00:04:34.980 --> 00:04:40.140
A lot of the inter device communication was generated from this common protocol definition.

00:04:40.140 --> 00:04:42.140
And so this was all written in Python.

00:04:42.140 --> 00:04:44.520
So we could generate safety critical C code.

00:04:44.520 --> 00:04:47.020
We could generate documentation about the code.

00:04:47.020 --> 00:04:50.620
We could generate tests where we had like hardware in the loop tests.

00:04:50.620 --> 00:04:57.980
And so that was where I started to run into issues with challenges with packaging and getting dependencies installed on folks computers.

00:04:57.980 --> 00:05:02.500
Because if you wanted to build the flight code, you needed to have a bunch of packages available.

00:05:02.500 --> 00:05:02.820
Right.

00:05:02.820 --> 00:05:08.460
And so, you know, you had to have maybe some foundational thing in order, some libraries and other things.

00:05:08.460 --> 00:05:14.460
And you probably didn't want to teach necessarily C people how to set up Python and virtual environments and all that kind of stuff, right?

00:05:14.580 --> 00:05:14.940
Exactly.

00:05:14.940 --> 00:05:16.480
Or documentation writers.

00:05:16.480 --> 00:05:17.280
Yeah, exactly.

00:05:17.280 --> 00:05:19.260
And yeah, it was a small company.

00:05:19.260 --> 00:05:20.900
So there wasn't really a Python expert in house.

00:05:20.900 --> 00:05:27.280
So we kind of made a lot of the mistakes and I had to go into the infrastructure side too and try to build all that out.

00:05:27.280 --> 00:05:33.140
And so, you know, we started out with, I think we started out with pseudo pip install and that was how we got our things installed.

00:05:33.680 --> 00:05:34.520
Yeah, for sure.

00:05:34.520 --> 00:05:41.260
Well, you talk about this, the small business or a small company you're at and sort of bouncing off the walls and just figuring it out yourself.

00:05:41.260 --> 00:05:46.980
But you were also at Boeing, which is a non-small company for my looking in from the outside.

00:05:46.980 --> 00:05:47.420
Yeah.

00:05:47.420 --> 00:05:53.180
I know a lot of people, they definitely dream of or look to get hired at these really large companies.

00:05:53.180 --> 00:06:08.720
And yeah, I feel like there's a huge advantage to at least spending a little time in a company like this VTOL one you talked about where you're taking on a lot of responsibilities and you're kind of working together to figure out stuff rather than slot it into like a narrow slice of what's getting done.

00:06:08.720 --> 00:06:09.140
What do you think?

00:06:09.140 --> 00:06:10.680
What was your experience in those places?

00:06:10.680 --> 00:06:16.260
Well, so Boeing did offer opportunities to let you kind of like improve processes and stuff like that.

00:06:16.260 --> 00:06:21.960
But the scope of what you're working on at a small company, trying to build a similar product.

00:06:21.960 --> 00:06:27.440
I mean, you have a smaller team with no like legacy or decades of history building stuff.

00:06:27.440 --> 00:06:28.600
You're kind of just inventing it as you go.

00:06:28.600 --> 00:06:33.280
So yeah, there's a ton of stuff to experiment with and take on and learn from.

00:06:33.280 --> 00:06:33.600
Yeah.

00:06:33.600 --> 00:06:34.060
Cool.

00:06:34.060 --> 00:06:34.840
How about now?

00:06:34.840 --> 00:06:36.560
You're at another small company, right?

00:06:36.560 --> 00:06:37.320
Yeah.

00:06:37.320 --> 00:06:38.860
I'm at a small company called Meta.

00:06:38.860 --> 00:06:44.780
I work for the, I work for Reality Labs and I work on developer infrastructure here as well.

00:06:44.780 --> 00:06:50.900
I work on things like language services, debuggers, and VS Code, VS Code extensions.

00:06:50.900 --> 00:06:51.380
Cool.

00:06:51.380 --> 00:06:55.660
Do you have any exposure to the Cinder project or any of the stuff going on over there?

00:06:55.660 --> 00:06:56.720
No, I'm aware of it.

00:06:56.720 --> 00:06:59.640
I think it's super cool, but that's an Instagram thing really.

00:06:59.640 --> 00:07:02.060
And so it's not really something that I use day to day.

00:07:02.060 --> 00:07:05.720
Well, it looks like it's going to become a Python thing in little bits and pieces.

00:07:05.720 --> 00:07:06.260
Yeah.

00:07:06.260 --> 00:07:08.200
The pieces of it are being pulled over.

00:07:08.200 --> 00:07:13.740
Like we just talked about PEP690 and lazy imports, and there's a couple of other things

00:07:13.740 --> 00:07:15.220
people are working to move in.

00:07:15.220 --> 00:07:19.560
So not the whole thing, but some of those features and improvements make it to all of us.

00:07:19.560 --> 00:07:19.840
Yeah.

00:07:19.840 --> 00:07:23.760
That's the great thing about Python is if you come up with a good idea, the community is

00:07:23.760 --> 00:07:26.660
very open and willing to adopt new ideas.

00:07:26.660 --> 00:07:30.320
The best ideas win and can be continuously improving the language.

00:07:30.320 --> 00:07:30.660
Yeah.

00:07:30.740 --> 00:07:31.520
That's pretty fantastic.

00:07:31.520 --> 00:07:37.120
So let's start our conversation here at a little bit higher level than just PIPX.

00:07:37.120 --> 00:07:40.020
And let's just talk about packaging a little bit.

00:07:40.020 --> 00:07:42.980
So let me switch over here to this project.

00:07:42.980 --> 00:07:47.300
So you have over at chadsmith.dev, which is a great domain name.

00:07:47.300 --> 00:07:51.580
And I'm impressed with a name like Chad Smith that you can get it just straight up as your

00:07:51.580 --> 00:07:52.120
domain name.

00:07:52.120 --> 00:07:55.740
Because as Michael Kennedy, all the Irish politicians are all over me.

00:07:55.740 --> 00:07:59.800
I got to go with some crazy variation to come up with it.

00:07:59.800 --> 00:08:00.700
But yeah, that's cool.

00:08:00.700 --> 00:08:01.600
That's a great domain name.

00:08:01.600 --> 00:08:06.940
And over there at slash python-packaging, you've got the big list of Python packaging and distribution

00:08:06.940 --> 00:08:07.440
tools.

00:08:07.440 --> 00:08:08.640
You want to tell us about this?

00:08:08.640 --> 00:08:11.080
Kind of gives you a high level of like, what are the options, right?

00:08:11.080 --> 00:08:11.480
Yeah.

00:08:11.680 --> 00:08:17.400
So a lot of times questions come up about what tools are out there, which tools do what.

00:08:17.400 --> 00:08:21.260
You know, it's a big world in the packaging, in the packaging, in the Python packaging world.

00:08:21.260 --> 00:08:25.780
And I wanted to make something that was not opinionated and just kind of factual.

00:08:25.780 --> 00:08:29.100
Like here's some data, here's some information about these.

00:08:29.100 --> 00:08:30.400
You can decide for yourself.

00:08:30.400 --> 00:08:31.920
It's not trying to persuade you to use this.

00:08:31.920 --> 00:08:33.200
It's not like saying this is my tool.

00:08:33.200 --> 00:08:33.800
This one's the best.

00:08:33.800 --> 00:08:38.900
And this came about from PIPX's documentation where one of the other questions on PIPX was

00:08:38.900 --> 00:08:40.980
like, what is it and how does it compare to other things?

00:08:40.980 --> 00:08:44.260
So I had kind of a list on the documentation and it kept growing.

00:08:44.260 --> 00:08:47.840
And I was thinking, you know, this could be its own thing because I don't want to PIPX

00:08:47.840 --> 00:08:49.420
documentation too big.

00:08:49.420 --> 00:08:54.740
Make it a survey of all the other things that it competes with or could have been put alongside,

00:08:54.740 --> 00:08:55.060
right?

00:08:55.060 --> 00:08:55.380
Yeah.

00:08:55.380 --> 00:08:59.200
So this is an interactive web app table type thing.

00:08:59.200 --> 00:09:03.080
And it pulls data from GitHub's GraphQL API.

00:09:03.080 --> 00:09:07.900
And it lets you kind of like select different features and filter on those.

00:09:07.900 --> 00:09:10.640
You can compare and group tools together.

00:09:10.780 --> 00:09:15.900
So on the top left, you'll see there's like a bunch of little blue words with blue backgrounds

00:09:15.900 --> 00:09:16.880
and you can click on those.

00:09:16.880 --> 00:09:17.100
Yeah.

00:09:17.100 --> 00:09:19.120
And if you click on them, then it'll filter down the table.

00:09:19.120 --> 00:09:23.340
And so if you want to find tools that have, I can install and publish, you can click on

00:09:23.340 --> 00:09:27.160
like install CLI apps and also publish, publish packages.

00:09:27.160 --> 00:09:27.820
Nice.

00:09:27.820 --> 00:09:29.180
This is a great little UI.

00:09:29.180 --> 00:09:33.460
It reminds me of an app I wrote once and I'm having nice nostalgia here.

00:09:33.460 --> 00:09:33.840
It's cool.

00:09:34.100 --> 00:09:39.460
So you can sort of click on these little categories or filters and turn multiple ones on and off.

00:09:39.460 --> 00:09:43.420
So if I want virtual environment management that can install libraries, well, apparently

00:09:43.420 --> 00:09:44.660
there's none of those.

00:09:44.660 --> 00:09:50.660
But if I want to build packages and install CLI apps, well, I guess PDM is my choice, huh?

00:09:50.660 --> 00:09:51.000
Right.

00:09:51.080 --> 00:09:51.480
That's cool.

00:09:51.480 --> 00:09:55.500
So maybe one thing that we could do that would be nice is maybe we could go through and highlight

00:09:55.500 --> 00:10:00.440
some of the more notable packaging solutions or options as we go through here.

00:10:00.440 --> 00:10:05.000
You know, PipX being one of them, we'll get to that a bunch more, but want to maybe give

00:10:05.000 --> 00:10:05.880
us a bit of a rundown?

00:10:05.880 --> 00:10:08.700
Like probably the first really notable one is Conda.

00:10:08.700 --> 00:10:10.820
People are super familiar with that, right?

00:10:10.820 --> 00:10:11.980
On the data science side.

00:10:12.220 --> 00:10:12.460
Yeah.

00:10:12.460 --> 00:10:19.060
So Conda is kind of like a more ambitious way to create environments and it kind of

00:10:19.060 --> 00:10:20.120
makes its own ecosystem.

00:10:20.120 --> 00:10:24.280
I personally haven't used it, but I know it's pretty popular, like you said, with a scientific

00:10:24.280 --> 00:10:24.800
community.

00:10:24.800 --> 00:10:27.620
So it also can be used to make C libraries too.

00:10:27.620 --> 00:10:28.140
Interesting.

00:10:28.140 --> 00:10:28.680
Yeah.

00:10:28.680 --> 00:10:33.440
It's certainly the claim to fame of Conda and Anaconda and Miniconda, all those things

00:10:33.440 --> 00:10:38.640
is you don't have to have the build tools for all the libraries, the transitive closure

00:10:38.640 --> 00:10:40.320
of the libraries you want to use, right?

00:10:40.420 --> 00:10:42.800
My understanding is it's its own packaging system.

00:10:42.800 --> 00:10:44.220
Like you don't pip install from it.

00:10:44.220 --> 00:10:46.460
There's some other parallel ecosystem.

00:10:46.460 --> 00:10:46.960
Right.

00:10:46.960 --> 00:10:47.380
Exactly.

00:10:47.380 --> 00:10:52.840
And I feel like to some degree with wheels, we're a little bit closer than we used to be

00:10:52.840 --> 00:10:54.180
with pip directly, right?

00:10:54.180 --> 00:10:58.880
Pip install wheel can just drop in a thing, whereas previously stuff had to happen on your

00:10:58.880 --> 00:11:00.620
machine to finalize that package.

00:11:00.620 --> 00:11:00.900
Yeah.

00:11:00.900 --> 00:11:05.120
Wheels are specific to your Python version, your operating system.

00:11:05.120 --> 00:11:08.480
And so, yeah, that can just be basically unzipped and used.

00:11:08.480 --> 00:11:08.740
Yeah.

00:11:08.820 --> 00:11:14.140
That was fantastic, except for the first couple of weeks of the M1 platform, the Apple Silicon

00:11:14.140 --> 00:11:14.840
M1s.

00:11:14.840 --> 00:11:16.240
You try to install something.

00:11:16.240 --> 00:11:16.580
Nope.

00:11:16.580 --> 00:11:18.340
We don't have a wheel for that platform.

00:11:18.340 --> 00:11:19.680
What do you mean you don't have a wheel?

00:11:19.680 --> 00:11:20.280
Come on.

00:11:20.280 --> 00:11:22.060
I think that's pretty far in the past now.

00:11:22.060 --> 00:11:23.580
I haven't run into that problem for a long time.

00:11:23.580 --> 00:11:24.000
Cool.

00:11:24.000 --> 00:11:31.740
Another one on here that's clearly pretty popular and in this C generating native code category

00:11:31.740 --> 00:11:32.300
is Cython.

00:11:32.300 --> 00:11:38.340
Yeah, Cython is super interesting and it takes advantage of one of the pretty cool features

00:11:38.340 --> 00:11:39.720
of Python itself.

00:11:39.720 --> 00:11:47.060
So Cython can generate C code from your Python code and it generates shared objects and shared

00:11:47.060 --> 00:11:49.540
objects are able to be imported directly from Python.

00:11:49.720 --> 00:11:54.640
So you can make a basically like a wheel that is native code built from your Python code.

00:11:54.640 --> 00:12:00.580
And if you have code that is really run really frequently, like a really hot path, that Python

00:12:00.580 --> 00:12:02.140
is just a little bit too slow for you.

00:12:02.140 --> 00:12:09.140
You can really easily use Cython to convert that into C and make a shared object and then just

00:12:09.140 --> 00:12:13.660
use that, but just that module or just that function that you wanted to speed up.

00:12:13.660 --> 00:12:15.680
There's some interesting examples of that.

00:12:15.680 --> 00:12:21.540
For example, uvloop, which is the fast drop in replacement for asyncio, right?

00:12:21.540 --> 00:12:26.100
That was written in Cython and built on top of libuvc library, I think.

00:12:26.500 --> 00:12:32.540
Right now, here's one of those tight loops where this is the while true or the for in

00:12:32.540 --> 00:12:34.380
loop that does all the magic, right?

00:12:34.380 --> 00:12:37.140
And so doing something like this makes a lot of sense.

00:12:37.140 --> 00:12:37.900
Absolutely.

00:12:37.900 --> 00:12:38.320
Yeah.

00:12:38.320 --> 00:12:40.520
I was surprised how easy it was to use Cython.

00:12:40.520 --> 00:12:45.140
You can just basically run it, point out a file and it just converts it to C.

00:12:45.140 --> 00:12:46.660
And you can import it too.

00:12:46.660 --> 00:12:47.620
It makes the shared object.

00:12:47.620 --> 00:12:51.860
It's just kind of like you just run the command and it's just magically turns into something.

00:12:51.860 --> 00:12:54.980
Hopefully it all works, but it turns into something that runs a lot faster.

00:12:54.980 --> 00:12:56.160
Yeah, it really is neat.

00:12:56.260 --> 00:12:59.860
And if you use the Python type hints, it can get even a little bit better.

00:12:59.860 --> 00:13:00.340
Yeah.

00:13:00.340 --> 00:13:06.080
Or if you go farther, you can import the Cython integer instead of just a regular int and so

00:13:06.080 --> 00:13:06.220
on.

00:13:06.220 --> 00:13:06.660
Yeah.

00:13:06.660 --> 00:13:09.220
And now Cython has typing in Pythons.

00:13:09.220 --> 00:13:14.160
So Cython also has its own kind of parallel language where you write like pyx file and you

00:13:14.160 --> 00:13:15.280
have Cython annotations.

00:13:15.280 --> 00:13:21.340
But now with type hints becoming more prevalent in Python itself, there are also Cython type hints,

00:13:21.340 --> 00:13:25.840
which allows you to write just straight Python code, but Cython still recognizes how to,

00:13:26.020 --> 00:13:29.200
convert it to a statically typed C type.

00:13:29.200 --> 00:13:29.640
Right.

00:13:29.640 --> 00:13:32.980
I think that makes it way more approachable for many people because they don't feel like

00:13:32.980 --> 00:13:34.180
they have to go learn something different.

00:13:34.180 --> 00:13:37.180
They're like, well, if I just put type hints on this, maybe different type hints.

00:13:37.180 --> 00:13:37.440
Yeah.

00:13:37.440 --> 00:13:37.980
And we're good to go.

00:13:37.980 --> 00:13:38.200
Yeah.

00:13:38.200 --> 00:13:38.860
Which is pretty cool.

00:13:38.860 --> 00:13:39.280
Yeah.

00:13:39.340 --> 00:13:39.560
All right.

00:13:39.560 --> 00:13:41.620
That question from the audience from Juergen.

00:13:41.620 --> 00:13:42.380
Hey, Chad.

00:13:42.380 --> 00:13:43.760
What about Buildout?

00:13:43.760 --> 00:13:45.960
Made up your mind on whether to include it?

00:13:45.960 --> 00:13:48.080
What's the story with Buildout in this?

00:13:48.080 --> 00:13:52.040
On the Python packaging table, there were some suggestions in the issue tracker.

00:13:52.040 --> 00:13:54.520
And one of them was around Buildout.

00:13:54.520 --> 00:13:57.200
And it was something I hadn't heard of before.

00:13:57.200 --> 00:14:00.440
I'm still considering whether to add that or not.

00:14:00.440 --> 00:14:01.400
I think I will.

00:14:01.400 --> 00:14:02.520
Leaning towards yes.

00:14:02.520 --> 00:14:02.920
Okay.

00:14:02.920 --> 00:14:04.620
I don't think I've done anything with Buildout.

00:14:04.620 --> 00:14:05.040
Okay.

00:14:05.040 --> 00:14:05.800
Very nice.

00:14:05.880 --> 00:14:09.320
And also, I saw that Py2App could get...

00:14:09.320 --> 00:14:10.820
I don't think Py2App was there, was it?

00:14:10.820 --> 00:14:11.360
It wasn't.

00:14:11.360 --> 00:14:11.600
Yeah.

00:14:11.600 --> 00:14:14.120
So what's the criteria for being on that list, I guess?

00:14:14.120 --> 00:14:14.600
Yeah.

00:14:14.600 --> 00:14:16.460
I just kind of made it as a...

00:14:16.460 --> 00:14:21.620
Started just as the comparison to PIPX where people might be confused or wonder which one

00:14:21.620 --> 00:14:22.140
to choose.

00:14:22.140 --> 00:14:26.480
And then it's kind of just grown organically, just things I thought were interesting or relevant.

00:14:26.480 --> 00:14:30.540
I think they should be something that is still...

00:14:30.540 --> 00:14:34.300
So it's something that people would want to use because there's a lot of changes in the

00:14:34.300 --> 00:14:37.900
packaging landscape and there's a lot of stuff that kind of gets left behind that you really

00:14:37.900 --> 00:14:38.700
wouldn't want to use anymore.

00:14:38.700 --> 00:14:40.100
There's new tools being made.

00:14:40.100 --> 00:14:41.900
There's new standards being defined.

00:14:41.900 --> 00:14:45.480
So I want it to be something that's kind of like modern, relevant, something that's like

00:14:45.480 --> 00:14:46.780
encouraged to be used.

00:14:46.780 --> 00:14:52.480
I was concerned it was a little bit like maybe older and like I hadn't heard of it and you

00:14:52.480 --> 00:14:53.080
haven't heard of it.

00:14:53.080 --> 00:14:57.620
So I wasn't really sure how, you know, if it was something that we should still encourage

00:14:57.620 --> 00:14:58.780
folks to use or not.

00:14:58.780 --> 00:14:59.020
Yeah.

00:14:59.020 --> 00:15:00.100
Here's an interesting...

00:15:00.100 --> 00:15:03.820
Have you checked out the PSF developer survey results this year?

00:15:04.020 --> 00:15:04.480
I have not.

00:15:04.480 --> 00:15:04.760
Yeah.

00:15:04.760 --> 00:15:10.080
So they have a section on basically which tools related to packaging do you do to use?

00:15:10.080 --> 00:15:13.900
And they break it down by popularity, which I thought was pretty cool.

00:15:13.900 --> 00:15:14.680
That's really interesting.

00:15:14.680 --> 00:15:14.980
Yeah.

00:15:14.980 --> 00:15:21.000
So for people just listening, it's 81% of the people say they use pip and then 32% of people

00:15:21.000 --> 00:15:21.760
use VNV.

00:15:21.760 --> 00:15:23.100
I feel like that's pretty low.

00:15:23.100 --> 00:15:25.320
Honestly, it should be higher than what's going on there.

00:15:25.380 --> 00:15:32.320
But you've got 30% of people use containers, 23% use virtual ENV, and then 22% is condo.

00:15:32.320 --> 00:15:38.660
We've got poetry, pip, ENV, Afflit, PDM, and others are like way down, way down in the list

00:15:38.660 --> 00:15:38.900
there.

00:15:38.900 --> 00:15:39.460
Yeah.

00:15:39.460 --> 00:15:43.720
So anyway, does that strike you as what your mental model you had in mind a little bit?

00:15:43.720 --> 00:15:44.280
Yeah.

00:15:44.280 --> 00:15:44.880
Roughly.

00:15:44.880 --> 00:15:46.240
There's a few surprises in there.

00:15:46.560 --> 00:15:49.600
But I think all those should be in this table.

00:15:49.600 --> 00:15:52.280
If they're not, I'm going to have to check out that list and update the table.

00:15:52.280 --> 00:15:53.540
Sure, sure.

00:15:53.540 --> 00:15:55.460
Well, you know, maybe not the container stuff, right?

00:15:55.460 --> 00:15:57.580
Because that's kind of just like I have a virtual machine.

00:15:57.580 --> 00:15:59.180
I mean, virtual machines are also in there, right?

00:15:59.180 --> 00:16:03.360
It's like, which I think means I have a virtual machine, so I don't care if I just trash it

00:16:03.360 --> 00:16:06.900
and just bust its system, like customize its system Python.

00:16:06.900 --> 00:16:12.520
This portion of Talk Python To Me is brought to you by Mergify.

00:16:12.940 --> 00:16:16.720
It's an amazing tool to make you and your team way more productive with GitHub.

00:16:16.720 --> 00:16:20.060
Mergify is all about leveling up your pull requests.

00:16:20.060 --> 00:16:22.960
Some of the features include automatic merges.

00:16:22.960 --> 00:16:27.700
You explain the conditions for an automatic merge and Mergify will take care of merging the

00:16:27.700 --> 00:16:29.500
pull requests as soon as it's ready.

00:16:29.500 --> 00:16:30.960
Automatic updates.

00:16:30.960 --> 00:16:36.120
They merge your pull requests serially on top of each other, so there's no way to introduce

00:16:36.120 --> 00:16:36.720
a regression.

00:16:36.720 --> 00:16:38.240
Merge queues.

00:16:38.240 --> 00:16:40.620
Merge the urgent pull requests first.

00:16:41.160 --> 00:16:45.340
Organize your PR priorities as you wish, and Mergify will merge them in that order.

00:16:45.340 --> 00:16:46.720
Backports.

00:16:46.720 --> 00:16:52.640
Mergify will even copy your pull requests to other branches once the PR is merged, shipping

00:16:52.640 --> 00:16:55.760
your bug fixes in multiple branches automatically.

00:16:55.760 --> 00:17:01.420
Mergify features allow you to automatize what you would otherwise have to do manually.

00:17:01.420 --> 00:17:04.880
By saving time, you and your team can focus on projects that matter.

00:17:04.880 --> 00:17:09.980
Mergify is coordinated with any continuous integration and is fully integrated into GitHub.

00:17:09.980 --> 00:17:15.040
They even have a startup program that could give your company 12 months of credit to leverage

00:17:15.040 --> 00:17:15.600
Mergify.

00:17:15.600 --> 00:17:18.240
That's up to $21,000 in value.

00:17:18.240 --> 00:17:25.380
Start saving time today by visiting talkpython.fm/Mergify to sign up for a demo and get

00:17:25.380 --> 00:17:28.080
started, or just click the link in your podcast player show notes.

00:17:28.580 --> 00:17:30.580
Thank you to Mergify for sponsoring the show.

00:17:30.580 --> 00:17:30.660
Thank you.

00:17:30.660 --> 00:17:35.780
For me, when I set up my servers, I don't do that.

00:17:35.780 --> 00:17:39.980
I actually create a virtual environment for the apps running on that server, or maybe multiple

00:17:39.980 --> 00:17:41.840
ones, but often it's just running one service.

00:17:41.840 --> 00:17:46.040
So I just create a virtual environment for it, just for the isolation alone.

00:17:46.260 --> 00:17:49.820
So it doesn't say, well, you can't use this version of some library because it's being

00:17:49.820 --> 00:17:51.040
used by some part of the system.

00:17:51.040 --> 00:17:55.020
You can really cause yourself huge headaches messing with parts of the system.

00:17:55.020 --> 00:17:57.440
Like one time, I think I tried to rename Python.

00:17:57.440 --> 00:18:02.220
I think I repointed my Python 3 alias to a different, like a newer version of Python 3,

00:18:02.220 --> 00:18:05.520
because I wanted to use, I wanted that to just be what it used.

00:18:05.700 --> 00:18:07.660
And pretty sure my computer didn't start after that.

00:18:07.660 --> 00:18:09.420
Yeah.

00:18:09.420 --> 00:18:14.080
While I just have this page up, I just want to also show that PipX does show up over here

00:18:14.080 --> 00:18:17.600
on tools for installing packages instead of managing it.

00:18:17.600 --> 00:18:18.140
And yeah.

00:18:18.140 --> 00:18:18.740
Oh, very cool.

00:18:18.740 --> 00:18:19.480
Coming along there.

00:18:19.480 --> 00:18:20.160
Pretty cool.

00:18:20.160 --> 00:18:25.520
By the way, there is a PEP I saw around not clobbering system installs, where you have like

00:18:25.520 --> 00:18:31.080
Ubuntu managing its own Python packages, and you install to it, or you uninstall something

00:18:31.080 --> 00:18:32.780
and kind of like mess up your whole system.

00:18:33.120 --> 00:18:36.660
There's a PEP out there to address that and to not mix things in there.

00:18:36.660 --> 00:18:37.320
Oh, that's cool.

00:18:37.320 --> 00:18:41.480
I feel like almost Ubuntu and those different systems could say, we're going to have our

00:18:41.480 --> 00:18:43.820
own isolated environment for our stuff.

00:18:43.820 --> 00:18:47.560
And what you want to do, even if you just run Python straight, that's going to do something

00:18:47.560 --> 00:18:47.920
else.

00:18:47.920 --> 00:18:49.220
But yeah, I don't know.

00:18:49.220 --> 00:18:51.020
I don't know the mechanics of making all that happen.

00:18:51.020 --> 00:18:52.340
There's a lot of pieces involved there.

00:18:52.340 --> 00:18:52.660
Yeah.

00:18:52.660 --> 00:18:52.940
Yeah.

00:18:52.940 --> 00:18:55.160
The isolation is definitely useful.

00:18:55.160 --> 00:18:55.700
Okay.

00:18:55.700 --> 00:18:57.220
Back to the build stuff.

00:18:57.220 --> 00:18:59.520
Maybe there's a couple of others here.

00:18:59.520 --> 00:19:03.300
Like we've got the sort of what I would call pip alternatives.

00:19:03.300 --> 00:19:05.640
We've got FLIT and Poetry, right?

00:19:05.640 --> 00:19:11.080
Those are maybe, yeah, FLIP and Poetry and pip, E and V. I guess those are all in a similar,

00:19:11.080 --> 00:19:15.820
I know that I might be painting that with too broad of a brush, but they're all about installing,

00:19:15.820 --> 00:19:19.520
working with your environments, installing stuff into your environments for apps you're

00:19:19.520 --> 00:19:20.020
building, right?

00:19:20.280 --> 00:19:20.480
Yeah.

00:19:20.480 --> 00:19:21.900
And PyFlow as well.

00:19:21.900 --> 00:19:22.700
And Hatch.

00:19:22.700 --> 00:19:23.540
There's quite a few.

00:19:23.540 --> 00:19:23.960
Yeah.

00:19:23.960 --> 00:19:24.920
I'm not familiar with Hatch.

00:19:24.920 --> 00:19:25.740
Tell me about Hatch.

00:19:25.740 --> 00:19:28.920
I have heard Hatch mentioned, or I think I've seen it around for a while.

00:19:28.920 --> 00:19:29.760
I never really used it.

00:19:29.760 --> 00:19:36.480
But then the creator of Hatch recently added a pull request to PipX to use the Hatch backend.

00:19:36.480 --> 00:19:43.200
So with PEP 5.17 and 5.18, you can basically anything you want, install, build your wheel,

00:19:43.200 --> 00:19:45.300
build wheels.

00:19:45.300 --> 00:19:47.860
So you can have different backends to build a wheel.

00:19:48.200 --> 00:19:49.560
So Hatch has one called Hatch.

00:19:49.560 --> 00:19:49.800
Right.

00:19:49.800 --> 00:19:53.960
This is actually now in the packaging, the Python packaging documentation.

00:19:53.960 --> 00:19:58.740
Like if you go to like the Python packaging website, like I think it's packaging.python.org,

00:19:58.740 --> 00:20:02.700
there's instructions on how to like build, to build a package, to distribute it.

00:20:02.700 --> 00:20:07.800
And it uses the Hatch link backend, which is a big achievement now.

00:20:07.800 --> 00:20:13.560
It's no longer telling you to use setup.py, but it's telling you to use this new tool called

00:20:13.560 --> 00:20:13.880
build.

00:20:13.880 --> 00:20:14.280
Right.

00:20:14.280 --> 00:20:15.960
Which is also on your list right at the top.

00:20:15.960 --> 00:20:16.380
Yeah.

00:20:16.680 --> 00:20:17.820
And it's alphabetical.

00:20:17.820 --> 00:20:18.420
So yeah.

00:20:18.420 --> 00:20:24.480
Well, it wins with, I guess the A, A, A, A, A, V and V is maybe got a spot to still take

00:20:24.480 --> 00:20:25.460
the top notch there, but.

00:20:25.460 --> 00:20:26.120
That's a good idea.

00:20:26.120 --> 00:20:26.460
Nice.

00:20:26.460 --> 00:20:29.260
You do also have things like GitHub stars and stuff.

00:20:29.260 --> 00:20:30.400
Can you sort by them?

00:20:30.400 --> 00:20:31.120
Yeah, you can, right?

00:20:31.120 --> 00:20:34.040
I just added the star emoji and I think it screwed up the sorting.

00:20:34.040 --> 00:20:35.440
So I'll have to work on that.

00:20:35.440 --> 00:20:38.780
Oh, it sorts by alphabetical then with the start of the star.

00:20:38.780 --> 00:20:39.340
Yeah.

00:20:39.700 --> 00:20:40.020
Okay.

00:20:40.020 --> 00:20:41.540
The challenges we run into.

00:20:41.540 --> 00:20:41.920
Yeah.

00:20:41.920 --> 00:20:42.240
Yeah.

00:20:42.240 --> 00:20:43.060
So this is really cool.

00:20:43.060 --> 00:20:46.900
Anything else you want to give a shout out to while we're here before we move on?

00:20:46.900 --> 00:20:48.620
Py03 is super cool.

00:20:48.620 --> 00:20:49.980
I played around with that.

00:20:49.980 --> 00:20:54.120
So Py03 is a way to call Rust code from your Python code.

00:20:54.380 --> 00:20:58.140
So kind of similar to Cython, except it doesn't generate Rust code for you.

00:20:58.140 --> 00:21:02.220
You just, you have to have something already built in Rust, but it's pretty easy to use.

00:21:02.220 --> 00:21:06.900
There's a really popular Rust tool called RipGrep, which is like grep, but rewritten in Rust

00:21:06.900 --> 00:21:09.300
with a nice API and it's super fast.

00:21:09.300 --> 00:21:17.100
And one thing I tried just to kind of like learn Rust and learn Py03 was to write an API in Python

00:21:17.100 --> 00:21:20.620
that called into the RipGrep Rust code.

00:21:20.620 --> 00:21:20.960
Right.

00:21:20.960 --> 00:21:21.280
Okay.

00:21:21.280 --> 00:21:21.640
Cool.

00:21:21.640 --> 00:21:22.720
And that actually worked pretty well.

00:21:22.840 --> 00:21:28.220
I was pleased with the development process and how fast it all ran.

00:21:28.220 --> 00:21:28.560
Nice.

00:21:28.560 --> 00:21:29.180
All right.

00:21:29.180 --> 00:21:29.640
Let's see.

00:21:29.640 --> 00:21:32.940
One more bit of follow up on this that Juergen says,

00:21:32.940 --> 00:21:36.600
Tox will also use Hatchlane with version four, which is pretty cool.

00:21:36.600 --> 00:21:36.940
Nice.

00:21:36.940 --> 00:21:37.340
Yeah.

00:21:37.340 --> 00:21:39.540
I think that it's probably going to gain a lot more traction.

00:21:39.540 --> 00:21:40.000
Yeah.

00:21:40.000 --> 00:21:42.080
It sounds like I need to learn about Hatchlane and Hatch.

00:21:42.080 --> 00:21:43.660
Pretty cool.

00:21:43.660 --> 00:21:48.940
Another thing that's interesting here that is sort of in the same space that we could talk about

00:21:48.940 --> 00:21:51.200
is PEP 582.

00:21:51.400 --> 00:21:55.300
To me, PEP 582 feels a lot like node modules for Python.

00:21:55.300 --> 00:21:56.440
Sort of that.

00:21:56.440 --> 00:21:58.520
Where is the, what is it?

00:21:58.520 --> 00:22:02.260
Project.json and then the node modules folder next to it, right?

00:22:02.260 --> 00:22:04.980
There's a folder and it has a name.

00:22:04.980 --> 00:22:07.720
That's where your packages get installed to.

00:22:07.720 --> 00:22:13.260
And if you run Python commands below it, it will sort of traverse the directory up looking for that

00:22:13.260 --> 00:22:18.940
to find its effective virtual environment instead of the traditional virtual environment behaviors we all know.

00:22:18.940 --> 00:22:19.380
Right?

00:22:19.380 --> 00:22:19.880
Right.

00:22:19.880 --> 00:22:20.580
Yeah.

00:22:20.580 --> 00:22:20.860
Yeah.

00:22:20.860 --> 00:22:21.460
What are your thoughts here?

00:22:21.460 --> 00:22:23.280
I sort of stumbled across this.

00:22:23.280 --> 00:22:28.020
I don't remember how I found it, but when I saw it, I was like, oh my gosh, this is incredible.

00:22:28.020 --> 00:22:29.620
I can't wait for this to land.

00:22:30.040 --> 00:22:31.640
I'm a big TypeScript developer.

00:22:31.640 --> 00:22:33.120
I like TypeScript, I like JavaScript.

00:22:33.120 --> 00:22:36.260
So I can kind of compare the two because I do a lot of work in both.

00:22:36.260 --> 00:22:37.980
And when I saw this, I was really excited.

00:22:37.980 --> 00:22:38.360
Right.

00:22:38.360 --> 00:22:40.200
So you're like, this is the node version for Python.

00:22:40.440 --> 00:22:40.660
Yeah.

00:22:40.660 --> 00:22:47.440
There's a lot of headaches with global installs and globally installing packages and conflicting with the OS.

00:22:47.440 --> 00:22:54.600
And so having that extra step to always activate a virtual environment or create one or delete one or recreate a new one, it can get tedious.

00:22:54.600 --> 00:22:57.820
And so, and it's also a bit, it's part of the environment, right?

00:22:57.820 --> 00:23:01.040
Like Python packages is this file on a file system.

00:23:01.040 --> 00:23:02.180
You know, it's there.

00:23:02.180 --> 00:23:07.400
If you want to start over, you just RMRF the folder and you can start over.

00:23:07.800 --> 00:23:13.800
So when I saw this, I was really excited and acceptance of it would be imminent and we'd be using Py packages very soon.

00:23:13.800 --> 00:23:14.380
I did too.

00:23:14.380 --> 00:23:18.160
Like, oh, this, we're, the next release, the world is different, right?

00:23:18.160 --> 00:23:18.460
Yeah.

00:23:18.460 --> 00:23:21.040
And so you can see on the, right.

00:23:21.040 --> 00:23:21.400
Yeah.

00:23:21.400 --> 00:23:23.800
And yeah, it says this is targeting version 3.8.

00:23:23.800 --> 00:23:25.260
It's still in draft status.

00:23:25.260 --> 00:23:26.860
And that was 2018.

00:23:26.860 --> 00:23:28.700
So it's four years ago.

00:23:28.700 --> 00:23:33.140
So one thing I want to mention is, as you mentioned, this is like node modules for Python.

00:23:33.560 --> 00:23:38.380
And one of the authors of the pet mentioned that he, he doesn't want folks to think of it like that.

00:23:38.380 --> 00:23:44.900
Although it's not a bad analogy, but it's more like an auto activated virtual environment or automatically recognized.

00:23:44.900 --> 00:23:54.560
So he wanted to think of it like that because he didn't want to have nested Py packages where we can have this complicated nesting of each package has its own Py packages.

00:23:54.560 --> 00:23:57.480
Like a fallback as you go up and yeah, yeah, yeah, yeah.

00:23:57.480 --> 00:23:58.060
I hear you.

00:23:58.060 --> 00:24:00.660
But to me, it seems like it would simplify a lot of stuff.

00:24:00.660 --> 00:24:10.980
For example, if I have a cookie cutter template and I want to just make sure that that project has its own environment, the cookie cutter could just create this folder at the top level and you're kind of good to go.

00:24:10.980 --> 00:24:12.020
You know what I mean?

00:24:12.020 --> 00:24:14.820
You don't have to do a bunch of virtual environment stuff.

00:24:14.820 --> 00:24:16.320
It just, that's the one, right?

00:24:16.320 --> 00:24:16.660
Yeah.

00:24:16.660 --> 00:24:32.360
If you've got working with people who are new to Python, you can just say here, unzip this and run it and you know, it'll start out empty, but maybe the first step is to verify all the stuff is there, but you don't have to, you know, there's just that, that bootstrapping to get started, which as you gain experience, it's no big deal.

00:24:32.360 --> 00:24:37.560
But I often encounter people who are new to this and they kind of bounce off it, which is unfortunate.

00:24:37.560 --> 00:24:52.280
When you come across a project or when, especially someone newer to the language comes across a project and they see instructions are pip install this thing, it's really kind of a loaded instruction to give someone because you might be basically breaking things in the process.

00:24:52.280 --> 00:24:54.320
You might be setting yourself up for some kind of failure.

00:24:54.320 --> 00:24:54.700
Right.

00:24:54.700 --> 00:24:56.740
It could get installed to their system.

00:24:56.740 --> 00:24:59.100
They might not have permission to install it to the system.

00:24:59.100 --> 00:25:00.660
There's a lot of stuff going on there.

00:25:00.660 --> 00:25:06.940
It also might install a version of a package that another tool requires a different version of because it'll just kind of update it with what it needs.

00:25:07.040 --> 00:25:14.000
If there's an outdated version or something, it'll just give you a newer version, which may inadvertently break some other tool that depends on that older version for some reason.

00:25:14.000 --> 00:25:14.340
Right.

00:25:14.340 --> 00:25:18.460
And then all of a sudden your fail to ban or your firewall or something stops working.

00:25:18.460 --> 00:25:19.760
You're like, why did that stop working?

00:25:19.760 --> 00:25:21.940
Or glances or some other tool.

00:25:21.940 --> 00:25:24.040
You're like, I thought that was part of my machine.

00:25:24.040 --> 00:25:25.140
Now it doesn't work anymore.

00:25:25.140 --> 00:25:27.740
And, you know, your little test project or tutorial broke it.

00:25:27.740 --> 00:25:27.920
Right.

00:25:27.920 --> 00:25:28.340
Yeah.

00:25:28.340 --> 00:25:29.820
That's probably suboptimal.

00:25:29.820 --> 00:25:30.180
Yeah.

00:25:30.180 --> 00:25:35.820
So this was exciting to me because, you know, you could have pip install something and it would go to this PyPackages directory potentially.

00:25:36.520 --> 00:25:41.080
You wouldn't really have to worry about any other side effects or any kind of environment that you're affecting.

00:25:41.080 --> 00:25:41.840
Maybe someday.

00:25:41.840 --> 00:25:42.320
Yeah.

00:25:42.320 --> 00:25:42.960
Not for the moment.

00:25:42.960 --> 00:25:43.180
Yeah.

00:25:43.180 --> 00:25:50.280
Well, we do have this other tool called PipX that does manage this somewhat for a certain class of problems.

00:25:50.280 --> 00:25:50.580
Right.

00:25:50.580 --> 00:25:54.900
But this is more for building packages and applications and stuff.

00:25:54.900 --> 00:25:57.500
Not so much external tools, but still.

00:25:57.500 --> 00:25:57.680
Yeah.

00:25:57.680 --> 00:25:58.820
I think there are different use cases.

00:25:58.820 --> 00:26:04.200
Because I think this one's more for libraries, building your library or not necessarily the app.

00:26:04.200 --> 00:26:04.420
Yeah.

00:26:04.420 --> 00:26:10.560
Well, you pointed out some implementations or experimental things going on with this one.

00:26:10.560 --> 00:26:11.760
So let's see here.

00:26:11.760 --> 00:26:12.260
Yeah.

00:26:12.260 --> 00:26:13.740
So you got PyLock here.

00:26:13.740 --> 00:26:14.920
This is you, right?

00:26:14.920 --> 00:26:15.360
Yeah.

00:26:15.360 --> 00:26:15.780
That's fine.

00:26:15.920 --> 00:26:20.100
So PyLock is a drop-in replacement that imports packages from this directory.

00:26:20.100 --> 00:26:24.240
And it's like an experimentation or an experimental implementation of this, right?

00:26:24.240 --> 00:26:24.620
Right.

00:26:24.620 --> 00:26:24.860
Yeah.

00:26:24.860 --> 00:26:29.040
So I called it Python loc was the idea, like local, loc stand for like.

00:26:29.040 --> 00:26:29.580
Location.

00:26:29.580 --> 00:26:29.900
Yeah.

00:26:29.900 --> 00:26:31.820
It stood for like local packages, I was thinking.

00:26:31.820 --> 00:26:32.520
I don't know.

00:26:32.520 --> 00:26:35.360
The name's still a thing could be revised, I guess.

00:26:35.480 --> 00:26:37.580
But I saw the pet, but I thought it was super cool.

00:26:37.580 --> 00:26:40.620
And I thought, hey, maybe I can hack something together and let people try it.

00:26:40.620 --> 00:26:45.500
Because I think trying, discussing how something might work and actually using it is kind of like

00:26:45.500 --> 00:26:48.940
looking at a picture of somewhere you want to take a vacation and actually going there.

00:26:48.940 --> 00:26:52.760
You know, it's like going to a place versus just kind of like hearing description of it.

00:26:52.760 --> 00:26:56.360
So if we make something we can play around with, you can see, oh, this, I thought this would

00:26:56.360 --> 00:26:58.180
be cool, but it actually is way harder to use.

00:26:58.180 --> 00:27:01.160
Or maybe it's exactly what I thought I wanted and it's great.

00:27:01.160 --> 00:27:02.600
And, you know, let's accept the pet.

00:27:02.920 --> 00:27:07.740
So I made this just as a way for folks to easily experiment with this kind of workflow.

00:27:07.740 --> 00:27:08.120
Yeah.

00:27:08.120 --> 00:27:09.000
Okay, great.

00:27:09.000 --> 00:27:10.260
And people can play with it.

00:27:10.260 --> 00:27:12.100
Although, who knows where this idea is going?

00:27:12.100 --> 00:27:15.980
I still think it has legs, but yeah, it's been chilling for a while.

00:27:15.980 --> 00:27:17.480
And then there's PDM.

00:27:17.480 --> 00:27:20.600
I've heard of people using PDM and does this follow?

00:27:20.600 --> 00:27:22.500
Yeah, it seems like it follows the same idea, right?

00:27:22.500 --> 00:27:24.020
Tell us about PDM real quick.

00:27:24.020 --> 00:27:24.280
Yeah.

00:27:24.280 --> 00:27:25.920
So PDM is kind of like poetry.

00:27:25.920 --> 00:27:27.600
I mean, it uses PEP 5A2.

00:27:27.600 --> 00:27:30.260
So it uses the PyPackages directory.

00:27:30.720 --> 00:27:37.980
But yeah, it's similar in the idea of poetry or similar tools like PIPenv and all the ones

00:27:37.980 --> 00:27:38.980
you mentioned, PyFlow.

00:27:38.980 --> 00:27:43.940
So it creates and modifies the PyProject.toml file.

00:27:43.940 --> 00:27:45.680
It can add its own metadata to it.

00:27:45.680 --> 00:27:46.580
It can build packages.

00:27:46.580 --> 00:27:48.500
It can publish packages.

00:27:48.500 --> 00:27:50.700
I'd have to consult that table.

00:27:51.180 --> 00:27:53.520
But yeah, I think it's kind of like an all-in-one tool.

00:27:53.520 --> 00:27:55.840
And that also uses PEP 5A2.

00:27:55.840 --> 00:27:56.540
Right, exactly.

00:27:56.540 --> 00:27:58.020
So it does a lot more.

00:27:58.020 --> 00:28:00.640
But it does happen to also use this idea, right?

00:28:00.640 --> 00:28:01.160
Right.

00:28:01.160 --> 00:28:03.440
And in the discussion on...

00:28:03.440 --> 00:28:09.520
In the PEP 5A2 discussion on where all the folks are discussing the pros and cons, the developer

00:28:09.520 --> 00:28:15.000
of PDM mentions that, like what his experience was with it, some of the tweaks he had to make

00:28:15.000 --> 00:28:17.900
to the PEP to make it work for him.

00:28:17.900 --> 00:28:21.240
And I saw that there was some interest in it.

00:28:21.240 --> 00:28:24.120
And also PyFlow is another tool similar to PDM.

00:28:24.120 --> 00:28:24.820
It's written in Rust.

00:28:25.200 --> 00:28:31.080
But I saw, I think Brett Cannon was interested in working with those two folks to maybe flesh

00:28:31.080 --> 00:28:34.220
out PEP 5A2 a little more because they have some real world experience.

00:28:34.220 --> 00:28:34.600
Okay.

00:28:34.600 --> 00:28:35.240
Interesting.

00:28:35.240 --> 00:28:35.480
Yeah.

00:28:35.480 --> 00:28:37.560
It doesn't sound like the PEP is dead.

00:28:37.560 --> 00:28:41.360
It sounds like it's stalled is more maybe how I understand it.

00:28:41.360 --> 00:28:41.580
Yeah.

00:28:41.580 --> 00:28:42.700
I think one of the...

00:28:42.700 --> 00:28:44.140
So there were two original authors.

00:28:44.140 --> 00:28:46.100
One of them is no longer interested in pursuing it.

00:28:46.100 --> 00:28:50.380
But the other is, I think he's just been a little bit busy and hasn't had time to dedicate

00:28:50.380 --> 00:28:50.740
to it.

00:28:50.740 --> 00:28:52.600
But I think there's still potential for it.

00:28:52.600 --> 00:28:52.900
Sure.

00:28:52.900 --> 00:28:54.020
Okay, cool.

00:28:54.020 --> 00:28:57.740
Well, let's move on to the star of the show, PipX.

00:28:57.740 --> 00:29:00.280
How do you tell people about PipX?

00:29:00.280 --> 00:29:07.160
PipX is a tool to install and run applications that happen to be written in Python.

00:29:07.160 --> 00:29:13.720
I was going to say, too, I think of it as like Homebrew or AppGet or Chocolaty or one of these

00:29:13.720 --> 00:29:18.840
package managers where I just want to get this command or this application on my computer.

00:29:18.840 --> 00:29:20.800
I don't really care what it's written in.

00:29:20.800 --> 00:29:25.920
It's probably written in something tough that I have to install weird dependencies for or

00:29:25.920 --> 00:29:28.140
I got to have some odd compiler and I don't want to deal with it.

00:29:28.140 --> 00:29:29.020
I just want to...

00:29:29.020 --> 00:29:33.580
I know it if I type brew install handbrake or something, like I'll have that.

00:29:33.580 --> 00:29:34.400
Right?

00:29:34.580 --> 00:29:40.600
That's the way I see PipX is there's all these cool commands and CLIs and utilities in Python

00:29:40.600 --> 00:29:43.360
and they just happen to be in Python, right?

00:29:43.360 --> 00:29:46.960
Like we as Python developers care a lot that that's the case, but we just want the commands,

00:29:46.960 --> 00:29:47.440
right?

00:29:47.440 --> 00:29:54.100
And with PipX, you can just type PipX, say, install pytest or PipX install Glances or some

00:29:54.100 --> 00:29:54.960
other cool library.

00:29:55.520 --> 00:29:57.360
And sure enough, you'll have it installed, right?

00:29:57.360 --> 00:29:58.700
Yeah, that's the idea.

00:29:58.700 --> 00:30:03.700
One of the goals is to take away difficulty for end users to install a tool.

00:30:03.700 --> 00:30:07.300
A lot of times the instructions are like, you know, install with Pip.

00:30:07.300 --> 00:30:09.000
And like I said, you can have problems with that.

00:30:09.000 --> 00:30:12.960
That's kind of a loaded instruction sometimes to give people, especially if they're not Python

00:30:12.960 --> 00:30:13.440
developers.

00:30:13.440 --> 00:30:17.180
If you as a Python developer, if you see that you wouldn't really have trouble managing that.

00:30:17.240 --> 00:30:21.260
But as a lot of folks, a lot of folks out there that just want the tool and the instructions

00:30:21.260 --> 00:30:24.080
are kind of like install, create a virtual environment.

00:30:24.080 --> 00:30:27.660
Now run the pip from that environment to install this tool.

00:30:27.660 --> 00:30:31.380
Now search into that bin path and there's your binary.

00:30:31.380 --> 00:30:36.660
Like that's not really the easiest way to get end users a really cool program that you wrote

00:30:36.660 --> 00:30:37.900
that happens to be in Python.

00:30:37.900 --> 00:30:38.540
Right, right.

00:30:38.540 --> 00:30:40.080
I want to have this program accessible.

00:30:40.080 --> 00:30:43.700
Oh, wait, did you forget which virtual environment you installed it into?

00:30:43.700 --> 00:30:46.220
And did you forget to activate that or whatever, right?

00:30:46.500 --> 00:30:49.660
So this solves a lot of those problems, which is fantastic.

00:30:49.660 --> 00:30:53.080
Juergen again says, as you said, install and run Python applications.

00:30:53.080 --> 00:30:55.400
Does this refer only to CLI or even web apps?

00:30:55.400 --> 00:30:57.460
I'm not sure I understand the question.

00:30:57.460 --> 00:30:59.060
Certainly CLI apps.

00:30:59.060 --> 00:31:02.000
I'm not sure what a web app is in terms of this question.

00:31:02.000 --> 00:31:02.400
Sure.

00:31:02.400 --> 00:31:05.940
Well, I guess maybe just can it install stuff more broadly?

00:31:05.940 --> 00:31:11.760
Like if I had something maybe that was built with GUI, for example, G-O-O-E-Y, like that

00:31:11.760 --> 00:31:16.400
GUI framework, or I have something that was installed or built with some other tool.

00:31:16.400 --> 00:31:20.080
That when I run it, maybe I don't get a CLI experience.

00:31:20.080 --> 00:31:24.500
Maybe it installs Flask and opens a browser or something like that, right?

00:31:24.500 --> 00:31:25.720
I think that's the question.

00:31:25.720 --> 00:31:26.520
Yeah, absolutely.

00:31:26.520 --> 00:31:30.180
That's actually where I found the need for PipX most.

00:31:30.180 --> 00:31:33.240
And the tool I made that happens to be a web app where I have these...

00:31:33.980 --> 00:31:39.040
So the tool is called GDB GUI, and it's a web app that lets you debug programs with GDB.

00:31:39.040 --> 00:31:39.400
Right.

00:31:39.400 --> 00:31:44.300
And so I was ready to read me to tell folks how to get it, how to run it.

00:31:44.300 --> 00:31:49.380
So people that are trying to debug things with GDB, maybe they're Python developers, but they're

00:31:49.380 --> 00:31:54.240
definitely C developers or Rust developers, some kind of a native language.

00:31:54.840 --> 00:31:59.300
So the read me instructions I wrote were, I kind of like struggled with how to tell people

00:31:59.300 --> 00:32:00.100
to install this.

00:32:00.100 --> 00:32:04.160
Telling them to install pip with pip was not something I was comfortable with because there

00:32:04.160 --> 00:32:08.100
are so many dependencies GDB GUI has, and I didn't really want to like break their system.

00:32:08.100 --> 00:32:09.340
There was kind of two fears.

00:32:09.340 --> 00:32:10.960
Like one, I didn't want to mess their system up.

00:32:10.960 --> 00:32:15.720
And two, I didn't know if it would work reliably because there was, maybe they would install

00:32:15.720 --> 00:32:17.080
something else and mess it up.

00:32:17.340 --> 00:32:22.060
I searched for a while to find something that could get this installed in a better way.

00:32:22.060 --> 00:32:23.360
And I'm Pipsy.

00:32:23.360 --> 00:32:24.240
Okay.

00:32:24.240 --> 00:32:26.820
So yeah, Pipsy like this.

00:32:26.820 --> 00:32:27.080
Yeah.

00:32:27.080 --> 00:32:27.620
Yeah.

00:32:27.620 --> 00:32:28.680
P-I-P-S-I.

00:32:28.680 --> 00:32:28.940
Okay.

00:32:28.940 --> 00:32:31.180
This is basically exactly what I wanted.

00:32:31.180 --> 00:32:36.260
It gives you a single command that creates a virtual environment, installs package there,

00:32:36.260 --> 00:32:39.420
and that exposes the binary entry point, which sounds familiar.

00:32:39.420 --> 00:32:43.320
It is because that's what PipX's origin is from.

00:32:43.320 --> 00:32:43.900
Right.

00:32:43.900 --> 00:32:46.480
And in fact, right at the top of the Pipsy read me, it says,

00:32:46.620 --> 00:32:47.980
Pipsy is no longer maintained.

00:32:47.980 --> 00:32:49.320
You should check out PipX.

00:32:49.320 --> 00:32:50.340
Right.

00:32:50.340 --> 00:32:55.980
The origin of PipX came from one of the issues in Pipsy where someone,

00:32:55.980 --> 00:32:59.060
we were kind of having trouble getting changes merged to Pipsy.

00:32:59.060 --> 00:32:59.980
I found it.

00:32:59.980 --> 00:33:00.560
I was really excited.

00:33:00.560 --> 00:33:02.640
And I started making a bunch of pull requests on it.

00:33:02.640 --> 00:33:04.840
And I was having trouble getting things merged.

00:33:04.840 --> 00:33:08.160
And basically the maintainers, they were okay with having it in maintenance mode,

00:33:08.160 --> 00:33:10.960
but they didn't really want to do active development with it.

00:33:10.960 --> 00:33:16.460
And the owner, which was Armin Roedeker, he had sort of unsubscribed from the project.

00:33:16.460 --> 00:33:17.620
And wasn't really following it.

00:33:17.620 --> 00:33:22.760
And so he was the only person that was able to give more access to let people become maintainers

00:33:22.760 --> 00:33:23.680
or so on.

00:33:23.680 --> 00:33:26.100
So we were able to add ourselves as maintainers.

00:33:26.100 --> 00:33:27.380
So we were kind of stuck with this tool.

00:33:27.380 --> 00:33:28.940
We could like, maybe we could fork it.

00:33:28.940 --> 00:33:30.580
Maybe we could make a new tool.

00:33:30.580 --> 00:33:30.920
Yeah.

00:33:30.980 --> 00:33:32.940
So how'd you get from there to PipX?

00:33:32.940 --> 00:33:36.940
As I said, I was like, I'm into also TypeScript and the JavaScript community.

00:33:36.940 --> 00:33:41.720
And one of the tools they have there is called NPX, which is pretty similar to PipX.

00:33:41.720 --> 00:33:47.300
It lets you run CLI apps from Node, who also can have similar challenges because it's an interpreted language.

00:33:47.700 --> 00:33:51.520
And so I made PipX to kind of add that capability to Python.

00:33:51.520 --> 00:33:57.220
And then I added the ability, since it does kind of like, it makes a virtual environment, it finds the binary in it and it runs it.

00:33:57.220 --> 00:33:59.500
It's very similar to installing it.

00:33:59.500 --> 00:34:04.100
It's basically installed in a temporary place and runs it versus installing it in a permanent place.

00:34:04.480 --> 00:34:06.640
And so I added the install capability on PipX.

00:34:06.640 --> 00:34:08.900
I shared it with some of the folks in the issue tracker.

00:34:08.900 --> 00:34:11.060
And they were like, this works for me.

00:34:11.060 --> 00:34:12.800
Let's go use that.

00:34:12.800 --> 00:34:13.920
And this is it.

00:34:13.920 --> 00:34:14.180
Yeah.

00:34:14.180 --> 00:34:21.020
The momentum continued around it and had a lot of really great contributors work on PipX.

00:34:21.020 --> 00:34:21.740
Yeah, that's great.

00:34:21.740 --> 00:34:27.540
The GitHub repo says 75 contributors and 5,000 GitHub stars, which is pretty awesome.

00:34:27.540 --> 00:34:28.040
Yeah.

00:34:28.040 --> 00:34:29.200
I'm really happy with it.

00:34:31.640 --> 00:34:36.440
This portion of Talk Python To Me is brought to you by the Python at Scale Summit.

00:34:36.440 --> 00:34:43.100
The Python at Scale Summit is a conference to highlight innovative big data solutions for Python developers and enterprises.

00:34:43.100 --> 00:34:48.820
You'll learn about trends in the Python big data ecosystem, share stories about implementing solutions,

00:34:48.820 --> 00:34:53.620
find out about new innovations, and connect with other data scientists using Python.

00:34:53.620 --> 00:34:59.260
The Python at Scale Summit will be a hybrid conference with talks, workshops, and training.

00:34:59.480 --> 00:35:04.120
Of course, there will be networking and social events to connect with other Python professionals, too.

00:35:04.120 --> 00:35:09.120
Come hear speakers like Matt Rockland from Coiled, Brian Granger from AWS,

00:35:09.120 --> 00:35:14.480
and many others from amazing organizations such as NASA, Capital One, and BCG.

00:35:14.480 --> 00:35:19.720
Get back together with your peers and learn how they're scaling their computation and data analysis

00:35:19.720 --> 00:35:22.140
using Python and the data science stack.

00:35:22.720 --> 00:35:27.120
Register at talkpython.fm/python dash at dash scale.

00:35:27.120 --> 00:35:34.200
When you visit the link, be sure to use the code TALKPYTHON, all caps, to get 15% off your tickets.

00:35:34.200 --> 00:35:38.640
That's code TALKPYTHON at talkpython.fm/python at scale.

00:35:38.640 --> 00:35:40.720
The link's in your podcast player's show notes.

00:35:40.720 --> 00:35:42.980
Thanks to the Summit for supporting the podcast.

00:35:43.980 --> 00:35:45.560
I use it all the time.

00:35:45.560 --> 00:35:50.780
I personally really like it, and I'm really glad to see other folks are enjoying it as well.

00:35:50.780 --> 00:35:53.000
Yeah, I use it all the time.

00:35:53.000 --> 00:35:58.320
It's one of my go-to tools when I want to check out something I know is built with Python as an application,

00:35:58.320 --> 00:35:59.940
or I get a new machine.

00:35:59.940 --> 00:36:03.240
We can talk about some of the fun stuff to install in a little bit,

00:36:03.300 --> 00:36:08.240
but maybe let's first talk about what happens and how do I use PipX?

00:36:08.240 --> 00:36:09.220
What's the process?

00:36:09.220 --> 00:36:14.140
You do have a nice animated GIF on the GitHub project so people can see what happens,

00:36:14.140 --> 00:36:15.820
but maybe walk us through it.

00:36:15.820 --> 00:36:17.480
Let's say Glances.

00:36:17.480 --> 00:36:21.220
Glances is a fantastic application that you can use,

00:36:21.220 --> 00:36:28.980
and if you run it on your machine, it gives you this super rich terminal-based real-time view into your servers.

00:36:29.100 --> 00:36:32.880
It's much, much better than top or something like that.

00:36:32.880 --> 00:36:34.400
It also has a web view and whatnot.

00:36:34.400 --> 00:36:38.100
So that's a thing that people might not care about Python for,

00:36:38.100 --> 00:36:42.520
but it happens to be written in Python, so it's a perfect thing to PipX install.

00:36:42.520 --> 00:36:43.100
Exactly.

00:36:43.100 --> 00:36:46.480
Yeah, so talk us through, if I have PipX install Glances, what happens?

00:36:46.480 --> 00:36:47.160
Yeah, sure.

00:36:47.160 --> 00:36:53.400
So the first thing is PipX will try to determine which package you're trying to install.

00:36:53.400 --> 00:36:58.640
So you can give it just a name Glances, or you can give it basically any pip specifier,

00:36:58.640 --> 00:37:04.160
any kind of, it can be a Git repository, it can be a wheel, anything pip can install, PipX can install.

00:37:04.160 --> 00:37:07.880
So first it will make sure that it's a valid package specification.

00:37:07.880 --> 00:37:13.160
Then it will create a virtual environment in this directory that PipX manages.

00:37:13.160 --> 00:37:15.900
So it'll make a virtual environment with the name of the package.

00:37:15.900 --> 00:37:17.540
It'll make a Glances virtual environment.

00:37:17.540 --> 00:37:23.140
Then it will do some introspection on the, that it will install Glances into the virtual environment.

00:37:23.140 --> 00:37:26.280
So now we have a virtual environment with Glances installed,

00:37:26.280 --> 00:37:29.940
but it's not accessible anywhere other than inside that virtual environment.

00:37:29.940 --> 00:37:34.840
And so the next thing it does is it does some introspection on the virtual environment to say like,

00:37:34.840 --> 00:37:36.800
what binaries do we have available?

00:37:36.800 --> 00:37:40.380
And so it would be expecting Glances to be available.

00:37:40.780 --> 00:37:48.120
And it will then take, it'll find the path to the Glances binary and create a symlink into a directory on your path,

00:37:48.120 --> 00:37:49.600
on your, on your shell's path.

00:37:49.600 --> 00:37:51.720
So that when you run that command, it's available.

00:37:51.720 --> 00:37:52.140
Right.

00:37:52.140 --> 00:37:59.680
So for example, you need to have, in your little example here was home slash csmith slash dot local slash bin.

00:37:59.680 --> 00:38:03.220
And then that's the folder where all the symlink stuff gets linked over.

00:38:03.220 --> 00:38:05.280
You can also do those with entry points, right?

00:38:05.280 --> 00:38:07.300
It'll find the entry points and make them available.

00:38:07.300 --> 00:38:07.700
Yeah.

00:38:07.700 --> 00:38:08.620
So these are cons.

00:38:08.620 --> 00:38:09.700
These are, these are entry points.

00:38:09.700 --> 00:38:10.720
These are the console scripts.

00:38:10.720 --> 00:38:11.120
Okay.

00:38:11.120 --> 00:38:14.620
So that leads me to a question out in the audience from Ratul.

00:38:14.620 --> 00:38:16.520
Ratul says, this looks great.

00:38:16.520 --> 00:38:21.920
Not sure if I missed it, but how do you get your built Python app to be pipx installable?

00:38:21.920 --> 00:38:27.040
So you said it has to be pip installable, but then I think the other point here,

00:38:27.040 --> 00:38:31.620
you would have to expose some functionality in a way, and that could be entry points, right?

00:38:31.620 --> 00:38:32.020
Yeah.

00:38:32.020 --> 00:38:37.640
So pretty much that is the, essentially the only way is this, is the console script entry point.

00:38:37.640 --> 00:38:38.760
So you can look this up.

00:38:38.760 --> 00:38:45.640
It's a kind of well-defined part of the packaging specifications, but you can define a function

00:38:45.640 --> 00:38:49.200
that you want to call from a console script entry point.

00:38:49.200 --> 00:38:49.520
Yeah.

00:38:49.520 --> 00:38:53.940
So in your setup, you would say something like set up tools dot setup entry points equals,

00:38:53.940 --> 00:38:59.580
and then you give it a list of a command and then basically a module colon function, right?

00:38:59.580 --> 00:39:04.460
So here's this example that I'll link to in the show notes is, is hello world equals hello

00:39:04.460 --> 00:39:09.120
world, which is the module name colon say hi, which is a function in hello world.

00:39:09.120 --> 00:39:12.820
And once you pip install that into a virtual environment, you could just type hello world

00:39:12.820 --> 00:39:14.680
and it would do whatever it does for that function.

00:39:14.680 --> 00:39:19.820
But what you're saying is if you install with pip X, it finds these and creates basically

00:39:19.820 --> 00:39:24.840
binaries that the system can see that it thinks it can run called hello world, for example.

00:39:24.840 --> 00:39:25.220
Yeah.

00:39:25.220 --> 00:39:30.780
When you pip install something that has a console script, it makes this like a shell script that

00:39:30.780 --> 00:39:32.920
calls that function for you.

00:39:32.920 --> 00:39:37.100
And so these shell scripts just get sim linked out onto your path by pip X.

00:39:37.100 --> 00:39:37.520
Got it.

00:39:37.520 --> 00:39:37.880
Yeah.

00:39:37.880 --> 00:39:40.040
So it's basically doing the install.

00:39:40.040 --> 00:39:43.660
It's creating the virtual environment automatically behind the scenes.

00:39:43.660 --> 00:39:49.000
It's installing, doing basically pip install on the package, but that drags in all of the

00:39:49.000 --> 00:39:49.460
dependencies.

00:39:49.460 --> 00:39:54.780
But the important thing is every one of these commands, or I guess the thing you pip X install,

00:39:54.780 --> 00:39:56.420
it can have multiple commands as part of it.

00:39:56.420 --> 00:40:00.580
It gets its own virtual environment that's isolated, not just from the rest of the system,

00:40:00.580 --> 00:40:02.220
but all the other pip X things as well.

00:40:02.560 --> 00:40:04.620
So they're versioned and they live independently, right?

00:40:04.620 --> 00:40:05.000
Exactly.

00:40:05.000 --> 00:40:05.360
Yeah.

00:40:05.360 --> 00:40:07.100
You can have more than one console script too.

00:40:07.100 --> 00:40:11.480
A lot of times package will have, you know, two or three, four console script entry points

00:40:11.480 --> 00:40:12.820
and pip X will find all those.

00:40:12.820 --> 00:40:13.360
Nice.

00:40:13.360 --> 00:40:13.940
Yeah.

00:40:13.940 --> 00:40:15.780
One that comes to mind is pi jokes.

00:40:15.780 --> 00:40:17.360
Are you familiar with pi jokes?

00:40:17.360 --> 00:40:17.600
Yeah.

00:40:17.600 --> 00:40:19.640
I've heard you guys talk about that on the podcast before.

00:40:19.640 --> 00:40:19.940
Yeah.

00:40:19.940 --> 00:40:21.960
Pi jokes is a good one.

00:40:21.960 --> 00:40:25.960
So this one has entry points and I always get this through pip X.

00:40:25.960 --> 00:40:32.200
I just, you know, pip X install pi jokes and you end up with a bunch of, who'd they say

00:40:32.200 --> 00:40:33.860
pip X, right?

00:40:33.860 --> 00:40:36.640
And then you can run pi joke or pi jokes.

00:40:36.640 --> 00:40:41.120
And even as a program API and you get really deep jokes.

00:40:41.120 --> 00:40:43.440
Like why did the programmer quit their job?

00:40:43.440 --> 00:40:44.660
Because they didn't get a raise.

00:40:44.660 --> 00:40:46.600
A raise is in like lists.

00:40:47.880 --> 00:40:49.800
But you know, it's those types of things, right?

00:40:49.800 --> 00:40:52.440
You don't necessarily care that pi joke is written in Python.

00:40:52.440 --> 00:40:55.280
I mean, the name would maybe make you think it should be, but right.

00:40:55.280 --> 00:40:58.140
You just want to have a command that you can type something and get a funny programmer joke

00:40:58.140 --> 00:40:58.500
out of it.

00:40:58.500 --> 00:40:58.700
Right.

00:40:58.700 --> 00:41:02.920
But maybe we could touch on some of the other things that are more useful than pi joke.

00:41:03.460 --> 00:41:06.200
Like one you mentioned was the GDB GUI.

00:41:06.200 --> 00:41:10.140
I gave a shout out to glances because glances, I said, is fantastic.

00:41:10.140 --> 00:41:11.320
I use glances all the time.

00:41:11.320 --> 00:41:14.140
It just happens to be written in Python, but I just want it on my server.

00:41:14.140 --> 00:41:17.180
Maybe another one that pointed out was HTTP pi.

00:41:17.500 --> 00:41:20.220
HTTP pi, HTTP IE.

00:41:20.220 --> 00:41:21.140
Do you use this one?

00:41:21.140 --> 00:41:25.360
I have not used it too much, but I would love to find an opportunity to use it.

00:41:25.360 --> 00:41:27.200
Prefer it over things like curl.

00:41:27.200 --> 00:41:27.600
Yeah.

00:41:27.600 --> 00:41:29.820
I love HTTP pi.

00:41:29.820 --> 00:41:35.080
It works just like curl in a lot of ways, but the results that it gives you, it gives you

00:41:35.080 --> 00:41:41.460
syntax highlighting, easy ability to say, just show me the headers and the response, the

00:41:41.460 --> 00:41:43.900
response headers and stuff that came back and cookies.

00:41:43.900 --> 00:41:46.400
And it, you know, does highlighting on those.

00:41:46.400 --> 00:41:47.180
It's really nice.

00:41:47.240 --> 00:41:53.060
So just pipx install HTTP pi, and then you get HTTP as a command and HTTPS.

00:41:53.060 --> 00:41:55.180
Here's another one with two entry points, right?

00:41:55.180 --> 00:42:02.920
So if you just want to say HTTP, you know, 127.0.0.1, you don't have to say HTTP colon slash

00:42:02.920 --> 00:42:03.940
slash server name.

00:42:03.940 --> 00:42:07.860
You can just say the command, either HTTP or HTTPS, and it'll, it'll do it.

00:42:07.860 --> 00:42:08.560
It's just a little bit shorter.

00:42:08.560 --> 00:42:09.140
Right.

00:42:09.140 --> 00:42:11.080
So this one, big fan.

00:42:11.080 --> 00:42:16.660
But what was surprising to me about this is, you know, this is backed by a company, right?

00:42:16.980 --> 00:42:22.480
There's like a whole bigger organization behind HTTP pi than I realized, I believe.

00:42:22.480 --> 00:42:24.120
So I was impressed with their website.

00:42:24.120 --> 00:42:27.360
It was a lot more polished than a lot of other open source projects.

00:42:27.360 --> 00:42:30.520
So I'm not surprised to hear that they're funded or they're part of a company.

00:42:30.520 --> 00:42:31.120
Yeah, exactly.

00:42:31.120 --> 00:42:34.100
At the bottom, it says like job, there's a whole job section.

00:42:34.100 --> 00:42:37.420
There's apparently four jobs for HTTP pi, which is incredible.

00:42:37.800 --> 00:42:40.500
At the same time, it's a fantastic tool.

00:42:40.500 --> 00:42:40.800
Yeah.

00:42:40.800 --> 00:42:42.360
So, you know, good on them.

00:42:42.360 --> 00:42:43.200
Let's see.

00:42:43.200 --> 00:42:44.340
Maybe some of the other ones.

00:42:44.340 --> 00:42:46.920
I know we had a little bit of list of stuff that could be fun.

00:42:46.920 --> 00:42:48.980
Pi installer, pi to app.

00:42:48.980 --> 00:42:50.040
Let's see.

00:42:50.040 --> 00:42:52.300
Pi installer, pi to app, Cython.

00:42:52.300 --> 00:42:55.060
A lot of the package management stuff.

00:42:55.060 --> 00:42:57.020
Poetry, pipenv.

00:42:57.020 --> 00:42:57.580
Yeah.

00:42:57.620 --> 00:42:59.260
Anything else you want to give a shout out to?

00:42:59.260 --> 00:43:01.820
I've got one I want to use as well, but go ahead and do yours.

00:43:01.820 --> 00:43:06.260
Another program I made, I guess I'll plug my own, one of my other projects, it's called

00:43:06.260 --> 00:43:06.800
Term Pair.

00:43:06.800 --> 00:43:09.360
So this is actually kind of a web app.

00:43:09.360 --> 00:43:12.600
It lets you share your terminal session through the web.

00:43:13.040 --> 00:43:17.840
But it does it by encrypting all the output and input from your terminal.

00:43:17.840 --> 00:43:23.340
And so basically you run this command term pair share, and then it will start sharing through

00:43:23.340 --> 00:43:24.120
this server.

00:43:24.120 --> 00:43:28.020
And then you can either, you can control it from the web app or you can control it from

00:43:28.020 --> 00:43:28.660
the terminal.

00:43:28.660 --> 00:43:32.720
And the process running in the terminal is a Python app.

00:43:32.720 --> 00:43:35.900
And then, of course, the web app is JavaScript React.

00:43:35.900 --> 00:43:36.760
Yeah.

00:43:36.760 --> 00:43:37.560
How interesting.

00:43:37.560 --> 00:43:42.220
Does it give you your normal shell or is it like a bare bash or Z shell or something?

00:43:42.580 --> 00:43:43.720
By default, it uses...

00:43:43.720 --> 00:43:49.120
Like if I do a super configuration of my shell, make it like all blinged out, and then I run

00:43:49.120 --> 00:43:52.500
this, do I get the same crazy configuration or is it a simpler version?

00:43:52.500 --> 00:43:53.620
No, it's the exact same thing.

00:43:53.620 --> 00:43:57.300
It'll just run whatever shell, whatever the shell environment variable is that you're running.

00:43:57.300 --> 00:43:58.800
It'll just, that's the default command.

00:43:58.800 --> 00:44:00.060
You can run any command you want.

00:44:00.060 --> 00:44:01.820
If you want to run Python, you can run Python.

00:44:01.820 --> 00:44:03.500
It'll share your Python session.

00:44:03.500 --> 00:44:05.100
You can run anything really.

00:44:05.100 --> 00:44:09.480
But if you run a shell, that's the most familiar thing, I think, for sharing.

00:44:09.480 --> 00:44:09.780
Sure.

00:44:09.780 --> 00:44:10.300
Sure.

00:44:10.300 --> 00:44:11.020
Interesting.

00:44:11.520 --> 00:44:13.740
It'll share basically any CLI thing, huh?

00:44:13.740 --> 00:44:15.400
It spawns a PTY process.

00:44:15.400 --> 00:44:21.400
And then any output or input just gets written and behaves like any other terminal would.

00:44:21.400 --> 00:44:25.620
So you can do stuff like, you know, this is HTOP where you're interacting with it.

00:44:25.620 --> 00:44:28.000
And it's kind of like rewriting lines to the screen.

00:44:28.000 --> 00:44:29.440
And it's able to handle all that.

00:44:29.440 --> 00:44:33.080
It might be a nice way to help people who are like, you know, I'm stuck.

00:44:33.080 --> 00:44:34.080
I can't get this to work.

00:44:34.080 --> 00:44:37.060
You're in an email exchange or a Zoom meeting or something.

00:44:37.060 --> 00:44:38.600
You know, run this and give me the link.

00:44:38.600 --> 00:44:42.320
And I'll just, let me just ask your system a question real quick and see if it does the same.

00:44:42.320 --> 00:44:45.140
You got to have a lot of trust to give this over to people though, right?

00:44:45.140 --> 00:44:45.560
Yeah.

00:44:45.560 --> 00:44:47.980
You know, I made it because it seemed really fun.

00:44:47.980 --> 00:44:48.840
It was a challenge.

00:44:48.840 --> 00:44:49.580
It seemed fun.

00:44:50.000 --> 00:44:53.400
Practically speaking, yeah, I don't know how often it's used.

00:44:53.400 --> 00:44:55.720
You'd have to totally trust somebody to not.

00:44:55.720 --> 00:44:57.580
I mean, they have full control over your computer.

00:44:57.580 --> 00:44:57.900
Sure.

00:44:57.900 --> 00:45:02.600
It's not that different than going to a Zoom meeting and say, allow so-and-so to share,

00:45:02.600 --> 00:45:06.120
to control my mouse and keyboard or team viewers or something like that.

00:45:06.120 --> 00:45:06.560
Yeah, that's true.

00:45:06.560 --> 00:45:06.900
Yeah.

00:45:06.900 --> 00:45:07.380
Yeah.

00:45:07.380 --> 00:45:08.560
But still pretty neat.

00:45:08.560 --> 00:45:08.800
I don't know.

00:45:08.800 --> 00:45:09.780
It's just so more visceral.

00:45:09.780 --> 00:45:10.420
It's right there.

00:45:10.420 --> 00:45:11.960
You could just RMRF it right there.

00:45:11.960 --> 00:45:12.240
Yeah.

00:45:12.240 --> 00:45:14.860
There's another one I want to pull up here.

00:45:14.860 --> 00:45:17.460
This one, PLS.

00:45:17.460 --> 00:45:18.280
Do you use PLS?

00:45:18.280 --> 00:45:18.780
Any?

00:45:18.780 --> 00:45:19.740
Yeah, I've tried it out.

00:45:19.740 --> 00:45:20.580
It's pretty cool.

00:45:20.580 --> 00:45:24.200
I like that you can do so many different things.

00:45:24.200 --> 00:45:28.640
I like how easy it is to develop applications in Python, where you can just kind of make whatever

00:45:28.640 --> 00:45:31.120
customizations and hack things up really quickly.

00:45:31.120 --> 00:45:31.640
Absolutely.

00:45:31.640 --> 00:45:35.000
So PLS, it's a little hard probably to see over the screen share.

00:45:35.000 --> 00:45:36.140
It's a replacement for LS.

00:45:36.140 --> 00:45:41.260
And I know there are many replacements for LS, but this one is cool because it's a developer-friendly

00:45:41.260 --> 00:45:41.620
one.

00:45:41.620 --> 00:45:47.300
And so when you interact with it, it will use a lot of different things.

00:45:47.300 --> 00:45:53.660
For example, it'll show icons for Python logos next to .py files, JavaScript logos next to

00:45:53.660 --> 00:45:55.300
JS files, and so on.

00:45:55.300 --> 00:46:01.620
But it will also use git ignore files to decide what shows up in the basic view.

00:46:01.620 --> 00:46:03.760
It'll show you the git status of the file.

00:46:03.760 --> 00:46:09.120
When you do a PLS --details, you'll see which files in that listing are modified

00:46:09.120 --> 00:46:11.220
in git, according to git, and so on.

00:46:11.260 --> 00:46:14.440
So there's just a ton of fun stuff here that you can check out.

00:46:14.440 --> 00:46:15.760
I definitely think it's neat.

00:46:15.760 --> 00:46:17.500
Here's some examples of some of the colors.

00:46:17.500 --> 00:46:22.100
For example, poetry.lock, because it's git ignored, but still important.

00:46:22.100 --> 00:46:28.380
It shows up, but it's a very faint color, whereas other files show up with regular colors.

00:46:28.380 --> 00:46:31.840
So this one is another one that's good to pipx install, right?

00:46:31.840 --> 00:46:33.240
Because you just need it once for your computer.

00:46:33.500 --> 00:46:34.720
Yeah, I love those colors too.

00:46:34.720 --> 00:46:35.620
Great color scheme.

00:46:35.620 --> 00:46:36.860
Yeah, yeah, absolutely.

00:46:36.860 --> 00:46:40.300
And apparently you can build little plugins and stuff for it, I think, in Python.

00:46:40.300 --> 00:46:41.780
I haven't tried to do that.

00:46:41.780 --> 00:46:43.600
I've just tried to use it as a user.

00:46:43.600 --> 00:46:46.020
But yeah, that one's a fun one.

00:46:46.020 --> 00:46:48.940
For a while, I replaced LS with it.

00:46:48.940 --> 00:46:53.080
That wasn't a super idea, because it behaves weirdly.

00:46:53.440 --> 00:47:01.320
If you try to LS something and it doesn't exist, you get a traceback exception instead of just doesn't exist or nothing.

00:47:01.320 --> 00:47:06.660
It's not perfect, but as a thing that you have hanging around, it's definitely quite neat.

00:47:06.660 --> 00:47:09.360
Yeah, replacing system utilities can get kind of risky.

00:47:09.360 --> 00:47:13.420
Yeah, you just got to know what you're doing.

00:47:13.420 --> 00:47:16.100
I'm willing for this to mildly break stuff.

00:47:16.100 --> 00:47:21.700
But if you make it like you said that one time you couldn't turn on your computer, then you're in a bad spot.

00:47:21.700 --> 00:47:28.160
Or if you could at least get back and edit your profile, your shell profile, and turn those back to normal, then you're probably okay.

00:47:28.160 --> 00:47:28.560
Yeah.

00:47:28.560 --> 00:47:37.560
Well, maybe real quickly, you could give us just if there's any interesting internal, there's some interesting tools or stuff that happens behind the scenes with PipX.

00:47:37.560 --> 00:47:41.440
Give us a look inside real quick, and then maybe we could wrap things up.

00:47:41.440 --> 00:47:43.760
Any interesting internals of PipX?

00:47:43.760 --> 00:47:44.200
Let's see.

00:47:44.200 --> 00:47:44.920
Yeah, yeah.

00:47:44.920 --> 00:47:48.480
Like notable libraries that it uses or something that's really valuable in there.

00:47:48.480 --> 00:47:54.400
I was poking around the PyProject.tabble, and there's like argcomplete.

00:47:54.400 --> 00:47:56.440
Sounded interesting to me.

00:47:56.440 --> 00:47:59.000
And then a user path is new to me as well.

00:47:59.000 --> 00:47:59.640
Okay, yeah, yeah.

00:47:59.640 --> 00:48:00.080
Sure.

00:48:00.080 --> 00:48:02.860
So argcomplete, I'm a huge fan of.

00:48:02.860 --> 00:48:10.360
Argcomplete is a package that, so if you use argparse, which is the standard library's argument parsing package,

00:48:10.660 --> 00:48:15.220
a lot of times you'll want to have like tab completion and tab completion can be really hard to write.

00:48:15.220 --> 00:48:21.080
And so argcomplete gives you a Python API to tell it how tab completion should work.

00:48:21.080 --> 00:48:29.500
And so in PipX's case, if you're going to do something like PipX, like uninstall a package, you have to give a name of a package that's been installed.

00:48:29.900 --> 00:48:40.080
And so with argcomplete, you can say like PipX uninstall tab, and then argcomplete, you give argcomplete a list or like a way to get a list of packages that can be uninstalled.

00:48:40.080 --> 00:48:43.260
And then it gives you that tab completion just like you'd expect.

00:48:43.260 --> 00:48:45.300
And it also does it across shells.

00:48:45.300 --> 00:48:53.240
So like writing it for just bash is enough to do, but then you also have to write like different completions for fish or something like that.

00:48:53.480 --> 00:48:59.060
And so argcomplete lets you not think about that and just use your argparse as you normally would with just like a couple extra arguments.

00:48:59.060 --> 00:49:01.240
And then boom, you have tab completion.

00:49:01.240 --> 00:49:01.680
Right.

00:49:01.680 --> 00:49:02.020
Yeah.

00:49:02.020 --> 00:49:08.120
There's a whole section where you talk about how to install completion in here for the shells.

00:49:08.120 --> 00:49:14.980
So, you know, do you do that for, if you just type PipX space completions, it'll tell you how to do that, right?

00:49:14.980 --> 00:49:15.380
Right.

00:49:15.380 --> 00:49:18.960
And argcomplete's useful for, I mean, I actually added it for Knox.

00:49:18.960 --> 00:49:23.300
I'm a big fan of the tool Knox, which is also PipX installable and Knox.

00:49:23.300 --> 00:49:25.820
A lot of times you want to, there's only a lot of sessions.

00:49:25.820 --> 00:49:28.380
You run sessions in Knox and there's a whole bunch of them.

00:49:28.380 --> 00:49:31.180
And so having a tab completion on that was a feature I really wanted.

00:49:31.180 --> 00:49:33.800
And I think, I think that's where I first found out about argcomplete.

00:49:33.800 --> 00:49:37.460
And then I started adding it to other projects after I found out how easy it was to use.

00:49:37.460 --> 00:49:37.720
Right.

00:49:37.720 --> 00:49:38.780
You're like, this is not that hard.

00:49:38.780 --> 00:49:39.240
I want this.

00:49:39.240 --> 00:49:39.540
Yeah.

00:49:39.540 --> 00:49:40.300
Yeah.

00:49:40.300 --> 00:49:40.700
Cool.

00:49:40.700 --> 00:49:46.680
The other thing that people need to remember to do is to run PipX ensure path, right?

00:49:46.680 --> 00:49:47.100
Right.

00:49:47.140 --> 00:49:52.900
Because you talked about, we talked about that .local slash bin in your user profile, at least on macOS.

00:49:52.900 --> 00:49:53.720
I don't know if that's where it goes.

00:49:53.720 --> 00:49:55.440
It might go somewhere else in Windows.

00:49:55.440 --> 00:49:57.620
But you want to make sure that's in your path.

00:49:57.620 --> 00:50:01.920
So that'll basically modify whatever your active shell profile is to make sure it's in your path, right?

00:50:01.920 --> 00:50:02.440
That's right.

00:50:02.440 --> 00:50:02.860
Yeah.

00:50:02.860 --> 00:50:08.120
And you can also modify where that binary directory is with an environment variable if you want.

00:50:08.120 --> 00:50:08.400
Okay.

00:50:08.400 --> 00:50:11.140
How well does this work on Windows as well?

00:50:11.140 --> 00:50:12.240
Does it work there?

00:50:12.240 --> 00:50:14.000
Is it like PowerShell friendly and stuff like that?

00:50:14.000 --> 00:50:15.280
So it does work on Windows.

00:50:15.280 --> 00:50:19.880
I know that one of the contributors is one of the maintainers is a Windows user.

00:50:19.880 --> 00:50:25.120
And I don't see a flood of Windows issues coming in about this doesn't work on Windows.

00:50:25.120 --> 00:50:27.100
So it should work on Windows.

00:50:27.100 --> 00:50:27.340
Yeah.

00:50:27.340 --> 00:50:27.700
Yeah.

00:50:27.700 --> 00:50:28.020
Yeah.

00:50:28.020 --> 00:50:28.480
Perfect.

00:50:28.480 --> 00:50:29.120
Okay.

00:50:29.120 --> 00:50:31.540
And then it can upgrade itself.

00:50:31.540 --> 00:50:35.260
If you do pip upgrade like --user or something like that.

00:50:35.260 --> 00:50:36.440
It doesn't install itself.

00:50:36.580 --> 00:50:41.220
I'm considering making a new installer where pipX installs itself with pipX.

00:50:41.220 --> 00:50:42.760
I'm not sure I'm going to land that.

00:50:42.760 --> 00:50:45.180
Right now we install pipX with pip.

00:50:45.180 --> 00:50:48.680
And so you would just upgrade it normally with like pip upgrade pipX.

00:50:48.680 --> 00:50:48.980
Sure.

00:50:48.980 --> 00:50:49.820
Okay.

00:50:49.820 --> 00:50:50.940
Or it's pip install dash user.

00:50:50.940 --> 00:50:51.220
Sorry.

00:50:51.360 --> 00:50:54.500
Another thing that I like about pipX is you can just say pipX.

00:50:54.500 --> 00:50:55.160
What is it?

00:50:55.160 --> 00:50:55.880
Upgrade all.

00:50:55.880 --> 00:50:56.320
Yeah.

00:50:56.320 --> 00:50:58.100
Or there's a command to just upgrade.

00:50:58.100 --> 00:50:58.780
You know what?

00:50:58.780 --> 00:51:00.720
Give me a new version of all my libraries.

00:51:00.720 --> 00:51:03.400
Which comes back to similar with apt.

00:51:03.400 --> 00:51:05.060
Similar to homebrew, right?

00:51:05.060 --> 00:51:09.220
There's a brew update and outdated and just show me the stuff that could be updated.

00:51:09.220 --> 00:51:10.460
And then we'll just do it.

00:51:10.460 --> 00:51:11.400
Same with Chocolaty.

00:51:11.800 --> 00:51:13.980
Just to keep the tools used fresh.

00:51:13.980 --> 00:51:14.540
It's really nice.

00:51:14.540 --> 00:51:14.740
Yeah.

00:51:14.740 --> 00:51:16.500
It kind of goes back to like, I have this program.

00:51:16.500 --> 00:51:18.140
I don't really care about that.

00:51:18.140 --> 00:51:18.660
It's written in Python.

00:51:18.660 --> 00:51:20.080
I just want this thing to work.

00:51:20.080 --> 00:51:23.100
I want the newest version of it and just kind of make it happen.

00:51:23.100 --> 00:51:23.400
Right.

00:51:23.400 --> 00:51:27.740
And but if we reverse that and we're talking to Python developers, as most people listening

00:51:27.740 --> 00:51:33.980
are, you can empower people to deliver their applications to end users in a way that is

00:51:33.980 --> 00:51:37.940
much, much, much simpler if they're not Python people, right?

00:51:37.940 --> 00:51:38.240
Yeah.

00:51:38.280 --> 00:51:42.120
If they can get PipX on their machine, then getting the rest of their stuff is basically

00:51:42.120 --> 00:51:42.680
done, right?

00:51:42.680 --> 00:51:43.560
That's a great point.

00:51:43.560 --> 00:51:43.800
Yeah.

00:51:43.800 --> 00:51:47.320
I mean, the distribution story gets a lot easier for your users.

00:51:47.320 --> 00:51:51.040
If you're a developer and you want to get this in people's hands, having them use PipX

00:51:51.040 --> 00:51:54.860
is going to cause them less headaches and it's going to cause you less headaches because it's

00:51:54.860 --> 00:51:57.780
going to be more predictable environment to install in.

00:51:57.780 --> 00:52:01.780
Because PipX kind of lives in the center of a few things.

00:52:01.780 --> 00:52:07.240
Like you have wheels, which are pre-built packages specific to your operating system.

00:52:07.800 --> 00:52:11.400
And you have pip and PipX and virtual environments.

00:52:11.400 --> 00:52:16.340
And PipX kind of marries them all together in a way where it takes the pre-built, doesn't

00:52:16.340 --> 00:52:17.740
have to rebuild it on the user's computer.

00:52:17.740 --> 00:52:19.360
It takes this pre-built thing that works.

00:52:19.360 --> 00:52:22.280
It puts it in a place that's not going to disturb anything.

00:52:22.280 --> 00:52:23.880
It's not going to get disturbed either.

00:52:23.880 --> 00:52:25.900
And then it makes it accessible to the end user.

00:52:25.900 --> 00:52:29.800
And they don't have to think about any of those pieces to get it on their computer.

00:52:29.800 --> 00:52:30.200
Yeah.

00:52:30.200 --> 00:52:34.900
So maybe one of the biggest takeaways is if you're trying to deliver Python applications

00:52:34.900 --> 00:52:37.300
to people, here's a really good option.

00:52:37.300 --> 00:52:41.100
If some kind of CLI starter is the way to go, right?

00:52:41.100 --> 00:52:44.580
I guess if you want, here's how you drag it over to your applications folder and put it in

00:52:44.580 --> 00:52:44.840
your doc.

00:52:44.840 --> 00:52:45.860
Maybe that's not the right thing.

00:52:45.860 --> 00:52:49.420
But you know, for a lot of the type of stuff people are building with Python, it's a great

00:52:49.420 --> 00:52:51.800
way to get it to end users and keep it up to date.

00:52:52.340 --> 00:52:55.020
One other thing I'll call out is pipx run.

00:52:55.020 --> 00:52:55.460
Yes.

00:52:55.460 --> 00:52:55.720
Yeah.

00:52:55.720 --> 00:52:57.420
We've talked about install the whole time.

00:52:57.420 --> 00:53:00.600
But yeah, pipx run is maybe even better for certain things.

00:53:00.600 --> 00:53:00.840
Yeah.

00:53:00.840 --> 00:53:05.020
So pipx run will make sure you have a recent version of the tool you're trying to use.

00:53:05.020 --> 00:53:08.100
So if you want to run some kind of a bootstrap program or some kind of like cookie cutter

00:53:08.100 --> 00:53:12.400
where you create a new project or something like that, then you'd want it to run with the

00:53:12.400 --> 00:53:13.380
recent version.

00:53:13.380 --> 00:53:16.060
pipx run will just kind of make it happen for you.

00:53:16.060 --> 00:53:16.280
Right.

00:53:16.280 --> 00:53:20.260
So one of your commands might be, well, first, you're going to set up a virtual environment

00:53:20.260 --> 00:53:22.780
and then you're going to pip install cookie cutter.

00:53:22.780 --> 00:53:24.800
Then you're going to run cookie cutter this thing.

00:53:24.800 --> 00:53:25.740
Right.

00:53:25.740 --> 00:53:26.120
Right.

00:53:26.120 --> 00:53:30.620
Well, maybe the step is if you already have pipx, assuming this is a thing that's accessible,

00:53:30.620 --> 00:53:34.200
pipx sort of install run cookie cutter and you give it that command.

00:53:34.200 --> 00:53:37.060
Nobody needs or wants cookie cutter after that.

00:53:37.060 --> 00:53:41.060
They just need cookie cutter to run the skeleton generator for their project.

00:53:41.060 --> 00:53:44.260
And then their project is kind of free from cookie cutter because you can't update your

00:53:44.260 --> 00:53:45.360
project afterwards anyway.

00:53:45.360 --> 00:53:45.640
Right.

00:53:45.640 --> 00:53:47.800
That's probably a good mental model to have.

00:53:47.800 --> 00:53:48.040
Yeah.

00:53:48.340 --> 00:53:50.480
And that's how the JavaScript world uses it.

00:53:50.480 --> 00:53:52.820
It's kind of like, it's one of the really popular ways.

00:53:52.820 --> 00:53:57.540
And you'll see the NPX, you know, create React app is a way to start React apps with,

00:53:57.540 --> 00:54:00.380
with the latest version of that cookie cutter type thing.

00:54:00.380 --> 00:54:04.900
And so I would love to see more adoption on, on that side in the Python world.

00:54:04.900 --> 00:54:05.500
Yeah, absolutely.

00:54:05.500 --> 00:54:10.400
Another one, I guess, let's just real quick, maybe give a shout out to this is the Node.js

00:54:10.400 --> 00:54:11.800
thing that just got added.

00:54:12.240 --> 00:54:19.340
Isn't there a way that just came out for installing Node.js as a dependency, not just the bindings?

00:54:19.340 --> 00:54:20.600
I feel like there just was.

00:54:20.600 --> 00:54:20.940
Yeah.

00:54:20.940 --> 00:54:22.240
I saw something about this.

00:54:22.240 --> 00:54:22.640
Yeah.

00:54:22.720 --> 00:54:26.960
Actually, I think we just covered it on Python bytes, but I wasn't the one who brought it up.

00:54:26.960 --> 00:54:27.940
So I don't totally remember.

00:54:27.940 --> 00:54:28.440
Let's see.

00:54:28.440 --> 00:54:28.960
There you go.

00:54:28.960 --> 00:54:29.820
Node.js dash bin.

00:54:29.820 --> 00:54:30.240
That's it.

00:54:30.240 --> 00:54:32.200
Gina Houska covered it.

00:54:32.200 --> 00:54:34.000
And yeah, there it is.

00:54:34.000 --> 00:54:35.160
Node.js dash bin.

00:54:35.360 --> 00:54:40.060
So if you've got something that needs to have the Node tools around or, or CLI stuff,

00:54:40.060 --> 00:54:42.840
you could, you could just pip install Node.js dash bin.

00:54:42.840 --> 00:54:45.940
So I guess you could also pip and X install Node.js dash bin.

00:54:45.940 --> 00:54:46.260
Yeah.

00:54:46.260 --> 00:54:49.900
Maybe if it's a, if it's an entry point, then for sure.

00:54:49.900 --> 00:54:50.140
Yeah.

00:54:50.140 --> 00:54:53.740
I haven't thought enough about it, so maybe it doesn't quite fit in there, but it's an interesting,

00:54:53.740 --> 00:54:54.780
interesting development.

00:54:54.780 --> 00:54:55.480
All right, Chad.

00:54:55.480 --> 00:54:58.580
Well, I think we're probably out of time for talking about pipX.

00:54:58.580 --> 00:55:01.300
Let's maybe wrap things up.

00:55:01.580 --> 00:55:05.900
Any final thoughts or anything you want to add to this before we get to the final two

00:55:05.900 --> 00:55:06.340
questions?

00:55:06.340 --> 00:55:06.820
No.

00:55:06.820 --> 00:55:10.180
Thanks for having me on and sharing some discussion on pipX.

00:55:10.180 --> 00:55:10.800
Yeah, absolutely.

00:55:10.800 --> 00:55:11.480
It's a great tool.

00:55:11.480 --> 00:55:12.180
All right.

00:55:12.180 --> 00:55:13.140
Final two questions.

00:55:13.140 --> 00:55:17.460
If you're going to write some Python code, if you're going to work on pipX or your terminal

00:55:17.460 --> 00:55:20.760
replicator or whatever you're doing, what editor are you using these days?

00:55:20.760 --> 00:55:21.620
I use VS Code.

00:55:21.620 --> 00:55:21.960
Yeah.

00:55:21.960 --> 00:55:24.460
It sounds like Meta is pretty standardized on that.

00:55:24.460 --> 00:55:24.840
Is that right?

00:55:24.840 --> 00:55:26.140
That's our company-wide editor.

00:55:26.140 --> 00:55:30.640
Do a lot of work on writing extensions for it and making it work for developers in Meta.

00:55:30.640 --> 00:55:30.900
Yeah.

00:55:30.900 --> 00:55:31.300
Cool.

00:55:31.300 --> 00:55:36.460
And then we've talked about a ton of PyPI packages, but one you want to give a particular

00:55:36.460 --> 00:55:37.000
shout out to?

00:55:37.000 --> 00:55:37.300
Yeah.

00:55:37.300 --> 00:55:40.620
So this one is not pipX installable, but I think it's super cool.

00:55:40.620 --> 00:55:41.800
MK docstrings.

00:55:41.800 --> 00:55:45.760
And this is a way to generate documentation from your code.

00:55:45.760 --> 00:55:47.420
I think it's similar to Sphinx.

00:55:47.420 --> 00:55:51.600
I haven't really used Sphinx too much, but I find MK docstring is really user-friendly.

00:55:51.600 --> 00:55:52.820
It's all marked down.

00:55:52.820 --> 00:55:58.040
And I think it's really like a good looking UI that it generates for you.

00:55:58.040 --> 00:56:00.800
I think it's really easy to use and it gives you a nice end result too.

00:56:00.860 --> 00:56:01.040
Cool.

00:56:01.040 --> 00:56:01.760
Fantastic.

00:56:01.760 --> 00:56:02.580
Good recommendation.

00:56:02.580 --> 00:56:03.260
All right.

00:56:03.260 --> 00:56:04.160
Final call to action.

00:56:04.160 --> 00:56:10.120
People want to play with PipX, develop Python apps that can be installed through PipX and

00:56:10.120 --> 00:56:10.500
so on.

00:56:10.500 --> 00:56:11.120
What do they do?

00:56:11.120 --> 00:56:11.820
How do they get started?

00:56:11.820 --> 00:56:13.940
How do they get started developing apps for PipX?

00:56:14.080 --> 00:56:21.960
So you can use any of those tools to get a piproject.toml file and have a publishable package and make

00:56:21.960 --> 00:56:24.760
sure you have a console script entry point.

00:56:24.760 --> 00:56:28.940
Really, all you have to do is have a console script entry point for your package and then

00:56:28.940 --> 00:56:31.140
PipX will take care of it for you.

00:56:31.140 --> 00:56:31.400
Yeah.

00:56:31.400 --> 00:56:33.520
It's worked with everything that I've tried it with.

00:56:33.520 --> 00:56:35.220
So it seems pretty solid.

00:56:35.220 --> 00:56:35.560
Great.

00:56:35.560 --> 00:56:35.860
Yeah.

00:56:35.920 --> 00:56:36.160
Awesome.

00:56:36.160 --> 00:56:36.720
All right.

00:56:36.720 --> 00:56:39.840
Well, thanks again for being here and for working on PipX.

00:56:39.840 --> 00:56:40.720
It's a great project.

00:56:42.320 --> 00:56:44.940
This has been another episode of Talk Python To Me.

00:56:44.940 --> 00:56:46.760
Thank you to our sponsors.

00:56:46.760 --> 00:56:48.380
Be sure to check out what they're offering.

00:56:48.380 --> 00:56:49.800
It really helps support the show.

00:56:49.800 --> 00:56:54.360
Mergify is an amazing tool to make you and your team way more productive with GitHub.

00:56:54.360 --> 00:56:56.900
It's all about leveling up your pull requests.

00:56:56.900 --> 00:57:02.520
With automatic merges, auto updates, PRQ prioritization, and backports, you'll tame your

00:57:02.520 --> 00:57:03.840
PRs once and for all.

00:57:04.320 --> 00:57:07.640
Get started at talkpython.fm/mergeify.

00:57:07.640 --> 00:57:12.560
Sign up for the Python at Scale conference to connect with your data science colleagues

00:57:12.560 --> 00:57:15.120
and learn about trends in the Python big data ecosystem.

00:57:15.120 --> 00:57:20.540
Share stories about implementing solutions and find out about innovations in our space.

00:57:20.540 --> 00:57:25.160
Visit talkpython.fm/python dash at dash scale.

00:57:25.160 --> 00:57:27.760
That's talkpython.fm/python at scale.

00:57:27.760 --> 00:57:31.640
And use code talkpython to get 15% off your ticket.

00:57:31.640 --> 00:57:33.560
Want to level up your Python?

00:57:33.560 --> 00:57:37.600
We have one of the largest catalogs of Python video courses over at Talk Python.

00:57:37.600 --> 00:57:42.780
Our content ranges from true beginners to deeply advanced topics like memory and async.

00:57:42.780 --> 00:57:45.440
And best of all, there's not a subscription in sight.

00:57:45.440 --> 00:57:48.360
Check it out for yourself at training.talkpython.fm.

00:57:48.360 --> 00:57:50.260
Be sure to subscribe to the show.

00:57:50.260 --> 00:57:53.040
Open your favorite podcast app and search for Python.

00:57:53.040 --> 00:57:54.340
We should be right at the top.

00:57:54.340 --> 00:57:59.520
You can also find the iTunes feed at /itunes, the Google Play feed at /play,

00:57:59.520 --> 00:58:03.720
and the direct RSS feed at /rss on talkpython.fm.

00:58:03.720 --> 00:58:07.140
We're live streaming most of our recordings these days.

00:58:07.140 --> 00:58:10.560
If you want to be part of the show and have your comments featured on the air,

00:58:10.560 --> 00:58:14.980
be sure to subscribe to our YouTube channel at talkpython.fm/youtube.

00:58:15.460 --> 00:58:16.820
This is your host, Michael Kennedy.

00:58:16.820 --> 00:58:18.120
Thanks so much for listening.

00:58:18.120 --> 00:58:19.280
I really appreciate it.

00:58:19.280 --> 00:58:21.200
Now get out there and write some Python code.

00:58:21.200 --> 00:58:41.940
I'll see you next time.