Brought to you by Talk Python Courses and Six Feet Up consulting

#507: Something about security

Published Tue, Dec 1, 2026, recorded Tue, Dec 1, 2026
0:00
00:37:49
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

Michael #1: AI agents model CPython in Lean and produce 415 bug reports

David Andrews and Chao Zhang used AI agents to translate CPython 3.15.2 functions into Lean and check proofs about their behavior. Their November 13 post reports 4,067 accepted functions, 614,384 lines of Lean, and 415 bug reports, including about 55 involving crashes or memory corruption.

  • Coverage is 14.3% of functions worth checking, not a fully verified interpreter. Multithreading is out of scope.
  • Each model faces at least 50,000 differential test inputs, proofs, and review by a second agent before acceptance.
  • A valid Lean proof can still describe the wrong model. Early reviews rejected weak properties that even broken functions could satisfy.
  • 415 reports does not mean 415 newly confirmed upstream bugs: some were already known, and remaining reports are being submitted.
  • I asked what involvement the core team and CPython had with Project Glasswing. I think it was zero. It should be far more involved. Open someone reaches out to OSS Scanner.

Calvin #2: Amazon Athena powered by DuckDB, now available in preview

  • Remember when AWS bought DuckLabs? Here's what they built.
  • Announced Dec 1, 2026 at re:Invent and in preview in 5 regions: us-east-1, us-east-2, us-west-2, eu-west-1 and ap-northeast-1.
  • Athena's serverless query service now runs on DuckDB and splits a single query across many workers when the data outgrows one machine.
  • AWS claims queries are up to 2x faster and up to 50% cheaper than Athena engine v3 on large datasets.
  • Queries use DuckDB's SQL dialect and run against your existing Glue Data Catalog tables, so there's nothing to redefine and no data to move.
  • Results can come back as Apache Arrow through a new streaming API and an ADBC driver, landing in data science tools with no conversion step.
  • A new open-source Athena extension for DuckDB lets you prototype a query in local DuckDB and then run the same SQL on Athena at scale.
  • Supports Apache Iceberg v3 and Parquet tables. To turn it on, create a workgroup or switch an existing one to DuckDB.
  • Related: a separate Redshift extension for DuckDB (Apache 2.0, DuckDB v2.0.1) lets you query Redshift from a local DuckDB session and join the results with local Parquet or CSV files.

Michael #3: Citry

Citry's first stable release puts HTML templates, CSS, browser behavior and Python event handlers in one component class. Built by django-components maintainer Juro Oravec, it aims to give Python web developers Vue-style tooling without maintaining a separate frontend project. Clicks can call Python and replace the component's HTML.

  • The editor catches template typos and wrong component inputs before someone opens the page. Run the checks in CI with citry check; useful feedback for humans and coding agents alike.
  • Uses Vue for browser behavior, rather than eliminating JavaScript. Works with Django, FastAPI, Flask and other ASGI/WSGI apps.
  • Author's error benchmark reports 56 of 61 applicable mistakes before runtime, including nine warnings. Four go undetected, including a secret sent to the browser.
  • Author's speed test: 257 ms until usable for 1,400 entries on the second server load, empty browser cache, local M4 Mac/Chromium. Single-measurement charts, not a general speed ranking.
  • 1.x promises SemVer compatibility; citry-ui remains pre-1.0. django-components enters maintenance mode. Try the browser playground at https://citry.dev/playground/.

Calvin #4: PSF announces a Security Roadmap

  • The PSF's security plan for the coming year (posted Nov 30, 2026) has four focus areas: PyPI malware remediation, "compromise resilience" for PyPI and python.org, more capacity for vulnerability advisories, and post-quantum crypto readiness. Alpha-Omega and Anthropic fund the security staff.
  • Malware: PyPI will lean more on automatic quarantine. Today it fires only when several trusted reporters flag the same project. It handled the Telnyx attack in April, about 2 hours after the first report and 3h 42m after upload. A new "Malware Triager" role will be able to handle reports without full PyPI admin access.
  • Compromise resilience: the goal is for installers to reject tampered artifacts. How that works hasn't been decided, and several proposals are being evaluated. The PSF will also write a "Compromise Recovery Runbook" and test it regularly. A "Secure Python Distributions" program would check that redistributors verify python.org's Sigstore signatures.
  • Vulnerabilities: the PSF says LLMs and agents are driving a sharp rise in known open-source vulnerabilities. The Python Security Response Team is handling about 4x more than a year ago. The PSF will evaluate making the PyPA advisory database the authoritative source, with maintainers able to correct entries.
  • Post-quantum: a draft PEP targets the Python 3.16 feature window (May 2027) and will set a schedule for quantum-safe algorithms in the standard library. It's by Emma Smith, Bénédikt Tran, and Seth Larson and hasn't been published for review yet. PyPI and python.org get post-quantum TLS first. A schedule for retiring quantum-vulnerable key exchange will come later.
  • Extras

Calvin:

Michael:

Joke: Fewer wishes

Episode Transcript

Collapse transcript

00:00 Welcome from Las Vegas. I'm in beautiful Las Vegas,

00:03 Nevada.

00:04 I can see the strip behind you. It's incredible.

00:05 The high roller right there, right there in the review.

00:08 It's too bad we can't see the sphere from where we're at

00:11 because from time to time this week, my picture is on the sphere in Las Vegas.

00:15 Are you serious?

00:16 Yeah, the Amazon lined up so that the heroes are part of the attraction of coming to reInvent.

00:22 So anyone who's listening to a live stream right now or listening to it this week,

00:26 come find me.

00:27 I am at reInvent until Friday morning and you can see my picture on the sphere.

00:31 That is really cool.

