Transcript #376: Every dunder method in a Python Lockbox
Return to episode page view on github00:00 - Hello and welcome to Python Bytes where we deliver Python news and headlines
00:04 directly to your earbuds.
00:05 This is episode 376, recorded March 26th, 2024.
00:10 I'm Michael Kennedy.
00:12 - And I am Brian Okken.
00:13 - And this episode is brought to you all by Scout APM.
00:18 I'll tell you more about them later.
00:19 We appreciate the support.
00:21 Connect with all of us, Brian, me, and the podcast over on fosstodon.org
00:27 or mastodon more broadly.
00:28 Links at the top of your podcast player show notes.
00:31 Join us live if you like.
00:33 We typically do this on Tuesdays at 10 a.m. Pacific time.
00:37 Why is time so hard, Brian?
00:39 Why is it so hard?
00:40 (laughing)
00:41 Just go to pythonbytes.fm/live to be part of the audience.
00:44 See the older shows.
00:45 All the older ones are there and they are typically the same thing we ship.
00:49 We don't really overly edit it or anything other than we do clean them up, tighten them up a little.
00:54 So if you like the ones with bloopers included, you can check that out there.
00:59 I wonder if I was a search engine and I was trying to find bloopers, would there be a way to not let me find them?
01:05 What do you think, Brian?
01:06 - Well, I hope.
01:07 We're trying.
01:08 Actually, yeah, I was thinking about this.
01:11 I kind of think that the AI stuff should have the best content out there to read from,
01:17 but companies are making money from that and I'm not making, like my blog posts,
01:22 I'm not getting any money from that.
01:24 If I care about that, how do I stop them?
01:27 So Jeff Triplett is thinking about that too.
01:30 So he wrote up a blog post called onrobots.txt.
01:34 So the idea was robots.txt is to stop like search engines and stuff like that.
01:40 But I don't actually wanna stop search engines.
01:43 I want search engines to find my stuff.
01:45 I just don't want the AI stuff.
01:47 So Jeff's been thinking about this.
01:50 I've been thinking about it also.
01:52 So he collected a few links around this.
01:54 And one of the things here is I spent a lot of time thinking about robots.txt.
01:59 In theory, it helps control what search engines and AI scrapers are allowed to visit,
02:06 but I need more confidence in its effectiveness in this post AI apocalyptic world.
02:12 I love that.
02:14 Anyway, so there's a bunch of, these cropping up.
02:19 There's a lot of new stuff going on.
02:21 So Jeff has decided to use Django robots, but let's look at some of the links that he included.
02:27 So thanks, Jeff.
02:28 So there's block the bots that feed AI models by scraping your website.
02:35 So there's an article by Neil Clark that has an example robots.txt.
02:42 And the idea is almost all of these different AI bots, you've got to block them individually.
02:49 So you got to set up these different rules there.
02:52 So it'd be good to keep track of some of these places.
02:55 Maybe, hopefully he keeps this up, but there's also an article, go ahead and block web crawlers,
03:01 discussing why you might.
03:04 And then a dark visitors, I think this is gonna be one to keep track of that it might, hopefully they keep it up.
03:11 But there's a big list of known AI bots to block.
03:16 And so maybe keeping up on this might be a good idea if you care about it.
03:21 The Jeff's note was that he added it to the website Django.
03:26 There's a couple of different articles about adding robots.txt to a Django website.
03:31 There's one by Will Vincent and one by Adam Johnson, both biggies in the Django community.
03:38 So we'll link to those.
03:40 And like I said at the beginning, Jeff said he went with a plugin called Django robots
03:46 to populate that and control it through his admin interface.
03:50 So there's a lot there.
03:51 One of the things not included is my blog is run by Hugo, run with Hugo.
03:57 Anyway, so we're also link, I'm gonna also link to a how to add robots.txt
04:02 to your Hugo site, if you wanna do that.
04:05 - Oh, nice.
04:05 I don't think I've messed with my Hugo robots.txt.
04:08 - I have not yet, but I think I might.
04:10 And I guess I wanted to ask some questions before we moved on.
04:15 One is as a community, I think that there should be an easier way to say,
04:18 don't scrape this if you're an AI, other than listing each one, we should have a standard for that.
04:24 But what do you think of this?
04:25 Should, as a content creator, should I care about that?
04:29 Should I, I mean, would you?
04:31 - You know, it's such an interesting question.
04:33 I think it's pretty fraught, right?
04:36 On one hand, I don't wanna feed the AIs either, necessarily.
04:39 I think that it's super awesome that you could go to ChatGPT and say things like,
04:43 you know, what does Python, what does Talk Python think about this?
04:47 Or, you know, write me a summary of this in the style of a Talk Python interview.
04:53 Like that's, is that harming me?
04:54 No, probably not.
04:56 Is it creating some cool aspect, like halo of the content creation side?
05:01 The fact that ChatGPT knows about those kinds of things, that's kind of cool.
05:05 I kind of on the plus side.
05:07 I don't know.
05:07 I mean, we have--
05:08 - For you, a lot of your content is, I mean, your open content is open, but you're a lot of your content's behind a paywall
05:15 with a Talk Python training.
05:16 If somebody were to throw all of those trainings into a AI model.
05:21 - Yeah, that would be different, right?
05:22 - Yeah, so.
05:23 - Yeah, I mean, I certainly have a no robot, no index settings on certain aspects of the site there.
05:31 It's also behind accounts and logins.
05:33 So somebody would have to be kind of maliciously doing that, which I imagine that's probably already been done,
05:39 but it is, yeah, that's a different kind of deal.
05:42 You know, I mean, maybe the biggest case of this is the link tax that Australia, Spain, and Canada
05:49 all tried to put onto the search engines and Facebook and social platforms, right?
05:56 Like, I'm getting this right.
05:58 I think it's Canada.
06:00 They all blur together, but you know, Canada is the most recent one of these
06:03 for sure, and they passed a law saying, well, if one of these big American companies
06:09 wants to send traffic, we talked about this, want to send traffic to one of our news sites,
06:15 then they have to pay them for the right of doing that.
06:18 Maybe it is.
06:19 - Well, it's like kind of like Google News or something.
06:20 - I think it's Australia.
06:22 I think it was Facebook.
06:24 I'm sorry, folks, if I'm like crossing over companies.
06:26 I think Facebook just declined to renew their agreements with the Australian newspapers and saying, you know what?
06:34 We're not gonna send any more traffic and we're not gonna allow any links to you whatsoever.
06:37 And that's gonna be a negative for those news companies as well, right?
06:40 The fact that, I mean, they kind of had the shady deal where Facebook would summarize a little bit.
06:46 So like, maybe you don't need to click the link to go to it, but now they're gonna have no links whatsoever
06:50 and they're not gonna be in a better place because of that either.
06:52 So it's really this, you know, damned if you do, damned if you don't type of thing
06:57 is what I'm trying to get at.
06:58 And like the biggest example of that playing out is with these news organizations
07:02 and the social media and search engines.
07:04 - Yeah, yeah, except for, I don't know, the AIs, I don't think they're linking back
07:08 to the original content.
07:09 - No, you got a good point there that at least search engines and stuff and social media,
07:14 they credit you, they send traffic to you.
07:17 Whereas we're gonna have to reckon with the AI stuff in some way, because it just says, here's the answer.
07:22 And how did it get it?
07:23 I don't know, maybe that's your answer repurposed.
07:26 Who knows, right?
07:26 But you get zero credit for that.
07:28 - Right, anyway. - That's a good point.
07:30 We're not probably gonna solve that today.
07:31 Maybe next week.
07:32 Wanna come back and solve it next week?
07:33 - Yeah, sure.
07:34 - Well, if you were to be automating requests to these websites, what is the most popular way to do that?
07:41 Well, it's right in the name, requests.
07:43 And requests by Kenneth Wrights has been migrated over.
07:48 It's like so popular, it's migrated over to the PSF itself, right?
07:53 I don't remember where it said, yeah, it actually still has it says, request is one of the most downloaded Python packages today,
07:58 pulling in around 30 million downloads a week.
08:02 - Wow.
08:03 - Used by over a million repositories on GitHub.
08:06 You can probably trust it.
08:08 But there are things that it doesn't do, things that it's not necessarily wanting
08:13 to like lead the bleeding edge on.
08:15 I mean, just with that amount of usage, you gotta be careful, right?
08:18 So I'm gonna point you at a fork of requests, nyquests, I'm not sure, hopefully,
08:23 niquests instead of request, ni.
08:26 I'm not sure I'm getting the reference here.
08:29 There's probably some cleverness to the name and I'm sorry for not getting it there, Java.
08:33 So anyway, it says requests, but with HTTP/3, HTTP/2, multiplexed connections.
08:39 So if you're downloading, you could create multiple connections to the server
08:41 and download multiple streams.
08:42 I think that's what that means.
08:44 System certificate authorities, certificate revocation.
08:47 So if you wanna control like what certificates you trust, maybe there's some that have been known
08:52 to be doing bad things, or you just don't wanna allow access to certain parts of the internet,
08:57 you can revoke those certificates and their authorities and so on.
09:00 DNS over HTTPS, TLS and QUIC.
09:04 So if you wanna have better control over how DNS works, if you wanna escape what DNS is happening on your server
09:11 and explicitly control it from your application, you can do that securely, which is awesome.
09:15 Has async and await, DNS security, and there's much pain removed, which is cool.
09:20 So anyway, this is a pretty interesting thing.
09:23 If you know requests, you basically know this, except for that it also has async versions,
09:27 which is kinda cool.
09:28 But yeah, it's got like a great long feature list and why they did this.
09:33 Yeah, so worth looking at, I think.
09:36 - Yeah, definitely.
09:37 That's pretty cool.
09:38 - Yeah, but a lot of those things like the certificate stuff or DNS over HTTPS or DNS security are areas
09:43 you're like, if we really need that, as most people probably don't, but if you do, this looks pretty cool.
09:48 - Yeah, I think it's, I think my guess is that the name is based on the Knights of Nii,
09:53 so it'd be NiiQuests, I think.
09:55 - NiiQuests, all right, let's go with it, NiiQuests.
09:57 - Yeah, because of course we have those themes, right?
09:59 - Yeah, yeah.
10:00 - Of course we do.
10:02 Now, Brian, we do have a sponsor for this episode, right?
10:06 - Yay. - Yay.
10:07 Let me tell you real quick about ScoutAPM.
10:11 They're big supporters of Python Bytes, so we appreciate that very much.
10:14 So if you are tired of spending hours trying to find the root cause of issues
10:19 impacting your performance, then you owe it to yourself to check out ScoutAPM.
10:24 They're a leading Python application performance monitoring tool, APM, that helps you identify and solve
10:30 performance abnormalities faster and easier.
10:33 ScoutAPM ties bottlenecks such as memory leaks, slow database queries, background jobs,
10:38 and the dreaded N+1 queries that you can end up if you do lazy loading in your ORM,
10:44 and then you say, "Oh no, why is it so slow?
10:46 "Why are you doing 200 database queries "for what should be one?" So you can find out things like that.
10:50 And it links it back directly to source code, so you can spend less time in the debugger
10:54 and peeling logs and just finding the problems and moving on.
10:58 And you'll love it because it's built for developers by developers.
11:01 It makes it easy to get set up.
11:03 Seriously, you can do it in less than four minutes, so that's awesome.
11:06 And the best part is the pricing is straightforward.
11:10 You only pay for the data that you use with no hidden overage fees or per seat pricing.
11:15 And I just learned this, Brian, they also have, they provide the pro version
11:20 for free to all open source projects.
11:22 So if you're an open source maintainer and you want to have Scout APM for that project,
11:27 just shoot them a message or something on their pricing page about that.
11:30 So you can start your free trial and get instant insights today.
11:34 Visit pythonbytes.fm/scout.
11:36 The link is in your podcast player show notes as well.
11:39 And please use that link.
11:40 Don't just search for them because otherwise, they don't think you came from us.
11:44 And then they'd stop supporting the show.
11:45 So please use our link, pythonbytes.fm/scout.
11:48 Check them out.
11:49 It really supports the show.
11:51 Indeed, indeed.
11:52 Thank you, Brian.
11:53 Yeah, let's talk about--
11:55 Underscore has some funky meanings in Python.
11:58 It's kind of fun.
11:58 We love the underscore.
12:00 Yeah.
12:01 Like I'm gonna get a new keyboard, like on my keyboard here, it has two independent buttons for the space key.
12:06 I'm gonna make this one just the underscore.
12:07 (laughing)
12:10 Okay, sure, you can do that.
12:13 And you'll probably need it--
12:14 What could I do with it?
12:15 You could, because of all of the dunder methods, we have so many underscores
12:20 that we called two_dunders in Python.
12:25 So, and what are all these dunder methods for?
12:28 So Trey Hunter has actually put together this really cool resource, every dunder method in Python.
12:36 And actually, I mean, I thought I knew quite a few, and I use probably repper and str, probably the most,
12:44 to make sure that my objects are representable or convertible to strings.
12:50 But there's quite a few more.
12:52 And so he goes through, like here's our essentials for a repper and, oh, he calls equality essential,
13:00 but I don't really, I guess maybe I don't make my own custom data types as often as maybe I should.
13:06 But there's the equal, EQ, that does equality, and then repper that converts to rep.
13:13 And it's also used with str if you didn't have a str method, but you can have those be separate.
13:19 So the other one that's common is dunder init for how you initialize classes,
13:24 which, to be honest, I use probably adders and data classes more than custom data classes.
13:33 So I don't really write that myself a lot, but I often use it in initializing my,
13:39 another class if I derive from something else.
13:41 Anyway, moving on, there's tons.
13:44 He's got equality and hashability.
13:47 Hashability is important if you're creating an object that should be hashable, that way you can create,
13:55 why do you care about that?
13:55 You care about hashability because that means your objects can be used, if they're hashable, they can be used for,
14:02 I think there's some other rules too, but you can use them for keys to dictionaries.
14:06 So, and there's tons of dictionaries in Python.
14:08 So we've got- - Maybe also sets.
14:10 I'm not sure, I can't remember about sets.
14:12 - Maybe. - Maybe.
14:13 - Yeah, probably, yeah.
14:15 But you also need to equal, I think there's less than you need also.
14:19 Anyway, there's orderability, so you've got less than or greater than and all that.
14:24 Type conversions and formatting, tons around that.
14:28 - You don't think about type conversions that much, right?
14:30 Because you don't think about Sting and all that stuff in Python as much.
14:34 - Right, but it is kind of cool.
14:35 I didn't know that, I guess I knew you could do this, but I kind of forgot that you can,
14:40 so if you say like int of something or bool of something, if that makes sense for your data type,
14:48 you can write your own dunder method so that people can just use the built-in type conversion,
14:55 which is pretty cool.
14:56 I didn't know about this format thing, so that you can use the f-strings appropriately
15:03 if you've got the format.
15:05 - I think you can pass modifiers from the S string.
15:07 So like with a floating point number, you can say like- - Oh, it's for the modifier.
15:11 - Colon, comma, point two F, and it'll be like comma separated, two decimal.
15:17 I think you can take your own format specifier there.
15:20 I think that's what that's for.
15:21 - Okay, I'll have to research that a little bit more.
15:23 Anyway, the dunder methods around context managers, which is actually kind of a funny thing.
15:30 I think that I've read a lot of tutorials around context managers, and sometimes they like try to tell you
15:36 how to build one up from scratch.
15:38 Now, I've never built one up from scratch.
15:40 I always use some of the wrappers and stuff to do context managers.
15:45 Anyway, containers and collections, if you're gonna do a container that you want length to work with or to iterate through,
15:54 you need some dunder methods for that.
15:56 Callability is one I've used frequently.
16:00 You can create an object that's callable if your class has a call method,
16:07 which is kind of fun to make callable objects.
16:11 A bunch of arithmetic operators so you can overload things.
16:14 In place, built-in function, built-in math functions, attribute access, all sorts of dunder methods for you.
16:20 So anyway, if you're thinking of overloading a class so that it can deal with different built-in operators,
16:29 check out Trey's article.
16:30 - Yeah, that's pretty nuts.
16:31 Actually, I kind of am coming away from this with the same feeling.
16:35 It's like, I think I knew these.
16:36 I was like, actually, no, there's more stuff.
16:38 There's more there to go.
16:39 - Yeah, there's a lot.
16:41 I like the orderability though.
16:43 It's 'cause I often, at the very least, I wanna be able to sort things.
16:47 - Yeah, yeah, indeed.
16:49 Sorting is good.
16:50 The one that I think is news to me, maybe the casting ones, but also the string formatting one.
16:56 Like you could have a user object that you could say like colon E for their email.
17:01 I mean, not necessarily would do that exactly, but just weird, right?
17:04 - Yeah, I'll have to play with that.
17:05 - Yeah, all right, let's talk about this next one, a lockbox.
17:08 I don't think this is Python exactly.
17:11 Oh, wait, I take it back.
17:12 It is Python, 100%.
17:13 But also, even if it weren't, it's the kind of thing that you would use as a Python person,
17:19 not necessarily make it part of your app.
17:21 So this takes a bit of, it takes a moment to get your head around.
17:25 So lockbox is a forward proxy for making third-party API calls.
17:30 And you're like, okay, keep talking.
17:33 Maybe it'll all make sense eventually.
17:35 So here's the deal.
17:36 If you're gonna integrate with some third-party thing, think Zapier, if this, then that, et cetera, et cetera.
17:44 And those things are making API calls on your behalf.
17:48 You have to give them the API calls for the destination thing they're integrating with.
17:54 So the example they give is if you wanna do a Zapier thing over to Slack or Jira or whatever,
18:00 you give Zapier your Slack API key or your Jira API key, which may be fine.
18:07 I mean, Zapier is certainly a trustworthy company.
18:09 I've had the CEO on the Talk Python a few times.
18:12 He's great.
18:13 But just on principle, you might not wanna do that.
18:15 You know what I mean?
18:16 - Yeah.
18:17 - So that's what this thing is for.
18:19 So instead of giving that third-party, like Zapier, if this, then that, your tokens,
18:24 what you can do is you can set up this lockbox thing, and it's like an intermediary for this whole process.
18:30 So you can register an app in your lockbox, and it gets its own just-for-this-one-purpose API key.
18:37 You give that to Zapier.
18:39 So Zapier calls lockbox, lockbox calls Slack, or lockbox calls Jira or whatever.
18:44 And it has a couple of advantages.
18:47 So you can do things like you can audit what actual traffic is being done.
18:53 So you can see exactly what, let's just keep with Zapier, what Zapier is doing on your behalf,
18:58 exactly what data is passed.
18:59 And if something's going wrong, you could see that.
19:01 It's still playing.
19:02 - If Zapier's charging you for too many zaps, you can say, "I didn't use this many."
19:06 - Exactly.
19:07 Here's how many zaps exactly you used.
19:09 Yeah, some of these are plans.
19:11 So you should be able to restrict access to external APIs in a more fine-grained manner.
19:16 You know.
19:17 - Ooh, rate limiting.
19:18 - Yeah, rate limiting on third-party API calls.
19:20 But the primary purpose of it is that the API keys are not exposed to anyone else.
19:25 They just live in this lockbox thing that you control.
19:28 And then you can, of course, throw them away.
19:31 Drawbacks are, well, you gotta run your lockbox.
19:33 (laughing)
19:34 Basically.
19:35 And so on.
19:36 But yeah, it's pip install lockbox-proxy, and you set the sucker up, and off it goes.
19:41 I think it's pretty cool.
19:42 - Yeah, yeah, interesting.
19:43 Especially, even if I didn't use this all the time, to be able to add it later if I needed to,
19:49 to intercept that, and especially for some monitoring purposes.
19:55 - Yeah, it's an interesting idea.
19:57 - Yeah, Andrew out in the audience says, "Not that it gets sappier," but that kind of feels like an indication
20:01 that maybe it isn't the type of thing you should be handing off to third parties.
20:04 I may agree with you, although I think in practice, a lot of people pass their keys all over the place
20:10 to get stuff done, you know?
20:12 Especially the less developer-y.
20:13 The less developer-y you are, the more you're like, just click these things together and do it for me.
20:18 Yeah.
20:19 - What could go wrong?
20:20 (laughing)
20:22 - YOLO, come on.
20:23 - Password's the letter A, I don't see any problem here.
20:25 This is way more secure than that.
20:27 - Good thing we made all passwords password.
20:29 - Exactly.
20:30 That way I never forget it.
20:30 It just says, "What's your password?" And I'm like, "Well, you gave me the hint right there."
20:34 Perfect.
20:34 (laughing)
20:36 As our items, our main items, what else you got there?
20:39 - I got a couple extra.
20:40 Since I covered Django a little bit earlier, I wanted to, I ran across Adam Johnson's
20:47 Django Join the Community on Mastodon.
20:49 I'm also working with Django a lot lately.
20:51 So having, trying to follow some of the Django people on Mastodon is good.
20:56 So he's got a good resource for people that wanna, if you're a Django person
20:59 and you wanna get started on Mastodon, there's some good people to follow,
21:03 some projects, official accounts around Django, and reminders to do a welcome post,
21:12 which I still have forgotten to do.
21:14 So sorry, people out there that don't know who I am.
21:17 Anyway, yeah, the introductory post is a good idea.
21:20 - And to hit and throw it.
21:21 So yeah, that, the other one extra sent, got sent in just this morning from Ken Van Wyk.
21:29 And it's a website called unmaintained.tech.
21:34 And essentially the idea is there's a badge and there's some description.
21:40 So basically if you wanna, if you have some open source stuff that you're just kinda done with
21:44 and nobody wants to take it over, you can just link to this to tell people
21:48 that you're not intending to maintain it.
21:51 People can still use it as a reference and read it, but no promises as to whether it's gonna work
21:55 'cause I'm done.
21:57 So interesting.
21:58 - Yeah, some things are done.
21:59 They're just done.
22:00 - Yeah, some things, and it's okay.
22:02 So you don't have to take them down.
22:03 Just tell people that you're not working with it anymore.
22:06 - Interesting.
22:07 Wasn't there a thing with GitHub where they were going to either take down
22:10 or charge very, very briefly for things that had no activity over a two year period
22:16 or something like that?
22:17 And they quickly rolled it back 'cause people were like, "Stuff can be done.
22:19 "Don't do that." - Okay, yeah, I think that was pre-Microsoft takeover.
22:23 - Yeah, that might have, you know what I think it probably was when they were like, "How are we gonna pay for this stuff?
22:27 "We need to start getting rid of some of the storage "of things that were just abandoned."
22:33 - And now they don't wanna do that 'cause there's all that AI meat in there to eat.
22:38 So anyway.
22:39 - That's right.
22:40 Well, well, speaking of takeovers, US sues Apple for illegal monopoly over smartphones,
22:46 says The Verge.
22:47 Now, I think the monopoly angle is a little bit of interesting here.
22:52 I had some conversations on Mastodon.
22:54 People are like, "Oh, they only have 20% of the market." In the US, they have over 60%, 68%, 60%,
23:01 something like that.
23:02 But I think the real problem is there's nowhere else to go.
23:05 Where do you go?
23:06 You go to one, there's literally one other option in the entire world.
23:09 I mean, I know technically there's like some Kickstarter that somebody could have like 100 other phones,
23:14 but in practice, as an adult, you need a smartphone to live these days, to function in society.
23:20 Like, well, you get this app to do this thing.
23:22 Like, well, how do I get it on my phone?
23:24 I have to hit the get C.
23:25 I press number one three times.
23:27 I go, "Hey, you can't do this part of the world.
23:29 "You're done." And I think Apple, I think it's, I don't know.
23:32 It's a little bit, a little bit of a silly lawsuit in some senses that people don't really,
23:39 the people writing the lawsuit seem to be not very connected technically
23:43 or deeply understand the problems here.
23:46 I think there's some really legitimate causes and I'm here for this.
23:49 I hope this makes a change because Apple is just such a bully.
23:54 I have had such insanely bad experiences working with them, getting apps in the app store,
23:59 which is crazy because you're like, I spent, me and Lauren spent months writing the latest Talk Python app
24:05 to just try to make the iPhone a little bit better, to make people who wanna do our stuff
24:09 enjoy doing it more on the iPhone.
24:10 And they're like, "Nope, we're rejecting that.
24:13 "And we have these rules.
24:14 "We need more money from you, "even though you're already paying us $100 a month
24:17 "and making the platform better." For example, I'm sure people think I'm cranky about this,
24:22 but I just wanna give a little background for people who haven't heard me rant about this.
24:26 We submitted it and they said, "Well, it doesn't have in-app purchases."
24:29 I said, "That's okay.
24:30 "I don't really want to sell anything through here.
24:32 "My main, it's not like people are coming to the app "and then they're becoming."
24:37 This is for people who are already customers of mine, already taking courses.
24:40 I just want them to be able to do that better.
24:42 No, apps rejected.
24:44 - Interesting.
24:45 - But you have this clause, 4.3.1, called Reader Apps that says if you bought material on the web,
24:50 like a book, audio, or video, you're allowed to consume that on the phone
24:54 and there's no in-app purchase required.
24:56 We don't care.
24:57 You don't count as that.
24:58 You're something else.
24:59 - You're not as big as Amazon, so you can't.
25:01 - Yeah, you don't get any special treatment.
25:02 So what you're gonna do is you're gonna spend two weeks for two people, full-time developing the in-app purchase
25:09 so that you can sell a couple of courses a month, even though it costs you thousands and thousands of dollars
25:13 to do it, or you can't be part of this.
25:15 The majority of your customers in the United States can't have your app, right?
25:19 And just that we're going to grind it out on these little companies to get a couple hundred bucks
25:26 and cost them tons of effort.
25:28 Now it's harder to maintain the app.
25:30 If I add a new course, I've gotta do more work and release new versions of the app just because of that.
25:35 It gets incredibly frustrating how they're just doing this--
25:39 - Does this even talk about that?
25:40 Because when I read this, I was thinking, I was thinking, I mean, I've felt this.
25:45 I love Apple.
25:46 I've got two or three computers.
25:49 I got the phone watch, but I've thought, hey, I wanna try a different watch.
25:54 Oh, it doesn't work with anything else.
25:56 I can't really.
25:58 So I feel the customer lock-in part, I'm not really happy about that.
26:03 But the other part that I, is that part, and I don't know if the lawsuit covers that,
26:07 is this whole 30% tax that they wanna--
26:09 - I think, yeah, I think it does cover the lack of ability of using other--
26:15 - Payment processors and stuff.
26:16 - Other payment processing, other delivery methods, all that kind of stuff.
26:19 Like another really creepy thing that Apple's doing is they're gonna allow only the big companies
26:25 to install apps over the web directly and use their own payment processor directly,
26:31 but only in Europe and only for companies that have had over a million downloads previously.
26:36 So there's no way to get started ever.
26:38 - Yeah, you have to be--
26:39 - If you created a popular app now, you have to have done it last year, but if you don't have it yet, how do you?
26:43 But then they're charging 27% for their fee for delivering your app, but if they're not doing the processing
26:51 and it doesn't go over their servers, what is the 27% for again?
26:54 It's just-- - Just to give them money.
26:56 - It's bad.
26:57 So anyway, there's a couple of videos from this guy called Theo Rance.
27:01 They're actually quite good, both the lawsuit and another one.
27:08 And then also the day after, this was yesterday, Brian, the EU rejects Apple's European App Store changes.
27:15 This is the one I just talked about with some of those weird fees and other stuff, right?
27:19 Company could be fined 10% of global revenue, and 20% if they don't fix it after that.
27:24 And so it's just one thing after another coming down on this company that's just,
27:29 they make 85% of their money off in-app purchases from games.
27:32 They should just make the rest of it free and not even make it a hassle for people.
27:35 You know what I mean?
27:36 It's just like, why are they doing all of these things to just for that last little bit of stockholder value?
27:43 - Yeah, but even the games part, why are they taking 30% cut?
27:49 It's just, it's too high.
27:51 - Yeah, and honestly, I don't even mind the 30%.
27:55 What I mind is that they say that these kinds of apps can't exist or your app has to be completely rewritten
28:02 so that you do start selling even if you don't want to, or we won't accept it, right?
28:07 If I wanted to sell it, I'd be like, all right, look, 30%, it's rough, but it's digital products, I'll live.
28:13 But the fact they're like, you can't even not, you can't even choose to not sell stuff.
28:18 We're gonna make you sell stuff.
28:19 And that kind of stuff is just, that's where I think like, okay, this is over the line.
28:25 When it's that high of a percentage and you treat people like that, it's bad news for you.
28:30 That said, I have like five Apple devices just in this room.
28:33 So I'm very conflicted.
28:35 - Yeah, definitely.
28:36 - Yeah, yeah.
28:38 Okay, I have a few more things, they're quicker, I promise.
28:41 The PSF is looking to hire somebody, which is awesome, for PyPI support specialists.
28:46 How cool is that?
28:47 - That is cool, yeah, right about that.
28:49 - It's kind of nuts that all of PyPI, with, you think of the infrastructure,
28:53 the amount of bandwidth flowing through that thing and how much traffic there is in that website
28:57 that there's nobody whose job is to keep it running.
28:59 It's kind of nuts, but yeah.
29:01 So a PyPI support specialist is a job, a person that are looking to join the team.
29:06 So if you're interested in that, check it out, that'd be really cool.
29:10 Let's see, why is this looking like it looks here?
29:13 There we go.
29:14 We're gonna do, this needs to go away.
29:16 We're gonna do a VS Code, ask me anything with Brian Clark, not Brian, I can, Brian Clark and Cecil Phillip
29:23 and me and 21 days.
29:24 So if you wanna be part of that YouTube only event, then the link is in the show notes, check that out.
29:30 You can submit questions ahead of time.
29:32 So if you've got one, please, please do that.
29:34 In the lastly, a quick conference thing, here Thomas said, hey, just let you all know,
29:40 PyData Eindhoven 2024 will take place on the 11th of July and there's a call for proposals open.
29:47 So if you're interested in that, check it out.
29:49 - Okay, I've got one extra, extra thing.
29:52 - An extra, you have an extra, extra.
29:53 - Extra, extra.
29:54 And partly it's an apology.
29:56 So I've been doing the emails for the show, but I kind of forgot last week.
30:00 So I'll get the, this week you'll get two or we'll combine them into one or something like that.
30:06 But how do you get the email?
30:07 So if you go to Python Bytes and click on friends, you can fill out your name there
30:13 and get the show notes into your inbox if you want.
30:17 So, plus we'll sell it and make lots of money.
30:21 No, we don't sell your email or anything.
30:23 We don't sell it.
30:25 We don't even transfer it to other locations.
30:28 It's pretty excellent.
30:28 We've got some good infrastructure set up.
30:31 - I don't even look at them.
30:32 So.
30:34 - Yeah, exactly.
30:34 Only if something goes wrong, do I bother looking.
30:36 All right, well, let's wrap this up with a joke.
30:40 - Okay.
30:41 - So, Windows, some of these different operating systems and ecosystems have more certifications than others.
30:46 Like there's the network certifications for network engineers and Windows has got a lot, right?
30:52 So there's the Windows certified technician.
30:54 (laughs)
30:56 It's a game, it's like a giant arcade that has the windows on it.
31:00 It says, "Can you make it work?" Can you make it work?
31:04 "Battle your way through driver updates and registry edits on your quest
31:08 to defeat the dreaded blue screen of death." And there's like a super excited guy with a toolbox
31:13 ready to take on the Windows blue screen of death and hack the registry.
31:17 Can you be a Windows certified engineer?
31:20 It's the hottest game of Dave and Busters this year.
31:24 - Okay, but look at the controls.
31:26 You gotta be a Windows engineer with a track pad and three buttons.
31:33 - Yeah, but look at the labels on the buttons.
31:35 There's four buttons, you missed an important one.
31:36 There's a big giant roller ball, like track pad.
31:41 What is that?
31:42 Track ball.
31:43 - Track ball.
31:43 - Then there's three buttons, Control + Alt + Delete.
31:46 But down at the bottom, there's another one that says reboot.
31:49 It's like the bonus button.
31:51 - Yeah, that's good.
31:53 - I'll make this the chapter art.
31:55 This is good.
31:56 - Yeah, awesome.
31:58 - All right, well, always fun.
31:59 Thanks for being here, Brian.
32:00 - Thank you.
32:01 - Yeah, thanks to everyone for listening.
32:02 Catch y'all later.