00:32 They just had that F1 Grand Prix there two weeks ago, I think it was.

00:36 I want to come to that someday.

00:37 It would be super fun.

00:38 And they have all the drivers up there and they do a whole bunch of stuff with the sphere

00:41 because they raced right around it.

00:43 Yeah.

00:43 And so there's always a bunch of graphics to do with the race.

00:46 And it's like Max Verstappen, Hamilton, and Calvin Hendrick.

00:50 And Calvin Hendrick.

00:51 Got it.

00:51 Yeah.

00:52 Got it.

00:52 Yeah.

00:52 We're all up in the sphere.

00:53 One thing I have in common with those Formula One drivers is our pictures have all been on the sphere.

00:57 You probably also drive cars.

00:59 I do drive a car.

01:01 And sometimes my wife would say I drive it like an F1 driver.

01:04 But that's her opinion, not mine.

01:06 Are you ready to kick this off?

01:07 Let's do it.

01:08 All right, let's do it.

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

01:14 This is episode, what is this, 507,

01:17 recorded December 1st, 2026.

01:21 I'm Calvin Hendrix-Parker.

01:22 And I'm Michael Kennedy.

01:23 Great to have you, Michael.

01:25 If you want to support the show, please go visit our sponsors.

01:28 And this week it is sponsored by Michael and myself.

01:31 So check out the courses over on Talk Python.

01:33 It sounds like Michael's still wrapping up some Black Friday sales.

01:37 So if you want to deal on some Python learning stuff,

01:40 head over there.

01:41 And then if you want to check out the awesome brainstorming

01:44 brainstorm over at Six Feet Up, check us up over on sixfeetup.com.

01:48 We do lots of cool consulting services around Python and solving hard problems.

01:53 If you want to connect with Michael or myself, we're also on the socials,

01:57 various ones, Mastodon, Bluesky,

01:59 X, and LinkedIn.

02:00 And then the show is over on Mastodon, Bluesky,

02:02 and X.

02:03 If you're watching this live right now, it's because you've joined the live stream at

02:07 pythonbytesfm.com slash live, and you can be part of that audience too.

02:11 Finally, if you want the handcrafted digest of every week's show notes in your own inbox,

02:17 Join our friends of the show list and we will email you the show notes right here to your inbox.

02:24 Let's get rolling.

02:25 There's all kinds of news this week.

02:27 So what is happening in the AI agents world?

02:31 AI agents.

02:32 Oh, my gosh.

02:33 Where do I start with this, Calvin?

02:35 Let me go back.

02:35 Let me go back a little bit in time.

02:37 So I'm going to cover an article about this programming language,

02:40 Lean.

02:41 If you haven't heard about it, I'll tell you my poor understanding of it a moment before we cover it.

02:45 I just heard about it like two weeks ago.

02:47 Yeah, exactly.

02:48 Same here.

02:49 So before we get to that, though, remember when Mythos first got announced and it was too dangerous to release?

02:56 And then there's Project Glasswing.

02:58 People don't remember Project Glasswing was.

03:00 Anthropic says, well, hold on a minute. We just found a thing that hacks all the things.

03:05 We need to let people prepare.

03:08 And so what they did is they worked with Apple and Microsoft and all these other big companies about,

03:14 we're going to need to lock down your stuff before it gets hacked.

03:18 Because once we let this thing out, we've already seen it break into them or something to this effect, right?

03:22 And I, at the time, went onto social media and I said, core developers in Python,

03:29 people in control of Python, are you working with the Mythos team?

03:33 And from what I understood, there were two answers, kind of no,

03:37 and maybe this is a misunderstanding, but my feeling was it was kind of dismissive, like,

03:40 no, and we don't want that crap near our Python.

03:44 Or we could neither confirm or deny.

03:47 Yes, it could be.

03:48 I feel like it was like, we don't really want AI in CPython,

03:51 and we're going to keep, to be clear,

03:54 Project Glasswing was, we will look for problems and tell you what they are.

03:57 It's not that we're rewriting your code, right?

03:59 Well, I don't know if they did or did not.

04:02 My understanding was they did not work with Mythos.

04:04 And I feel like now that Fable is out, it should be like going 24-7 on there.

04:09 But that said, this is a little bit of a,

04:12 yeah, you might actually want to do that.

04:14 So there's this article by David Andrews called Formalizing CPython,

04:19 specifically CPython, not Python language.

04:22 And what they did was him, David Andrews, and Chao Zhang,

04:26 I imagine they're like research folks.

04:28 I don't really understand.

04:28 I don't really know about their background.

04:30 But what they did is they used this programming language that is used to prove algorithms and prove correctness.

04:37 100% yes, no, like theorems, lemmas,

04:39 all that kind of business called Lean.

04:42 And so they rewrote 10% of CPython in Lean.

04:46 And they actually have an example of here's how you operate a range, like how long is a range,

04:50 right?

04:51 Because if you're given a range and someone could tell you like, hey,

04:55 it's a list.

04:56 So it's this long or just calculate, you know, how given like a start, a stop.

05:00 and how many, like how broad the step is,

05:02 like what does that work out to be and so on.

05:04 So there's the CPython version, and then they have the Lean version.

05:08 And the Lean version is completely weird.

05:09 I don't know or want to learn Lean.

05:12 It looks weird to me.

05:13 Like maybe it's amazing, I should learn it.

05:15 But whatever, it just looks like a weird language.

05:16 But it's like a more formal way to understand structures,

05:19 right?

05:20 Well, here's the TLDR, which they very kindly put at the top.

05:24 We pointed Opus 5.5, so not even Mythos or Fable, at CPython.

05:28 And they said, look, CPython runs basically all of Python.

05:31 This is the way that Python runs.

05:33 And we had it rewrite its functions in Lean, a language for writing machine-checked proofs of computer algorithms'

05:41 behavior, and so on.

05:41 Each rewrite copies original line by line, and it's tested against real Python with 10,000 of inputs

05:47 to make sure that they behave identically before anything is tried to be asserted about this Lean version, right?

05:53 So basically, they take the Python,

05:55 they rewrite it in Lean, and they run a bunch of test data,

05:58 probably unit tests and performance tests and other stuff against

06:01 it to prove that it really is the same thing.

06:03 Once it passes, then they have a second agent come and

06:06 verify it. This is a really good practice to say, I've written this code.

06:09 Hey, other agent that has not seen or participated in this,

06:13 I would like you to evaluate it, right?

06:15 And tell me if you think this is actually true and so on. So they did that to make sure it works.

06:19 And they ended up with 600,000 lines of lean across 1,500

06:23 files.

06:24 Here's the part where it gets weird.

06:26 18,927 theorems and lemmas.

06:30 I'm not even sure what a lemma is.

06:31 I love that they have lemmas.

06:33 So lemmas are like not quite as strong as a theorem.

06:37 A theorem is like a big statement.

06:39 Lemma is like a little bit of a side idea that you combine to make a theorem type

06:42 of thing.

06:43 So very fun there.

06:45 But here's where it gets interesting.

06:46 It reported 415 verified bugs in

06:51 python most of which are small but 55 can crash the interpreter or oh my god corrupt memory from

06:58 ordinary python code you might want to yeah you might want to look into that when you hear corrupt

07:03 memory and crash the interpreter that is one bit of cleverness away from remote code execution with

07:09 no authentication right that's a very bad place to be wow so this is completely on their own not

07:15 associated to the psf or yeah i don't think from what i understand they have nothing to do with the

07:19 pss that's a nor do they have anything to do with project glasswing like they just used opus they

07:23 didn't use fable right and they don't say what effort i would imagine yeah there's a certain

07:28 magic there's a certain point if there's just good enough you don't even need that much you just need

07:32 its willpower that it doesn't get tired exactly you just need like i want you to rewrite 615

07:38 keep going just don't stop please all right so 55 let's put 55 of these as like real pucker

07:45 puckering you're like because if it's like okay well if you like don't use utfa use this other

07:52 really bizarre encoding that like only writes an emoji maybe it like doesn't i mean okay right

07:57 whatever but if it's going to crash the interpreter or corrupt memory that is like it should have your

08:02 full attention yeah and this is 10 of python so extrapolating that out let's say it's uniformly

08:09 distributed into the rest of whatever they didn't touch i don't know that it is but that would be

08:14 550 potentially CVE level problems that they prove with lean.

08:19 How interesting is this?

08:20 Well, do they just need funding to get the rest? Is that what we're,

08:24 they're looking for?

08:25 I don't, you know what? I don't know why they stopped.

08:27 Why did we stop at 10%?

08:28 Yes.

08:29 Yeah. Why did we stop?

08:30 Okay.

08:30 So it talks about a lot of like why and the proofs and how

08:33 they prove the proofs.

08:34 I mean, this is amazing.

08:35 I know it's really good work.

08:36 It's very academic.

08:37 Somewhere at the bottom, it has a where it stands.

08:40 Okay.

08:41 I mean, it sounds a bit like my teenagers.

08:43 They like starting something but never finishing something.

08:45 Exactly.

08:46 You know, it's probably enough for their academic paper when they're done.

08:48 They're like, cool.

08:49 I mean, this is great.

08:49 I was like, we proved it.

08:52 But here's the thing.

08:53 It says the project is open and help is welcome.

08:55 Ah, there we go.

08:56 Most of CPython is still unmodeled.

08:58 Pick a file whose functions are still marked to do in the coverage slash methods section.

09:03 Oh.

09:03 Follow agents.md and send a PR.

09:06 Well, that's even easier.

09:08 That's how you can go give back.

09:09 Exactly.

09:10 So if you have some understanding of this and you've got some extra Claude credits,

09:15 like for example, I don't know about you, I have a bunch of extra Claude credits this week

09:20 because I've been traveling and juggling Thanksgiving and all sorts of stuff

09:24 and I have not been able to give my Claude as much attention as it normally gets.

09:28 So if I had the time and energy, I don't right now.

09:31 But if I did, I could just go, well, let me just sick my Claude on this thing

09:34 and do as much as it can until it runs out on the last day of my credit.

09:37 That would be a cool sort of thing to do.

09:39 Yeah, I think this is a perfect use case for I don't want AI slop,

09:43 but I want AI to accelerate us having a better version of the language.

09:46 Yes, and I would like to put a quick follow-up out there.

09:49 I believe my understanding is that CPython missed Project Glasswing window or whatever.

09:55 When that happened, too bad they didn't participate, whatever.

09:59 Everyone listening, CPython people or not,

10:02 there's a project from Anthropics Red Team side of things called at red.Anthropic.com

10:08 called OSS Scanner, Open Source Security Scanner, I believe it stands for.

10:12 And it's a thing that all open source projects can apply for.

10:16 And if accepted, they'll periodically scan your project

10:21 with the Project Glasswing methods tooling and send you reports,

10:25 which I think is awesome.

10:26 Not publicly, but privately, and say, here's how you fix it.

10:29 I think you might get some credits in the ability to run Claude in a more aggressive mode.

10:34 Like, I don't know if you ever ask it to do something,

10:36 and you're like, nope, can't do that.

10:37 So you're going to hack something with this.

10:39 Like, this is my own program.

10:40 I'm trying to see that no one else will hack it.

10:42 Will you please help me?

10:43 You know, that kind of thing.

10:44 Right.

10:45 This led it through.

10:46 So I'm probably going to cover this again in like next week or something a little bit more

10:49 detailed, but just throwing that out there that it's not all just doom and gloom.

10:53 Sign up for this thing and you get free resources to work on it.

10:57 That's really cool.

10:58 There's actually some relevant extras from the AWS reInvent this week about this too.

11:02 Yeah.

11:03 We'll cover that later.

11:04 There is.

11:04 Yeah.

11:04 One of the items is around supply chain.

11:06 So I'll talk about that in the extras, but that's really cool.

11:08 Awesome.

11:09 Yeah.

11:09 Yeah.

11:09 And a quick bit of live feedback from Bay.

11:13 There was an interesting take on AI lean proofs recently that pointed out that it's a bit more

11:19 nuanced than you might think to understand what if something in lean actually proves.

11:23 Yes, that's true.

11:24 And there's a whole section in this article here.

11:26 To be honest, it was already nuanced to me.

11:31 Exactly.

11:32 It says when a correct proof is wrong anyway.

11:34 And like, how do you actually prove something?

11:36 I think these are academic folks working with Lean that are just like,

11:39 let's go try some stuff.

11:41 I think it's interesting.

11:42 And I would like to really encourage the CPython folks to sign up for OSS Scanner at theredAnthropic.com or somehow reach out to them.

11:52 Because clearly there's work to do.

11:53 And obviously, I mean, who looks at a project,

11:57 a code base that large and thinks there's nothing to do?

11:59 There's stuff to do.

12:00 All software has bugs.

12:01 We know it.

12:02 It's just a truth.

12:03 It's a law of software.

12:05 There's bugs everywhere.

12:07 It's like the fourth law of thermodynamics.

12:10 Or it's a lemma off of the entropy one of it.

12:15 I don't know.

12:15 Something like that.

12:16 We'll get lemma in there.

12:16 We'll get lemma in there somehow.

12:18 Do they use lemma at AWS reInvent?

12:23 I've not heard the word frequently, but there are lots of things being announced here at AWS reInvent.

12:28 Today, this morning, was the big keynote here by the CEO.

12:32 So Matt Garvin got on stage.

12:34 actually Sam Altman at some point joined him on stage

12:38 for the conversation, I'll just leave it at that.

12:41 But the more interesting person they had, the most interesting person in my opinion,

12:44 they had on stage was actually one of the co-creators

12:47 of DuckDB.

12:48 Do you remember Michael when AWS purchased DuckLabs?

12:52 I think that was back in August.

12:54 And we're all wondering how that was gonna go and what was gonna come of it.

12:58 This is actually an announcement about what they built.

13:00 So they had the creator of DuckDB on stage talking basically about,

13:06 we've talked a lot about DuckDB and how it's great for analytics

13:10 and you typically don't really have a big data problem.

13:12 Most of these problems can be solved with a single node

13:14 and that's where DuckDB and its analytics engine

13:17 like really, really shines.

13:18 The thing they announced before this announcement here

13:22 was DuckDB now can scale.

13:24 And so there's DuckDB Scales is the new product

13:28 and that is now powering under the covers some Amazon products you may be familiar with,

13:33 such as Amazon Athena.

13:35 The SQL dialect for Amazon Athena, and I imagine Glue and any other ones

13:41 that are using the specific DSLs that Amazon puts forward for you to go wrestle with

13:47 are now going to switch over and use the DuckDB dialect for querying.

13:52 I think that's gonna make a huge, huge impact

13:54 on how easy it is to interact with these various services.

13:58 And that new DuckDB scales part, which means now if you've got truly big data problems,

14:04 you can now use DuckDB Scales to actually ask the question

14:07 and then it will do run the query, it figures out how to split it up and run the query

14:12 across many, many data sets.

14:14 That part is still open source.

14:15 The DuckDB Scales piece is built into the latest releases

14:19 of the DuckDB open source product.

14:21 You can use it out of the box.

14:22 There's no enterprise part to it, but Amazon did incorporate now

14:28 that the serverless query service inside of Athena

14:31 runs DuckDB and splits a single query across many workers

14:34 and the data as the data outgrows one machine.

14:37 And so that's where the open source part gets put back in the community.

14:41 It's that same technology that they use to do this

14:43 across multiple workloads and more than one machine

14:46 we get as a community as a major benefit.

14:50 What's also nice is that AWS claims, and again, these are AWS's numbers,

14:54 AWS claims that queries are up to two times faster

14:57 and 50% cheaper than the Athena engine V3 on large data sets.

15:02 So the prior query language using the whatever previous technologies,

15:08 now that they've basically put DuckDB under the covers,

15:11 it got faster and cheaper to go run those queries.

15:13 You can use that dialect and run them against glue,

15:16 glue data catalog tables.

15:17 So there's nothing to redefine, no data to move,

15:20 nothing to change.

15:21 You can just go today, I think it's in preview right now.

15:24 So I'm not sure when they'll go generally available,

15:26 I think if you wanted to preview DuckDB queries, you could do that.

15:29 Results come back as Apache Arrow.

15:32 So if you're familiar with the Arrow data format,

15:34 that is a, you know, you can basically in memory transfer that between processes

15:39 and not to like rerun your queries to move those data sets around.

15:43 And kind of mount it in pandas and pullers and all these things.

15:46 Yeah.

15:46 So this gives you a huge opportunity now.

15:50 There's a new string API and an ADBC driver landing in the data science tools.

15:55 So there'll basically be no conversion step.

15:57 So you can go straight from glue queries in Athena

16:01 straight into, like you just mentioned, pandas and pullers.

16:04 And boom, you've got access to your data faster and cheaper.

16:08 The open source Athena extension for DuckDB lets you prototype a query in local DuckDB

16:14 and then run the same SQL query on Athena at scale.

16:18 I think I've actually got the docs pulled up over here as well.

16:21 Yeah, the docs are updated.

16:23 Again, this got released today.

16:24 You can now use Athena powered by DuckDB.

16:28 It supports Apache, also now supporting Apache Iceberg V3

16:32 and Parquet tables.

16:33 You turn it on, you go create a work group

16:36 and switch an existing one over to DuckDB.

16:40 There's also another related release that happened at the same time

16:43 is that there is a separate Redshift extension for DuckDB.

16:46 So that's an Apache 2.0 DuckDB version that lets you query Redshift from a local DuckDB session.

16:52 So no longer do you have to do some fancy cloud whatever shenanigans to get DuckDB to talk to your Redshift.

16:58 You can actually just connect your Redshift directly from your local machine and run those queries against the Redshift.

17:05 So I think this is a big deal.

17:08 It's a great use case for acquiring a company that is behind an open source project and then contributing back to the open source project.

17:16 Yeah, I'm really glad to see that they're doing stuff to keep enhancing DuckDB.

17:21 publicly in an open source way.

17:23 It hasn't just got swallowed up into the beast of AWS.

17:28 Yeah, this re-invents keynote, I'll say the last couple years that I've gone,

17:33 the last couple years have been less interesting to me

17:35 as a developer and even a CTO.

17:38 But this year's keynote had a lot to offer.

17:40 And this was one of the big ones.

17:41 And the other ones were more maybe probably oriented towards CTOs around agentic AI and identity

17:47 and some other announcements that are in that space.

17:49 But the developers got a lot out of this too.

17:52 I'm really excited about that.

17:54 And yeah, there we go.

17:56 More open source goodness coming from the Amazon world.

17:59 Yeah, that's super neat.

18:00 And Parquet stuff sounds amazing.

18:02 I don't know if people really know, but Parquet has these little headers,

18:06 header photo things that talk about, well,

18:08 here are the ranges of the various indexes in this particular file.

18:13 And so you'll see a lot of the data lakes and stuff will have many, many different Parquet files.

18:17 And you can do queries across them.

18:19 super quick because you can just say you already know before you touch the file what lives in them

18:23 by just learning the headers.

18:25 And so I had the Duck Lake people on Talk Python not too long ago,

18:29 and we talked a ton about that. That was super interesting.

18:30 So if you want to dive in more to it, read this, watch the keynote,

18:34 check out the Talk Python episode as well. A lot of good stuff here.

18:37 Very inspiring.

18:38 Yeah.

18:39 All right.

18:39 Michael, what do you got for us?

18:41 I got some more web stuff because why wouldn't I have web stuff?

18:44 Citri.

18:45 So Citri is an interesting project.

18:47 There's not too many new, new, new ideas in Python web,

18:53 right? It's more like, well, how does Flask versus FastAPI compare to Django?

18:57 And believe it or not, FastAPI is not new anymore.

19:01 Sebastian's joke about they wanted people who had four years of experience could actually be true

19:06 now. Finally.

19:07 Finally.

19:08 But Fitry is pretty new. And the big announcement is 1.0 is here.

19:13 And it's by Euro Ourobek and says, I'm so glad I get to write this blog post.

19:19 Citri 1.0 is stable and it is out.

19:21 So what is this Citri thing? What if you could take something like React or Vue.js components

19:28 and use that to build your Python web app, basically,

19:32 is my understanding of it here.

19:33 So the idea is that you can either run it as part of Django,

19:38 FastAPI, Flask, or run it as its own web frameworks. So what's interesting is you can keep a lot of your stuff in Flask, but then use

19:44 these components and, or Django or so on. Right.

19:47 So it's, it's pretty interesting in that regard.

19:49 This is like, why did I build this?

19:51 Because you really get two choices, Django templates or

19:55 Jinja templates.

19:56 These are sort of separate HTML files and I'll throw chameleon in there. There's

20:00 more than this, Jero, but still, it still has the same problem. So it doesn't,

20:05 you know, Can you bring Maco templates in?

20:07 Yeah, Maco.

20:08 Come on, man.

20:09 There's at least four options, but they all operate the same way, so it's fine.

20:12 So they're easy to use.

20:13 What's interesting about this is this comes with type checking and model binding verification across template and code and model.

20:22 Identic stuff and all sorts of interesting combos there.

20:25 So obviously you just pass a dictionary and you YOLO it over to your template and hope it works, right?

20:31 Well, I've always hated developing my interface or my models twice.

20:35 So it sounds like this is kind of a bridge where I can avoid that and it builds the front-end pieces for me.

20:41 I'll show you and you tell me what you think.

20:42 Okay.

20:43 Also, a separate JavaScript front-end and fewer React is all separate, right?

20:47 So let's see.

20:48 So what you do is you create components and you do them all in a single file, which is very React view-like, right?

20:55 So I create a class, which is a component, and it has arguments that go into it.

21:00 And it has events that could happen on it, right?

21:03 like it return a button and so on.

21:05 And then it has a template, which is HTML,

21:09 an HTML fragment typically, right?

21:11 Because it's a component, not a whole page.

21:13 And it has CSS that applies to that component, which is pretty interesting.

21:17 Now notice that there's a C-click event handler here.

21:21 Like what the heck is that?

21:22 Okay, well, that's the Citri thing.

21:24 And if you go look in the IDE section, there's actually plugins for VS Code,

21:29 PyCharm or other, you know, because you could just run it from the terminal.

21:34 And this will actually both give you autocomplete, hover information,

21:39 go to definition.

21:39 So like that C, click, whatever, you could command click on that event

21:43 and it would take you over to it.

21:45 Or there's like containers that'll say, this is a part,

21:48 I'm wrapping it up with another thing.

21:50 And then I'm embedding this component.

21:52 If you click on it in HTML, inside your component in Python,

21:56 in a string, it'll like navigate you over.

21:58 But it also does a lot of checking, like that the model.

22:02 I was going to ask, is other really a set of skills

22:05 for the AI agents to use?

22:07 Because obviously most of these models probably have very limited knowledge of Citri

22:11 if I want to be using them in my IDE.

22:12 A hundred percent.

22:13 So you should probably definitely like set up.

22:15 Get the other.

22:17 Get the other, get the Citri CLI and have it use that, right?

22:20 Oh yeah, even better if it's a CLI, it's perfect.

22:22 Yeah, just give it a CLI and have it go off of that.

22:25 So yeah, pretty interesting.

22:27 They monitor the vulnerabilities across a whole bunch of different other projects

22:31 like Svelte, Django, Angular, et cetera,

22:33 and use agents to verify that they're not vulnerable to any of these styles.

22:38 That's super smart, actually.

22:40 Yeah, yeah.

22:41 They've already done the hard work.

22:44 Just see what goes wrong with the popular ones and do that.

22:47 So then at the bottom down here on their homepage, they show you different ways to integrate it

22:51 into the different frameworks.

22:53 So for like FastAPI, on the lifespan where it starts,

22:56 you just initialize it, And then you mount both the app and Citri,

23:00 and it can have its own little sub use.

23:02 It's like a little more obvious in Flask, where like you say, mount the app,

23:06 but also Citri, which has the prefix slash anything to slash Citri so forth.

23:10 It's kind of like HTMX callback type of stuff.

23:12 You can add it into Django.

23:14 You can just treat it as its own web framework and pass it as an AGI,

23:18 ASGI, or as a WSGI app that gets returned

23:21 and just plug it into uvicorn or whatever, Granian, hand it off.

23:25 Anyway, it's pretty neat, right?

23:26 It does look really cool.

23:27 Well, it solves, again,

23:28 kind of solves my problem where I don't want to write a front end,

23:31 but I still want to be able to have it be slick and use these events and write it in Python still.

23:36 Yeah.

23:37 And it has Citri UI.

23:38 And I believe Citri UI is basically Tailwind or something along those lines, right?

23:43 Makes sense.

23:43 But it plugs in like to its components and so on.

23:46 So you get like a little split button or whatever.

23:51 Toggles, calendars, I don't know.

23:52 Calendar you can just use as a component that plugs into these things.

23:55 So that's kind of cool too.

23:57 That's an alpha, but...

23:58 I feel like I might need to go try this.

23:59 It's interesting, you know?

24:01 So people can check it out.

24:02 It's always fun to have a new perspective on...

24:05 And it's safe.

24:06 Safe is the first word that they put into their banner there,

24:10 which I like.

24:10 Yeah.

24:11 Because security is a real deal.

24:13 I know.

24:14 We kind of opened with that, didn't we?

24:17 So safe, I think it means, like all those bug validation stuff that I was talking about,

24:21 and also type checking, runtime checking.

24:24 So, for example, you can integrate it

24:26 your continuous integration and it'll tell you before you ever run the code whether or not your

24:31 template and your model are out of sync that kind of stuff yeah yeah we're seeing i saw a lot of

24:35 themes of that this week at reinvent as well but a non-reinvent security announcement i wanted to

24:41 cover is the psf has announced a security roadmap this was announced just last week there is a in

24:47 addition to all the activities that they are already doing around security they basically

24:51 announced over the next five years, they've got some goals around securing Python's software

24:56 supply chain and distribution infrastructure and responsibly growing and advancing critical

25:01 Python infrastructure.

25:02 So there's four major security focuses for the upcoming year, which

25:06 is that sustainability of PyPI malware remediation.

25:10 They're establishing a compromised resilience for

25:12 PyPI and Python.org itself as well. Obviously, they are high value targets.

25:17 There's the vulnerability remediation and advisory capacity.

25:20 And then the last one is incredibly interesting because there's

25:23 been some announcements around cryptography and quantum.

25:28 So the post-quantum cryptography readiness, that's becoming more and more of an issue as we're seeing error correcting in the quantum world

25:36 become potentially more and more real.

25:38 So the team right now, there's basically a Python security

25:42 response team that handles the reports that are coming in through their normal channels.

25:49 But that's only going to go so far. There are only so many people.

25:52 There's only so many folks who can handle those bits as they go.

25:56 So this is going to actually have PyPI is going to

26:00 lean more into automatic quarantine.

26:03 Today, basically, it only hands off to several trusted

26:07 reporters who can flag the same project and then it basically will you know take down that project

26:12 but then this is going to be a new malware triager role and they will be able to handle reports

26:18 without the full pypi admin access so there's going to be a new role added into pypi that this

26:25 automated tooling will be able to hook into that'll be part of the malware remediation and actually

26:31 So they're looking at removing malware from existing PyPI published packages too.

26:38 Underneath the compromised resilience, the goal here is,

26:40 again, how do we make sure that PyPI and Python.org stay alive,

26:45 even through the face of attacks and all the various security pieces that are out there.

26:49 So that is, I'll scroll down to that part of the book.

26:51 That's a tricky job.

26:52 I don't, honestly, I don't think I'd want that job.

26:55 There's a lot of different ways.

26:57 And they do it with such a skeleton crew of folks.

27:00 It's amazing how lean the PSF is.

27:03 I mean, they're very responsible with the funding that they have and the people they put onto this.

27:07 So that's, again, part of this is to help become compromise resilient.

27:14 Because there's really a reality that Python.org and PyPI as a result are very much targets.

27:19 Because if you get a hold of PyPI, you can now do not good things to lots of different packages.

27:25 Because that's where all the dependencies generally come from.

27:29 The vulnerabilities in CVEs are increasing, so they're putting in this vulnerability remediation

27:33 and advisory capacity so they can handle that.

27:36 And this is the last one I kind of want to mention is the post-quantum bit.

27:39 I didn't realize that there have been significant improvements to quantum error corrections

27:44 that were published in the last year.

27:45 That's a big deal because that means the chances of a cryptographically relevant quantum computer

27:52 created by 2030 could become real.

27:54 And then that's when stuff gets very, very real.

27:57 The goal here is making sure that the Python language has in the standard library options for developers to reach for that are post-quantum capable.

28:08 So that post-quantum cryptographic algorithms, or PQCs,

28:12 will be added to all services hosted by the PSF, so PyPI and Python.org, but then also having a PEP drafted so that those things get written into the standard library as well.

28:22 We want to thank the fine folks.

28:25 Let's see here.

28:26 I know Anthropic is behind some of this.

28:28 And also, who's the other one that's behind that?

28:31 Oh, Alpha Omega.

28:32 So Alpha Omega and Anthropic have been funding the security work,

28:36 well, at least the resources from the PSF to handle a lot of this.

28:39 So thank them for that.

28:41 But it sounds like if you want to get involved,

28:44 there's an end-of-year fundraiser going on.

28:46 So if you're all tired of shopping for Black Friday and Cyber Monday,

28:51 Go give some money to the PSF to help them with their endeavors because it's super important.

28:56 Yeah.

28:56 And again, it's not to downplay the work that they're already doing.

29:00 This is in addition to existing bits.

29:04 Yeah, it's definitely important.

29:06 And if a quantum computer does come out that can break RSA,

29:09 that's bad.

29:10 Yeah.

29:11 Have you been hearing the rumors that there might be some kind of vulnerability discovered by AI in regular dual prime factoring encryption?

29:19 No.

29:19 Encryption?

29:20 That sounds really, really bad.

29:22 That is like, I'm going to start putting down an offer on a cave in a very remote location

29:29 if that goes down.

29:31 Anyway, that would also help here because this is another encryption algorithm that you could

29:35 reach for that is not prime factors.

29:37 Okay.

29:37 Right.

29:37 Have you got some extras?

29:38 Yeah, I do actually have some extras.

29:40 One of them is related to what you were mentioning this morning or this morning.

29:44 Okay.

29:45 It's been a long day here at the conference.

29:47 I'm sorry.

29:48 So there are some other...

29:48 It scrambles your brain.

29:49 It's Vegas, it does scramble your brain.

29:51 There are some other interesting announcements from AWS this week.

29:55 One of them was during the keynote today, which was the AWS Continuum.

29:58 There's a Continuum product, and it's got multiple stages

30:01 and multiple kind of subproducts in true AWS and Amazon form for naming things.

30:06 It's by name terribly.

30:08 But this one is the AWS Continuum for the software supply chain.

30:12 Actually, I'll bring that up here.

30:13 What was interesting about the Continuum for software supply chain

30:16 is that they're going to have, This is basically a layer you can inject in front of or behind or around your software that will be continually looking for vulnerabilities and threats in open source software or dependencies you have in your existing chain.

30:33 So that was interesting because there's going to be container images as part of this.

30:37 There's basically, if you've been following along in the AWS world,

30:41 they've got their agentic tool called strands.

30:44 And there's a strands, again, their name is not great because I can't remember it.

30:48 They're basically a sandbox technology for strands and their agent technology.

30:52 This includes container images for Python, Node,

30:55 Java, and Go, all built around Amazon Linux 2027.

30:59 And so it's basically building a slimmer, slimmer, more secure version that can be easily scanned and checked for these various vulnerabilities so that you can reduce the chance of releasing software into production that is potentially full of vulnerabilities.

31:13 The other one I thought was interesting, I think they must have announced this either pre-invent or last night at the developer one,

31:20 which is their credentials daemon.

31:23 This is a local daemon that keeps AWS credentials and other secrets encrypted on your machine.

31:27 And it serves short-lived credentials to the CLI,

31:30 SDKs, and other agents over a local socket.

31:32 So no plain text credentials.

31:35 Folks should already be doing this, especially if you should have SSO turned on for your accounts.

31:40 But this is another technique or trick, or not a trick, but a way you can have your code or your tooling leverage credentials that no longer have to be stored on a file that's unencrypted on your machine.

31:52 So check out Credentials Demon.

31:54 It is a public open source product underneath Apache 2.0 license.

31:59 You can see here there's a bunch of work going into it, but it looks like they just announced it and launched it like two to three weeks ago.

32:05 So CredsD will launch locally and it gets into the vaults and refreshes and allows you to access secrets.

32:12 Sounds like it also fixed the problem where your AI asks for,

32:16 I can't log into this.

32:18 Like, well, here's the page.

32:19 Like, no, no, no, it's in the chat history.

32:21 And it freaks out.

32:22 You need to rotate all your keys.

32:23 You know what I mean?

32:24 Like, if it's only good for 10, 20,

32:27 30 seconds, like, what matters if it's in the log, you know?

32:29 It doesn't matter.

32:30 Yeah.

32:31 Yeah, there's, again, this flows in with a lot of the announcements that happened at the keynote this morning around providing user account or agent roles for agents.

32:42 So these agents can now, there's IIM for agents.

32:45 So as much as I have a person and I am in the IIM roles for my account, now agents can also have that same credential.

32:55 So you can now do audit trails, limit roles,

32:58 limit access, and also now see who did what went and where,

33:02 I think, which is a big deal.

33:03 Who gives the agency authority?

33:05 Because I think a lot of folks are just probably running them

33:08 as their own user accounts inside of their AWS orgs,

33:11 which is not a good practice at all.

33:12 Yeah, very good.

33:13 Hey, Michael, you got some extras too?

33:16 I want to talk about Lady Bird.

33:17 Are you familiar with Lady Bird?

33:18 I'm not.

33:19 That's the browser, right?

33:20 The browser.

33:21 Yes, exactly.

33:22 So Lady Bird is a project that is trying to create a new,

33:27 fresh web browser, truly independent,

33:29 privacy-focused, non-profit that is not something built around Chromium.

33:36 It's not Firefox.

33:37 It's not WebKit.

33:38 It's its own rendering engine from scratch, which I think is pretty interesting.

33:43 And the big news is it is now available in Alpha for playing around with.

33:47 So macOS and Linux, if you want to check it out.

33:49 You also told us about another browser like two weeks ago.

33:53 How did this one perform comparatively?

33:56 I've not played with Lady Bird yet.

33:58 I hear that some of the sites don't work because it's a new rendering engine that didn't exist.

34:04 So some sites won't work.

34:06 It'll crash sometimes, whatever.

34:07 I think it's super early, right?

34:08 This is alpha.

34:09 And I've been playing with Helium mostly as my main browser, which is pretty fun.

34:13 But I've also spent time in Vivaldi.

34:15 So we'll see.

34:16 But I don't know about Lady Bird.

34:17 It's got to come a little farther.

34:18 But if you want to play with it, I think it's kind of neat that it's out.

34:20 It's an interesting journey.

34:21 I mean, if you go look up videos of the creator talking about this,

34:25 it's wild.

34:26 Yeah, there's a bunch of sponsors for it, by the way.

34:28 That's cool.

34:29 Cloudflare, Shopify, Lovable, Proton, et cetera, et cetera.

34:34 So it's not just a random hobby thing, right?

34:36 It's got some real momentum there.

34:38 Other people, I think, also want to see some kind of alternative,

34:41 right?

34:41 All right.

34:42 Also, Django posted by us.

34:45 welcome our executive director posted by Jeff Triplett and the DSF board.

34:49 So we're honored to introduce Paolo Ferraro as the Django Software Foundation's first executive director.

34:56 And this has been a multi-year project to find somebody to basically lead the foundation in not a technical,

35:02 but a relationship way to grow Django.

35:06 So I think that's really great.

35:07 And if I don't get this wrong, I do believe I see some interesting companies down here who made this possible.

35:13 Six feet up.

35:14 Six-year-old friends.

35:16 Yeah, exactly.

35:17 Yeah.

35:17 This was something...

35:18 Cuddlesoft from Emily Morehouse.

35:20 This is something that's been going for well over a year,

35:23 almost two years in the making.

35:27 Not this year at DjangoCon, but last year at DjangoCon,

35:30 Pete from Lincoln Loop approached me and said, we need to get some money together to make this really happen

35:34 because this is going to be a big mover for the Django Software Foundation

35:38 and the community at large.

35:41 Not that it's a real problem for me, I don't like seeing the agencies being the only sponsors of the major aspects of the project.

35:49 The bigger orgs who are really using Django down deep inside,

35:52 I'd love to see their names be front and center.

35:54 But you need this person like this executive director to make that happen.

35:57 Right, right, right.

35:58 Go ahead and make those relationships.

36:00 Yeah.

36:00 You really should support these things.

36:02 And here's why that'll actually pass the board.

36:05 I look forward to meeting Paola.

36:07 Yes, indeed.

36:08 All right.

36:08 Congratulations.

36:09 Let's close it out with a joke.

36:12 Yes.

36:12 And I think this is a good one for all the top.

36:15 This has been a very security-heavy episode, wouldn't you say?

36:18 I think lately.

36:20 Unusually high.

36:21 Unusually high, and I think here we are.

36:24 So here's the joke.

36:25 The traditional, you rub the lamp, out comes a genie, you get three wishes, right?

36:31 Well, as you can imagine, a software developer type has been the one to summon the genie.

36:36 It says, there's rules.

36:38 You cannot wish for love.

36:39 You cannot wish for death of someone, something like that.

36:42 And you cannot wish for more wishes.

36:44 Very well.

36:44 May I wish for fewer wishes?

36:48 Yeah, maybe.

36:49 I mean, I don't know why.

36:51 Why would you do that?

36:52 Is that in the spec?

36:54 Is that in the spec?

36:55 It says, well, I wish for,

36:58 what was it?

37:01 I wish for zero wishes or something like that.

37:03 I can't remember exactly.

37:04 That's complicated.

37:05 We're not sure what that actually works out to.

37:07 Yes, I wish for zero wishes or something like that.

37:11 And your wish executes.

37:12 So you've actually used one, but you have zero.

37:15 And so what happens when you go into negative?

37:19 Who knew that wishes were an unsigned short int?

37:22 Now you've got a wish buffer overflow.

37:24 Yep, you've got an overflow.

37:25 So now you have like 65,227 wishes.

37:29 So can I wish for fewer wishes?

37:32 Very cool.

37:32 Thank you, Michael, for the awesome joke.

37:34 That one's deep.

37:37 It is deep.

37:37 You got to know your data types very well.

37:40 Does that work so well in Python?

37:41 They all like just, they just keep growing or shaking.

37:43 Yep, or whatever.

37:44 Awesome.

37:45 All right, Michael, we will talk to you all next week.

37:47 Bye.

37:48 Bye.


Want to go deeper? Check our courses




Subscribe to Python Bytes