1. Podcasts
  2. Talk Python To Me
  3. #568: Cloudflare Python Workers
Talk Python To Me

3 Nov 2026 · 1h 2m · 32 chapters

Episode artwork

#568: Cloudflare Python Workers

In short

Cloudflare “Python Workers” (GA) and how Python runs at the edge using Pyodide-in-V8 on Cloudflare’s worldwide points of presence, plus the supporting Pyodide/WebAssembly and Cloudflare platform pieces (packaging, sockets, databases, storage).

Guests (Cloudflare)

Dominic Picheta (Workers runtime team; experimented with Pyodide at Cloudflare; led getting Python running in Workers; works on Python Workers since joining). Hood Chatham (maintains Pyodide). Jay Choi (maintains Pyodide; joined Cloudflare around 2022 to work on Python Workers using Pyodide).

Key claims

  • Python Workers run Python on Cloudflare edge nodes (not in users’ browsers), near users (~350+ locations).
  • FastAPI-style apps ship as plain files; no user-built WebAssembly.
  • Packaging PEP 783 enables building C/Rust scientific packages (NumPy/SciPy/Matplotlib) as WebAssembly wheels for Pyodide.
  • Socket support enables Hyperdrive (edge proxying for TCP-based DB access) and relational DB performance.

Notable examples

  • “Python in the browser” (Pyodide) + “browser in the server” (Cloudflare Workers) = Python Workers.
  • D1 (SQLite-based) replicates across the world; Hyperdrive proxies DB connections using sockets.
  • Local dev via WorkerD + Wrangler to run the same runtime as production.

Written by AI. May contain mistakes.

Chapters

0:45

Introduction of Guests

Hosts introduce guests from Cloudflare discussing their backgrounds.

“Welcome to Talk Python to Me, the number one Python podcast for developers and data scientists.”
2:34

Dominik's Journey with Python

Dominik shares his transition from Visual Basic to Python and his role at Cloudflare.

“Yeah, I'm really excited to talk about Python on the Edge.”
4:26

Jay's Experience with Python

Jay discusses his early experiences with Python and his contributions to Pyodide.

“You know, I think it's interesting to contrast that with Python actually because Python also had many of the same goals of VB, but it somehow accomplished it with a lot less stuff on the screen.”
6:04

Hood's Background in Python

Hood shares his mathematical background and how he became involved with Python and WebAssembly.

“Yeah, it's really interesting that you start to contribute on open source and you get a job with that.”
7:30

Transition to WebAssembly

Discussion about the challenges of distributing math software and the benefits of WebAssembly.

“It can just get your package onto their computer automatically.”
9:19

From Pyodide to Cloudflare

Discussion on the development of Pyodide and its transition to Cloudflare's infrastructure.

“They were just like, great, we want this to be better.”
11:08

The Future of Python Workers

Exploration of how Python workers operate at Cloudflare and their global presence.

“But I don't think backed by Pyodide, backed by MicroPython, which would be, I think, a little more practical for web printing.”
12:39

State of Python on WebAssembly

Guests provide an update on the current status and improvements in Python on WebAssembly.

“and execute it there instead of routing back, you know, somewhere in US East 1 or something like that, right?”
14:00

The Evolution of Python on WebAssembly

Learn about the improvements and current state of Python on WebAssembly.

“Hood and JU2 gave a talk at Europython, which I thought was really interesting.”
17:20

PEP 818 and Its Significance

Discover the implications of PEP 818 for Python and WebAssembly integration.

“So hopefully in the next couple months, the steering council will make a decision on it.”
Show all 32 chapters
20:40

The Impact of PEP 783 on Packaging

Understand how PEP 783 enhances Python package management for WebAssembly.

“running some like Python codes in real time.”
24:00

Challenges with Cross-Compilation

Explore the difficulties and strategies in cross-compiling Python packages.

“Dominic, were you going to jump in and say something?”
27:20

Multiline Lambdas Discussion

Debate on the potential introduction of multiline lambdas in Python.

“I wonder if Python should have had multiline lambdas.”
28:00

Syntax Discussions in Programming Languages

Explore the debate around syntax preferences in programming languages.

“So if you designed a new language, you could maybe make it work.”
28:40

Understanding Edge Workers

Learn about the concept of edge workers and how they compare to traditional serverless options.

“Let's talk about, we talked about a little bit, but let's go and just talk a bit about edge workers in general.”
30:52

Deployment of Python Workers

Discover how to deploy Python workers and the local development story associated with them.

“I always describe this as being like a CDN, except for instead of with static assets, it distributes programs and then runs the programs on your data.”
32:43

Database Management with Edge Workers

Discuss the implications of using databases like SQLite and Postgres with edge workers.

“Yeah, I'll be sure to link to the WorkerD project so people can download and install it.”
35:35

Socket Support and Hyperdrive

Unpack the role of socket support and discuss Hyperdrive's functionality within Cloudflare workers.

“So something I've been looking at lately is Lightstream.”
38:31

Exploring Cloudflare's R2 and More

Learn about the R2 storage solution and other building blocks available on Cloudflare's platform.

“the system call has to stack switch and let the JavaScript event loop turn so that it can get the IO completed and then it unstacks switches and returns to the...”
42:00

Transitioning to PyWrangler

Learn about the transition to a more flexible packaging tool for workers.

“I think the packaging story was actually a big thing.”
43:03

Understanding Memory Snapshots

Explore the complexities and implications of Python's memory snapshots.

“And you just gave a presentation at the Python Language Summit, also at your Python a little while ago, right?”
45:12

Compiling vs. Executing Code

Discuss the challenges of distinguishing between compile time and execution time in Python.

“Um, now, of course, you know, I think this is this is this this talk is like a fun thing to think about.”
47:30

Building Fast APIs with Workers

Discover how to build responsive API servers using Cloudflare Workers.

“So there's a couple of code samples and different types of things here.”
48:47

Understanding Worker Limits

Learn about the resource limits imposed on Cloudflare Workers and what they mean for developers.

“And that is, yeah, so it's memory, which is 128 megabytes, and CPU time as well.”
49:42

Handling CPU Time Limitations

Discuss the intricacies of managing CPU time limits in Cloudflare Workers.

“All sorts of things, you know, like loss of code relies on finally blocks executing and it was not executing the finally blocks.”
51:02

Applications of Cloudflare Workers

Explore the types of applications suitable for Cloudflare Workers and their use cases.

“Many mini little hobby apps and small apps live well under that limit.”
53:02

Data Processing with Python Workers

Investigate the capabilities and limitations of using Python for data processing on Workers.

“Everyone knows what an API that talks to a database looks like, but can I do data science work here?”
55:18

WebAssembly and Cloudflare Integration

Learn about integrating WebAssembly with Cloudflare for enhanced functionality.

“If you need to load all the data frames in your memory, it won't fit.”
56:00

Browser Runtime and Research Challenges

Explore the benefits of browser runtimes for researchers who struggle with tech.

“And then everyone gets their own little browser runtime instead of Edgeware runtime.”
57:22

Math and Science Collaboration Issues

Discuss the challenges of collaboration in math and science projects.

“So some of these people literally like, it's like they have, they, they like dictate to their secretary and like, they've never touched a computer.”
58:09

Memory Snapshots and Python Workers

Learn about memory snapshots and their impact on Python Workers' performance.

“It's to not do that startup stuff again.”
59:28

WebAssembly Opportunities

Discover the potential in the WebAssembly ecosystem for developers.

“The total number of people working on it is quite small.”
A man walking through an airport, asking his phone a question

Ask about this episode

Get the gist, explore an idea or ask about something said.

Claude

On Talk Python To Me, what are the key points of this episode?

Searching your listening

Transcript

Automatic transcript. May contain errors.

0:00Where does your Python code actually run? A server in Virginia? A container in Frankfurt? Pyodide put Python in the browser. Cloudflare put the browser into the server. Combine the two and you get Python workers, now generally available from Cloudflare. My guests are Hood Chatham, Jay Choi, and Dominik Picheta from Cloudflare. Hood and Jay maintain Pyodide. Dominik got Python running in Cloudflare workers. Your fast API app ships as plain files. Then you can run it on CPython, compiled to WebAssembly, inside V8, at over 350 locations worldwide. This is Talk Python to Me, episode 568, recorded October 9th, 2026.

0:57Welcome to Talk Python to Me, the number one Python podcast for developers and data scientists. This is your host, Michael Kennedy. I'm a PSF fellow who's been coding for over 25 years. Let's connect on social media. You'll find me and Talk Python on Mastodon, Blue Sky, and X. The social links are all in your show notes. You can find over 10 years of past episodes at TalkPython.fm. And if you want to be part of the show, you can join our recording live streams. That's right. We live stream the raw uncut version of each episode on YouTube. Just visit talkpython.fm slash YouTube to see the schedule of upcoming events.

1:33Be sure to subscribe there and press the bell so you'll get notified anytime we're recording. Tomorrow, Wednesday, November 4th, we're having our first tech meetup, our live tech event as part of TalkPython membership. If you're not yet a member, well, join up and support the show and get an awesome community and experience to boot. Just visit TalkPython.fm, click membership in the nav bar, and you'll be off to the races. If you are a member, we'll be talking about TalkPython in production and some really wild new ideas that I'm exploring. I think you will find both fascinating and actually really practical, but no one's doing it.

2:08So join me on Wednesday, November 4th. And if you're listening to this after and thinking, Michael, why did you just put this in here? Nobody can listen to it because most people listened after. These tech meetups come with recordings. Just visit TalkPython.fm, click on membership, and then browse past member meetups, and you'll be able to get it. So hopefully, either you can join live or you can join afterwards. Become a member, support the show, join the event. Dominic J. Hood, welcome to all of you to Talk Python to Me. Awesome to have you here. Awesome to be here. Yeah, I'm really excited to talk about Python on the Edge.

2:40It's very exciting what you all have announced. And I know it's been out there on Cloudflare for a little bit, but it's now officially formalized, officially supported, a little more smooth. So Python workers, very, very cool topic. Before we get to that, though, let's just do a quick, who are you? Just give me a little bit of your background and what you do and so on. Dominic, we'll just go around the squares here. Dominic, go first. Sure. I mean, I can get started how I got into Python. And that starts at, I guess, a very young age when I was playing with Visual Basic.net. And I realized that I hate Windows.

3:15I needed to get to Linux and Visual Basic.net back then did not support Linux at all. So a couple of my friends were using Python. So that's how I got into it. Afterwards, I actually got a little bit annoyed that Python was interpreted. So I looked for alternatives and I got involved in the NIMH programming language. And I became one of the core developers of that for a while. Fast forward a lot. I was working at Meta and then I moved to Cloudflare to work on the workers runtime team working there on a bunch of features for workers in general I actually was the person I guess that kind of experimented with Pyodide at Cloudflare and got it working and running and then eventually we got Hoodin to help us out with that and we started Python Workers and I've been working on that ever since as well and still do.

4:12Very, very excellent. You know, a word I haven't thought about for a while is visualbasic.net. I've written a little bit, a little bit. I mean, we're talking a couple of files of visualbasic.net. What if our Boast language, I don't know. Great language to learn with though. It is, it is. You know, I think it's interesting to contrast that with Python actually because Python also had many of the same goals of VB, but it somehow accomplished it with a lot less stuff on the screen. you know, like there's not begin if, end if, all this type of stuff. But yeah, very, very fun. Jay, welcome. Hey, I think I can start with how I started using Python as well, like Dominic.

4:48So I also started programming using some Visual Basic NC when I was like 10 years ago. And then I started learning Python when I was in second grade in university, I think. I was having some data science course learning about packages like ThumbPy and SciPy. That was when I first started using Python. And I just fell in love with Python. Like making apps were so easy with Python. So I was using, I started, starting then I started using Python for like 10 years. And around 2021, I started contributing to a library called Pyodip, which I think we will talk a lot in this podcast. and yeah, after maintaining it for around one or five years, I got invited to Cloudflare to work on Python workers using Pyrodite from Hoots and joined Cloudflare.

5:46And yeah, after that, I was working on Cloudflare Python workers for around a year. That's super cool that contributing to the project got you that position, you know? It's like, I'm really interested in this thing and I get to work on it for a while and all of a sudden they're like, well, what if we paid you to do it all the time? That's just great, right? Yeah, it's really interesting that you start to contribute on open source and you get a job with that. That's something that all the open source contributors are hoping to. Good, welcome to the show. I started out on Lispy MLE languages, so I'm a mathematician by training.

6:23I wrote my first Python code for undergraduate introduction to programming class. but then I didn't use it at all until I had to write an email schedule for the math seminar which was in Python 2.7 and I as a mathematician I was very interested in math software to try to get software that does a good combination of like research level you know like high performance computing and also just like quick experiments and lets people figures stuff out. And I found out that mathematicians don't like to install software on their computer. They assume it won't work. Of course, a lot of... They still have scars from Fortran.

7:06That's why, probably. Yeah. And also, a lot of math software is made by mathematicians and it's not an easy thing to distribute software for other people to use. And so it's like they have something that works on their computer and they tell all their friends, oh, you should use this. And they say, nah, man. So that was how I got interested in WebAssembly. I mean, I first started by writing software in LaTeX because mathematicians already have LaTeX on their computer and they already have TechLive on their computer. And that's a package manager. It can just get your package onto their computer automatically.

7:37But like people just wouldn't use things that didn't come sort of connected with something they already had on their computer. And because browsers are a universal computing platform, you know, I watched the birth and death of JavaScript back in like 2014 or whatever. One of the best talks ever. So good. Yeah, yeah, it's so good. And so I was very excited about the idea of like, oh, we should just make the software work in WebAssembly and ship it to the browser. And then mathematicians won't be able to like, complain that it's maybe takes some work to install. but then if you want to have powerful math software I wrote all the linear algebra stuff in Rust but then you don't really get that much control over it from Rust and you can make a GUI you can give people JavaScript but JavaScript is really a bit anemic in terms of for instance our logic have lots of tables of things that were indexed by tuples of integers and like you know, having a map in Python that is nicely indexed by tuples of integers is like, you know, you can do it in JavaScript.

8:41It's just it's just a pain. So I really wanted to get Python to be in my web application with everything else. And so I found out about Pyodine. And I started messing around with it, but it was really buggy and didn't work very well. You know, I mean, it was a sort of technical, you know, like demonstration. I mean, it showed a lot of promise because, you know, there was NumPy there running in the browser. So, you know, these binary extensions were working but um you know mike droopham did like amazing work at mozilla to get that working and i mean mozilla really created this whole cool chain on top of it um anyways i can maybe say more about that later but i found piedide and it was just a bit after mozilla killed the whole project so it wasn't you know um roman yurchak was like just barely keeping the lights on and i showed up and i was like here are all the things that are bad about what's currently going on it kind of expecting him to be like oh like you're an asshole go away but he was like oh well why don't you come fix those things and so it's so i so he made me into a maintainer it actually first took another math that i was working with on the same project uh dexter who who had some experience with open source and so he started contributing to fix the problems that i found i was like oh i guess i can contribute to this um yeah that's a great way to handle somebody coming and say i have these complaints it's like it's just saying go away.

9:59It's like, you know what? Here's how you can fix them. Yeah, right. Very productive. Right. They weren't defensive at all. They were just like, great, we want this to be better. Like, if you want to make it better, please make it better. And so then I got a National Science Foundation postdoc for math that I said I would improve mathematical computing software. And so I ended up spending most of that postdoc working on Pyodide. And then when I was leaving the postdoc, I got hired to Anaconda to work on their PyScript stuff. And then about six months later, I got connected to Cloudflare and they were interested in me working on making Python workers exist.

10:34That was obviously a very fun project. Yeah, and PyScript is such an interesting project. I don't know what the future holds for PyScript, but it's a very neat project. Yeah, it was really an interesting project. Actually, a lot of people first learned about running Python in the browser from PyScript, an offer on Pyodide. Yeah, it was a really interesting project. It's very unfortunate they turned into a maintenance mode recently, but they did a real great job. I know, it makes me sad. Maybe it's just taking a break. Maybe it'll come back in the future in some amazing form. I would love to see a React or a Vue alternative that just runs all on PyScript.

11:12But I don't think backed by Pyodide, backed by MicroPython, which would be, I think, a little more practical for web printing. But that is an alternate reality and a different thing that we're talking about. So let's begin maybe just a quick review of running in the browser. So the goal of Pyodide is to run wherever WebAssembly runs. Primarily, that's the browser, though it doesn't have to be. You can kind of treat WebAssembly a bit like a Docker type of thing, like an isolation level. You can use a JavaScript run. So it does not work in WASM time or these other WebAssembly only run times, but it should work in any JavaScript run.

11:47I see. So I could run it locally if I had, say, Node or Bun or something like that, maybe? Absolutely. Yeah. Okay. That's interesting. All right. So we have this WASM execution time, execution framework here. And the idea you all had is like, well, we have all these points of presence throughout the world with Cloudflare. How many places, how many spots does this run at? You all know? I don't know by heart. There's like a website you can go on and tells you all of them, I think. I think the number is above 350. Yeah, yeah, it sounds like, yeah. So that puts tens to hundreds on any given continent, right?

12:26So the idea is with these, kind of getting ahead of ourself a little bit, but the idea is like, well, what if we could take this Pyodide thing that is a miniature Python runtime and put it really, really close to all the users and execute it there instead of routing back, you know, somewhere in US East 1 or something like that, right? Yeah, precisely. I mean, you're giving the exact explanation that I think a lot of our marketing people would give, which is great. Basically, yeah, you want as little latency as possible for your users, right? So you want to run Python code as close to them as possible.

13:03And this is a very great way to do that. Yeah, and it doesn't run, to be clear, what we're talking about does not run in the browser of users like Pyodide can. And it runs in the edge nodes of Cloudflare that happen to be very near the users, right? So I think that's a big difference because it gives you access to an entire platform, like data and queues and all that kind of stuff that we're going to talk about, right? The way I like to describe it is like PyDid is kind of this crazy idea of like, we should put Python into the browser. And then Cloudflare is kind of this crazy idea of like, we should put the browser into the server.

13:38And so when you put Python into the browser and you put the browser in the server, that's a funny way of getting Python into the server. Yeah, as a mathematician by the transitive property, you click it all together. It sounds like a crazy idea though. Yeah. So let's talk PyDyde just for a minute before we dive in. Now that people see where we're going with PyDyde, let's talk about it a little bit because very recently, let's put some one month ago, Hood and JU2 gave a talk at Europython, which I thought was really interesting. Python Everywhere, the state of Python on WebAssembly. So this is a more general, not just Cloudflare worker type of story, but give us an update.

14:15What is the state of Python on WebAssembly? Things are good. It feels like there is less and less stuff that's going wrong. um so i mean i have these these python enhancement proposals to try and rearrange the governance of our code so that it can live maybe more of the stuff in the c python repository um but yeah i mean i i remember just a few years ago that there were always like crazy problems and and you know you know lots of confusing bugs and and it was like yeah like we got lots of bug reports that would just be like i have no idea what to do with this um but it feels like we really polished it a lot and i mean especially uh jay moved all of the package build system into external repositories and so the package build system is much less causing us trouble although it's still um still causing us some residual trouble, but now we have the PEP that says we can upload packages to PyPI.

15:23So it really feels like it's kind of making this graceful landing and approaching something that, you know, it will always take maintenance to keep up with upstream Python, but I'm sort of feeling like it's taking less and less in addition to that, which is nice. What's the situation or the state with Pyodide and Python on WebAssembly in terms of being officially supported by the core developers of Python. I feel like it's gotten some sort of build support acknowledgement before they were willing to ship CPython that Python and WebAssembly also compiles. Is that right? We're getting the details of it.

16:00Yes, so, right. So Python, sorry. So the platform we have is called Emscripten, right? This is the Emscripten compiler tool chain, which is this incredible thing that is front end for Clang and ships JavaScript system calls, JavaScript implementation of a file system. It's like a JavaScript Musa Linux that InScripten compiles to. And so we have to recommend that people go back and watch the birth and death of JavaScript because it tells the story so well, right? Yeah, it's one of the greatest videos ever, for sure. And so, okay, so InScripten is the platform and InScripten is tier three supported upstream by Python.

16:40and what that means is that we run it in CI and it's best effort people are allowed to break it and I come back and fix it and it's not a release block or they in fact do not make releases for emscripten the reason they don't make releases for emscripten is because they don't have really a version of like the OS module or for um for mscripten so they can't really do io very much they can't make requests you know they can't do http stuff um they can't receive user input and so in my opinion if you know we we build these these executables but no one would want to use it as as it is built upstream and so i have this proposal which is pep 818 which i just submitted a few days ago for for review by the steering council um which uh is supposed to rectify the situation and make it so that we can uh have basically useful um inscript in python binaries okay so the let me read the title of for folks it's pep 818 adding the core of the pyodide foreign function interface to python is this a little bit like the abi interface or cffi something like that it's it's a little bit like cffi or c types you know that the package this is going the top level import is going to be js types which is following c types um and yeah like the point of it is to allow calling javascript functions from python which is important because basically all functionality in a javascript runtime goes through javascript just like the way all functionality in linux goes through c okay excellent and this is in draft might be out next year maybe um so i i just submitted it for consideration.

18:33So hopefully in the next couple months, the steering council will make a decision on it. But you also have, and this one is accepted, is this is a big deal, PEP783, the Emscripten packaging. I think packaging is having a big moment in the Python space. We just have the very first packaging council, right? That election that came out and there's, You talked about Jay doing a bunch of work to get the build of the packages other places. I'm very excited about the Packaging Council because what they had before was not that functional. So whereas the people on the Packaging Steering Council, I think they're going to do a really good job.

19:12Yeah, yeah, yeah. One of the great people. Jay, what are your thoughts on this whole packaging story? It sounds like you did some work on it as well. Yeah, there's a long history about supporting packages in Pyodide and Python in the browser. and that PEP 783, 783 unscrupulous packaging is really a lifesaver for us because so from the beginning of the Pyodide, we wanted to support packages like NumPy or SciPy or MatBotlib, all those scientific Python packages that needs to be cross-compiled to WebAssembly because they have C codes. So if the package only contains the Python code, we can just run it because there's nothing needs to be compiled there or interpreted.

19:53it. But if the package has a C or C++ or Rust code inside, they need to be, you know, compiled into a platform, which is for us, WebAssembly or MScripten. So like, at the beginning, and until like 2025, we had to like cross compile and build all the packages in Pyodide CI to run them inside Pyodide. And I think like last year, we had around 300 packages that needs to be built in our repository. And it took like three or four hours to build all those packages in our CI. So even if you like make a little like one line change in Pyodide that needs to run CI for like three and four hours to build and it was very flacky because well, you know, Python packaging system is running some like Python codes in real time.

20:44And it's very fragile. So like CI was always breaking. So we really hope to make things done in package themselves. We don't want it to maintain all the packages ourselves. So we want, for instance, NumPy to build pirate ad wheels themselves and SciPy2. And so that was that PAP 783. And we had one more years of discussions to make it accepted, thanks to a lot of work by Hood. And we also standardized a lot of our build system so that people can actually easily build their packages into PyM scripting platform without setting up a lot of things in their machine. They can actually just use a CI build wheel to build PyMD builds in their CI.

21:36They just need to add one PyMD platform and that's it. They can build PyM scripting wheels in their CI. And that makes such a big difference, right? Because if you all were trying to take everyone else's projects and build it, I can't even imagine. I mean, it's one thing if it's pure Python, but if it's C or Rust and it doesn't compile to WebAssembly correctly, what do you do, you know? Right. Well, we have this horrifying compiler wrapper that rewrites the compiler arguments to fix all the problems. Right. We still have that. We still have it. It's not going anywhere. Cross compiling is still not easy, but it's all abstracted inside our build system.

22:12I mean, people will still face some issues, but most of the packages now just build, which is awesome. Yeah, this is one concern I have been going back and forth with Jay about is that there's still a lot of compiler regressions. So when we were doing the Python 3.15 update, and I was trying to get up to the most recent version of mscripten, and it was like I had to go up 10 releases, and almost every single one of them had like some weird regression in it that broke builds of some package. And so what's really still the big difficulty for us is that we need to make sure that we find these problems and then I can put fixes for them into our compiler tool chain or our tooling that says like, oh, there's this weird bug in the compiler, but if we edit the compiler arguments or we rewrite something a little bit, then it will go away and the users won't see it.

23:10Or we can go up to the compiler and say, like, you know, hey, like, let's patch this. Or, you know, I mean, I'm a maintainer of Unscripted now, so I can, you know, help drive it into a non-buggy direction. But my concern is very much that we could specify an ABI and a platform and then not find out that it's broken until downstream package maintainers start trying to use it. And so that's the one sort of big issue that we need to figure out is like, how do we make sure that we have confidence in our platform, which I think basically still means we have to carry builds for a bunch of packages just to make sure that we cover like all the different weird things that different packages rely on.

23:54Compilers have an amazing amount of surface area in terms of like what is expected for them to behave like. Dominic, were you going to jump in and say something? Yeah, I was just going to say that I think the main thing that this packaging PEP really brings is that it does actually enable packagers and maintainers of packages to actually build for WebAssembly and for Pyodide, right? And it doesn't really scale for Pyodide to be doing all of that themselves. So this is really powerful to help spread the load and help all these long tail of packages work on Pyodide. So much. I had pulled up PyPI here.

24:36We're coming up on a million packages. It doesn't make sense for you all to try to bring this in and do it yourself. So if it's possible for whoever wants to be on Emscripten and Pyodide and so on to just do that by setting up CI build wheel and setting a wheel there basically is awesome, right? Yeah, off the cuff, I think only about 5 % of those packages have any C++ or Rust in them. So luckily, most of them are pure Python and don't. Yeah, that's true. We're trying to track which packages have Python scripting wheels now. So there is a website called rwepap783 yet, which is created by another paradigm maintainer.

25:15And it's already a lot of packages have Python scripting wheels, and some of them we are still maintaining ourselves. but it's, yeah, like, like majority of the Python applications will depend on those like top 500 Python packages. So you're trying to support those packages. Yeah, so you can look through and see all the popular ones and go, okay, yeah, this is great. Yeah, the yellow ones are those packages are not supported yet. And the green ones are those that have the fence wheels and PyPI. And blue ones are those we are still building ourselves. Oh, interesting. That's what the blue means.

25:52Okay. And then some of them are just none for their wheel designation because they're pure Python. Setup tools is pure Python. Right. I guess it's probably worth pointing out that you all talked about this before, but just because something's pure Python doesn't mean that it's going to work on Pyodide, right? There's just parts that are missing because the runtime themselves are like, yeah, your OS thing, no. This comes from a browser or whatever, right? Or your raw socket support. I don't know about you. I am. Right. If the package is depending on some native things like threadings or multiprocessing or subprocessing, and the native sockets will not basically work in browser.

26:33If you're running in Cloudflare Workers or Node.js, they will work because Node.js have access to some of them. And still, threadings or subprocesses are not working, but some of them will work depending on the platform you're running in Cloudflare. Does async.io work? Async.io? Wait, that was a big project when I first started maintaining Pyodide was to make AsyncIO work because it was, you know, everything in a browser is async. So when there wasn't a good AsyncIO story for Pyodide, it was like really rough to use it because you had to just like.then,.then, you know. Yeah, callback, callback, callback, right?

27:08And, you know, at least in JavaScript, a Lambda can have like, you know, a multi-line body. And so like Lambdas are not that bad in JavaScript, whereas in Python, like Lambdas suck. So you have to do like death like a thing and then put it. I wonder if Python should have had multiline lambdas. I do kind of like them for. I think I think curly braces are the way. Yeah. Oh, you're going to call it. The developers would disagree with that. If I have curly braces, I can have multiline lambdas that I care way more about. You can have multiline lambdas without curly braces as well. But no one's ever figured out the syntax.

27:49That's why it doesn't exist. They have, actually. There are languages that do it. Backslashes, come on. It has to fit with the existing syntax of Python. So if you designed a new language, you could maybe make it work. I don't think we're going to be able to completely solve this curly braces or not problem. But Hood, I expected parentheses from you as a list person. Just parentheses, parentheses, parentheses, parentheses. I'm looking with parentheses, too. it. You know, I don't object. Like, Lisp also can have multiline lab. I can't do all the parentheses in Lisp. It's not going to work for me.

28:24What if you have new syntax? I do think there's interesting new syntax that can be added. You know, we've got the no coalescing or non coalescing operators and that kind of stuff possibly coming to Python. There will be things, but I don't think multiline lambdas are going to be one of them. All right. Let's talk about, we talked about a little bit, but let's go and just talk a bit about edge workers in general. Because we talked about you've got over 300 points of presence. They're all near the users. That totally makes sense. But maybe compare and contrast this with running on just a virtual server or in Kubernetes or even serverless.

29:01Because to me, it feels kind of serverless-like, but not. I mean, it is serverless, I would say. What makes you think it's not? Well, a traditional serverless, I guess. You're right, it is serverless. I'm thinking like AWS Lambda and that kind of. Yeah. So in my mind, AWS Lambda runs in a data center, like my Lambdas are set to run in US East one, or in Frankfurt or something like that. And in that way, it's not the same. I feel like these words like edge and serverless and cloud are all more like marketing terms than like technical terms. And so that leaves some vagueness about what exactly they mean.

29:35Yeah, I would, I would actually consider, I mean, workers in general to be more serverless than AWS Lambda? I mean... I do too. I do too. Yeah. Just because you don't have to worry about where you're placing your workers. They just show up wherever your users are, which is great. I think they're more serverless than Lambda as well. The only thing is that Lambda stole the, or claimed the term serverless before, right? And so I think it's worth a little bit of a compare and contrast, you know? So I'm a user I've written, or I'm a user, I'm consuming an API, open up, I don't know, a React front-end app, and it says, I need to do my work.

30:15I want to do it close to you. So what happens next? How do these things work? Well, you connect to your nearest point of presence. That nearest point of presence has the worker's runtime running on it. That worker's runtime has V8 on it. And V8 runs Pyodide in WebAssembly. Yeah. But as a developer, I don't make that choice, right? It's like a dynamic DNS choice that says, I know you asked for, I don't know, worker.claredfair.com slash whatever, but you actually get Southeast Asia in this location. And that's just kind of the magic of CDNs, right? Yeah. Okay. So let's talk this back up. I always describe this as being like a CDN, except for instead of with static assets, it distributes programs and then runs the programs on your data.

31:03Yeah. Okay. Okay, so let's talk about a deployment. Do I deploy my Python files? Do I do a local build and get a WebAssembly thing that I upload to you? How does that work? You don't build any WebAssembly things yourself. Like all the WebAssembly things are already pre-built. So the deploying Python workers is basically you write some Python codes. And you need to, if you're using some Python packages as dependencies, you need to install them through UV. So UV has a support for installing Python packages that are built for WebAssembly into your local files. Of course, you cannot run it inside your local machine.

31:38You'll only have a native Python interpreter, or you can use Pyodite to run it. So basically, we compress all your Python applications and packages into a Cloudflare web server, and it's distributed around the world. And the Cloudflare runtime will download the application and run it inside Pyodite and Cloudflare runtime. Yeah, awesome. What's the local dev story? Now, I hadn't really thought about that before, but I want to debug it, play with it. Yeah, so I push it up to you. Go ahead. Go ahead, Dominic. Yeah, so I mean, part of the workers runtime is open source as worker D, if you want to look it up with some GitHub.

32:17And you basically run that locally. I mean, we have like a CLI that wraps it for you. So it's nice and easy called Wrangler. But we're moving to CF now as well. But basically, you just run it locally. You edit the files of your worker. They get reloaded automatically. As you edit them, you just send requests locally and see what happens. Okay. Yeah, I'll be sure to link to the WorkerD project so people can download and install it. I'm sure it's in your quick start, though, right? Yeah. I think the very cool part of the Cloud for Worker's runtime platform is that the WorkerD is open source. So basically, you can run the same code in the same runtime in your local machine.

32:58and the prods. It can test everything that happens in prod in your local machine. Interesting. So this really is what runs on the edge when stuff happens, but you can just run it locally as well. Yeah, exactly. Yeah, I mean, that's pretty unique, right? Because if I was doing Lambda or I was doing EKS or something like that, it's not the same. I can install a Kubernetes cluster and run pods and stuff, but that's not the same as running in Amazon's Kubernetes service. And this sounds like it kind of is, which is pretty interesting. So let's talk about the platform a bit, because this, I was a little bit unsure of, or just don't have a ton of experience.

33:35So it's one thing to run Python on a point of presence endpoint sort of thing, but databases, is the database got to live at my data? I connect halfway around the world to Postgres and is that maybe not as good? So there's a bunch of interesting things as well. and see you all like numbering for your D1, R2 and so on. But I have this crazy fascination with SQLite right now. So this is especially interesting to me. So let's talk about some of these building blocks that not just Python workers use, but all of them. But at the same time, they're here for the Python workers now. And so that's pretty interesting.

34:12Who wants to introduce D1 to the world? Dominic. Sure. I mean, I can give it a shot. Um, so I personally love SQLite and I've actually been writing, um, web apps using it, you know, just even before running on workers, because it's so versatile and it's so easy to set up. You just, you just load the library and, uh, save the database on your local, uh, file system. And I think this is basically an extension of that. I mean, you just get a local to your worker SQLite database. You can write to it. It gets replicated across the world for you. So, you know, and it scales with your workers as well.

34:57You don't have to worry about that at all. That's pretty wild because you've got like 300 database nodes, which is pretty incredible. And for people who don't know, they might think of SQLite as a toy. It is extremely fast as a database. So it's pretty interesting, I think. Now, the one thing that seems tricky is somebody in Southeast Asia and somebody in London writes to the database at the same time. Now what? Yeah, to be honest, I don't know the details of how that works. But I think there is some mechanisms to make sure that it's all consistent and you can make sure there's no conflicts there.

35:34Yeah. Yeah, yeah. So something I've been looking at lately is Lightstream. I've actually been setting this up. So Lightstream is really interesting because it works on SQLite. And if you set up the write-ahead log, the wall in SQLite, it will basically synchronize and stream that write-ahead log off to somewhere else for backup and replication and so on. So I'm wondering, my first thought is probably they're doing something with the write-ahead log and then merging, synchronizing that and then merging, combining it or something like that. I'm not totally sure, but this is my theory. One of the great things about the design of Python workers is that we just consume these things.

36:11We don't need to know how they work. Yeah, exactly. It's awesome. All right, we got a couple more. Hyperdrive. So D1 is kind of SQLite. Hyperdrive, and this I think is new as part of your launch, right? This is kind of like distributed Postgres, but that wasn't available before. I don't know exactly, right? Something like this? Yeah, I think Hyperdrive is relatively new. And I think it's kind of the proxy. I think I can explain it as a kind of proxy that there is like a truth of source related database like PostgreSQL, MySQL, Summer, and Summer. And we have a lot of like proxies in the Edge that can basically like make your database connections a lot more faster.

36:51Like each, there's like 350 hyperdrives that like maintains the connection pool with the original database, like making the read and write a lot faster. Right, right. You can turn on caching to say, you know, This table doesn't change very often. So if you've read that table over here, then just answer questions from it, something like that. It's awesome. Yeah, I would just add to that. It's worth noting that we talked a little bit about sockets before and socket support in Pyodide. And that is actually what I think, Jay, you've been working on, right? Making sockets work on workers for Python.

37:27And that is what makes Hyperdrive work. Hyperdrive is built on these TCP sockets. So without that, it wouldn't work. Yeah, exactly. So supporting Hyperdrive in Cloudflare Python workers and in Pyrodite was one of the main goals for us before launching GA. And Pyrodite did not have socket support because browsers never had that. But to use the relational databases, you definitely need TCP connections and sockets. So we wired up the Node.js socket APIs inside Pyodide. So workers' runtime support Node.js socket APIs. So they are actually wired up inside Pyodide. So they're calling socket syscalls inside Pyodide actually calls a Node.js socket calls.

38:17So that's how AverageRub works. This is really crazy because the socket APIs in Node, of course, are all asynchronous. but most of the socket system calls that you have in Linux are synchronous calls. And so in order to handle the system call, the system call has to stack switch and let the JavaScript event loop turn so that it can get the IO completed and then it unstacks switches and returns to the... Yeah, that's wild. So this is all transparent to C code. So if you have a C application that consumes libc APIs to handle sockets, it just works. Yeah, I was kind of wondering if somehow you could unify the event loop of node and the event loop of async IO and kind of make them all one thing.

39:11So that's what we've done. So we have our event loop in Python, which we use for PyDig, which we call web loop. And it basically just subscribes to the browser event. And this is essentially necessary for two reasons. One is that all actual IO happen on the browser loop. Like there is really no way, like if you can make your own like separate loop, but like it can't do IO. And while it's spinning the real IO, it's blocking the real event loop, which can't do the real IO. Yeah. And I said there were going to be two reasons, but I feel like that was both reasons. Well, it sounds like an important one.

39:50Okay. So we also have R2, which is like S3-ish. Exactly. How is it different, though? Well, I think it's like almost the same. The name R2 actually comes from S3. It's like a 1 minus S minus 1 and 3 minus 1. I see. Yeah, so RS and then 3, 2. It's exactly the same. I think the main thing with it is that there's no egress fees. So it's cheaper. No egress fees. Okay, very interesting. All right. And you can use this. some of these things, I guess probably almost all of them, you can use regardless of whether you're using Cloudflare workers or not. I could use R2 just because I want object storage.

40:31I'm going to have to think more about that. It's giving me ideas. You've got Cloudflare queues and AI inference. I kind of wanted to go through these because these are the building blocks or the platform pieces that are available to these new Python workers. right? Yeah, we have a lot of building blocks inside Cloudflow. Developer platform, we keep adding it every month, so I'm not, to be honest, not following all those releases, but queues and AI and their workflows, things like that, that you can easily connect your workers with those new features and to build a full stack application. If you need a queue, you can use queue.

41:10If you want to run AI inference into Edge, you can use workers AI, which is awesome. Yeah, that's super neat. All right, let's go to the announcement. And here it is, September 21. Took us a little bit to actually press record, but it's been a few weeks, not too long though. This announcement by the three of you, Python web workers are now generally available. Hooray! That's awesome. How long had they been in beta style availability before that? Feels like since like spring of 2024. So I started in October of 2023 and it took about six months to get a beta going. and that it took like over two years to make it generally available.

41:50Wow. So what was that work? Like trying, for example, the IO loops and all the different, all the just the sockets that Jay worked on, all these things that you need in place. That's what like data science pyodied to full runtime pyodied work was. I think the packaging story was actually a big thing. I mean, when we started, we, so there was two parts to this. One was trying to make sure that the cold starts are as fast as possible, and especially when we're using packages. And when we started, we figured we'll just allow people to use certain built-in packages that Pyodite provides. But we just realized that that isn't flexible enough, and we just need to allow people to use whatever packages they want, ideally.

42:33So we basically switched away from that approach to building a UV based tool called PyWrangler, which lets you just install any package that you want and get it into your worker very easily. And then there's the memory snapshots aspect of it, which I think we might get to later. Oh, yeah. Oh, yeah. Memory snapshots were basically what I started working on as soon as I came to Cloudflare. I spent like like two months researching memory snapshots before I wrote like any code made any pull requests at all. Interesting. Okay. And you just gave a presentation at the Python Language Summit, also at your Python a little while ago, right?

43:09Yeah, right. So this was about the fact that there is an important difficulty that comes up with memory snapshots, which is that it introduces a difference between sort of startup time or sort of top-level execution and your actual runtime logic. And the Python language does not have a distinction like this, right? Like the Python runtime, when you start it up, it bootstraps itself. And then it just starts evaling user code. And whether it's top level user code or calling a function, it doesn't matter. Like it just evals until it stops evaling. And when it runs out of stuff to do, it shuts down.

43:54Yeah, even things like import statements are really code execution, not just linking or whatever. It takes a bit to wrap your head around it. It's just right. Like the import statement is compiled into something. And then like those op codes get like interpreted. And that causes import lib to go look up files on disk, find the thing that it wants to import. And then it like starts executing that file. And so for memory snapshots, you know, we say like, okay, look, all of that top level stuff, it's going to happen the same every time. So it's very wasteful to keep doing it every time someone's deployed an application to the edge.

44:32Like every single time it cold starts, it's going to execute exactly the same top level code and end up with exactly the same outcome. And so we would really like to just save that work. And this is actually very similar to the work that like optimizing Python compilers like PyPy and Grawl Python do, because they also want to evaluate all that stuff at compile time. This is like partial evaluation. So it's a bit of a different technology than a memory snapshot. But it has the same fundamental issue, which is that it needs to impose a model of like what is startup time, what can be precompiled onto a language that doesn't have one.

45:12Um, now, of course, you know, I think this is this is this this talk is like a fun thing to think about. But, you know, I mean, at least Thomas Vouders said that it was like a non starter. And I think he's right that like, you know, it's sort of too late for the language to get something like this. But I have friends that are working on on, you know, new programming languages. My friend Antonio Cooney is trying to make this language called spy, which stands for static Python, which is supposed to be like a better R Python, which was used for PyPy. And basically, the main idea in some sense of the language is to pre-bake a notion of compile time versus execution time, and then allow lots of compile time evaluation of spy code so that it can perform that.

45:59Yeah, the basic idea is something like you're going to load the interpreter, it's going to load all the standard library, it's going to maybe read some of the files, parse them, do the import processing. And that never changes, right? Well, maybe the import because it depends if you run code or not. But other than that, you theoretically could say, let's just see what happens. And like a VM, just go, your memory's back, continue. Yeah? Right. And of course, there's a lot of subtlety in there because we have, like for instance, if you import a dynamic library, it does all this relocations, it allocates space for all the global variables that the dynamic library is going to define and then it relocates them all into that space and it relocates all the functions from the dynamic library.

46:46And somehow you have to do some crazy magic with the dynamic loader. Basically, I have a loader patch that when it loads a dynamic library, it writes down the relocation base that it's putting the dynamic library at. And then when I'm going to restore the memory snapshot, I have to make sure that it gets relocated to the same place. So I patch the malloc so that it will, instead of actually doing a memory allocation, it just looks, oh, in this context, I'm allocating memory for this dynamic library. In the snapshot, we allocated it at this address. So we're going to play back that address. And then, like, all this crazy magic just sort of.

47:23That sounds supremely complicated. It's very, it was a lot of fun. It's really horrible. All right. So let's go back to the announcement. So there's a couple of code samples and different types of things here. So programming model is a little bit like writing an API, yeah? Yeah, I think the major usage of workers' runtime is writing an API server. So we used Face the API a lot in our examples. So a lot of Python users might use Python in different ways, but I think the major use case of workers' runtime is to build an API server and connecting different bindings in it. So yeah, that's the examples we show in our flow post.

48:02Yeah, you want your API to be super snappy and responsive. So if you could put your data in D1 and then have your code also run right literally in the same process right there, that's going to be really great. So if you know how to write a fast API app, it's the same thing. Just instead of uveacorn.run, it's just hand off the app and off it goes, which is really, really neat. Now, the examples that I saw on this page, I don't remember, I'm pretty sure they all have like one request, just like forward slash. Can I have a more complicated app with, say, five or six different endpoints? Yeah, that's just for sure, right?

48:40Like, you know, you can make any fast API app you want here, right? Yeah, there is no limits to how many endpoints you can have. I suppose it might be worth talking about the actual limits that the workers have. And that is, yeah, so it's memory, which is 128 megabytes, and CPU time as well. You know, if I think actually a great thing about workers is that you can do quite a lot for free, like completely for free, you don't have to pay anything to Cloudflare, you can run a very simple fast API application, even I think for free. um it's just if you're free request limit is like 100 000 requests a day is that right yeah yeah you you get 100 000 requests uh i think per day and yeah if you if you type in workers limits um into google it should show up um but if you you know if you're just doing kind of more cpu intensive stuff then um that that is another limit that we have yeah it's it's basically there 10 milliseconds for free of cpu time and five minutes for paid um but yeah you can you can you can do quite a lot.

49:42It's very, very flexible. Right. Speaking of what we were doing for those two years, another thing that took a lot of careful work was making sure that when you run out of that 10 milliseconds of CPU time, that a signal is delivered to the Python runtime, and it gracefully interrupts its execution and returns to Cloudflare so that it doesn't like leave it in a broken state because if you do this the naive way uh javascript throws an uh non-catchable exception into the runtime and forcibly unwinds all of the call stack without executing finally blocks or you know catch blocks and so like any locks that you've taken that you were expecting to release in a finally block that just doesn't get executed and then the runtime it's like completely broken um and so or or like half written files that are not the buffers not flushed, all sorts of things could go wrong.

50:32All sorts of things, you know, like loss of code relies on finally blocks executing and it was not executing the finally blocks. And so we had to like do some very elaborate thing to make the CPU time limiter deliver the signal correctly to the Python mscripted operating system inside of the runtime. Of course, we had the same problem with Rust workers. So we basically have the same solution for both Python workers and for Rust workers for that. Right. As you start to bring in more languages, you're like, oh, this is kind of the same problem. Yeah. Okay, this is great. You've got a lot of computer.

51:05100 ,000 requests a day for free? That's a lot. You can do a lot. Many mini little hobby apps and small apps live well under that limit. Right. I think the good part of Cloudflare for hobby developers is we have really generous pricing. I don't want to be too marketing pitch, but I also used Cloudflare when I was a student because they really offered a good pricing. You can You can have like 10 gigabytes of R2 for free, I guess. So there's a storage, there's a runtime, there's everything you can use freely. Yeah, well, and the storage is one thing, but the egress, that's where you pay money often for S3 is you pay tons of bandwidth charges.

51:45So yeah, very neat. All right, let's see. Let's go back to this. So first class language, really good. Fast API, Django, Flask. Does it basically run anything that does WSGI or ASCII as a, you just return that? You know, like, of course, there could be problems with them trying to start threads and things like that. But assuming that they don't try to start too many threads, then like, you know, we have a general purpose ASCII and WSGI adapters that you see here. Okay. You know, that was one of the best things that happened to Python web, right? That you got this interface that you can plug into all these different runtimes, and it sounds like you're as well.

52:23It's amazing for us, yeah, because they don't try to do IO directly. And so, you know, I mean, That's exactly the problem we have with something like URLub3. Of course, URLub3 specifically supports Pyodide, so it's okay. But its normal way of doing I.O. just doesn't work. So it needs a separate path for Pyodide. And all of these things would need that if it weren't for these beautiful adapters. Yeah, they're super polished and optimized. It's really nice. Yeah. Let's talk. We only got a couple minutes left before we're out of time. It's late in some places, early in others. So let's maybe round out this conversation by the types of apps that you see people building in Cloudflare workers in general, and specifically also in Python.

53:06Everyone knows what an API that talks to a database looks like, but can I do data science work here? Can I do long-running work? What types of things are people building here? A lot of the workers that I've looked at are big piles of boring business logic. So it's just a mess, and it does apparently what they are needing. So I would not recommend data science, right? Like it's not really like a platform that has a lot of computing power. You know, if you want to do things like graphics cards, SIMD, like it doesn't have any of that. But it's a very powerful platform for... Well, look, that's totally fair.

53:44And I think that's one of the things I was trying to kind of explore is, right? Like how far can you push it before it just starts timing out or whatever, it runs out of memory. But what if I'm... Let's say I'm a researcher or a student and I've got a pandas or just a parquet file with 20 ,000 records. And I do basic like, here's a, let me do a little bit of query on that. Then I'll draw a graph or whatever. It can in principle do stuff like that. Yeah, that seems like it might work. Right. You can load pandas. You can load, you know, whatever the parquet package that is popular now is. And, you know, I mean, just the packages, you know, if you start, you know, like for instance, scipy is just too big uh too horrible and it doesn't really work to to to import scipy i mean scipy when you when you bring it in it has like over a hundred different tier libraries you know um yeah scipy has been like like a real journey for for us in pi and i'd like it's really like the most horrible package but but but if it's not scipy you know pandas works and and you you can just load your parquet file and show your graph as long as it's not too big.

54:56Well, in my opinion, like Pandas or DuckTV or other data processing libraries are not very optimized for Python workers. It's because there are different, like the concept is a little bit different because workers is very memory limited environment. So we basically recommend everything to run in streams, not like load a bunch of memory, like lots of data frames inside memory. More polars, less pandas type of flow, yeah? Yeah, more polis, not pandas. If you need to load all the data frames in your memory, it won't fit. You need to do streams. But actually, Python packages are, especially legacy Python packages, are not very optimized for that.

55:33So you will need to do a lot of back and forth to make it work properly. Right. Yeah, I mean... Go ahead. You go. So we're talking about Pyodide and WebAssembly. Another way, if I was this theoretical person I was describing, wanted to put this stuff on workers, Maybe what I do is I just put my Parquet file and my WebAssembly stuff on CloudFlare and just put it on the front end, right? You could run it like a Jupyter Lite style of execution. And then everyone gets their own little browser runtime instead of Edgeware runtime. Lots of people are doing exactly that. And then, of course, all of the compute is paid for by the end user.

56:10Exactly. That's your iPhone battery or your iPad battery or whatever, rather than your compute bill. because setting up that kind of stuff is really tricky for researchers who are not developers and they're not DevOps people. They're just like, I just want to share this thing, right? So maybe that's the way to go. All right. I've talked to so many people who are doing that, like sharing their data science notebook, like instead of having to have a Jupyter notebook and then they make it and then their collaborators don't have the right things on their computer or it doesn't quite work. You know, this is exactly the same sorts of problems I saw in math all the time.

56:45and these internet-based tools are just so great for them because it really is what happens with a math or science project is there's a lowest common denominator effect where the technology you can use in your research is only the things that the least technically competent person in your group can use because if you can't get it onto their computer and get it working for them then they won't be able to productively contribute to a project that needs it. Yeah, yeah. And you're looking over at your 67 year old thesis advisor who still thinks Fortran is like the hot stuff. And you're like, Oh gosh.

57:23So some of these people literally like, it's like they have, they, they like dictate to their secretary and like, they've never touched a computer. And some of these people like contribute to the Linux kernel like regularly. Yeah, exactly. They both look like a 67, like nerdy mathematician, but like just like the forest ends of the scale of like confidence with computers. It's incredible. All right, you guys, let's call it there. There's a lot of stuff that we could talk about. I guess one really, really quick thing I just want to give a shout out to is this memory snapshot stuff that we talked about.

57:53Hood, you all are using that for basically increasing the startup time, the cold start time. We want it together. Sorry, you're right. Increasing the speed, decreasing the time. Yes, I've blended those together and that doesn't work. So just that's part of the mix, right? That's absolutely right. It's to not do that startup stuff again. Yeah, awesome. All right, final thought. I'll give you all a chance to give a quick shout out to listeners who are like, huh, this is interesting. What do I do now? Dominic, you're first. Well, I was just going to say, actually, I think the best thing for workers is IO-bound applications.

58:31If you have something that's pushing a lot of bytes or isn't doing a lot of CPU with them, then give it a try. I think you'll be surprised how far you can go, how many users you can handle, even on the free tier. And yeah, just check it out. Type in Python Workers into Google and give it a try. Well, yeah, I will also say just give it a try because I'm already running a lot of my hobby applications in Python Workers. It's working really well. So please go give it a try. If something doesn't work, please let us know in our Discord and we'll exit. And I just want to advertise to anyone out there that WebAssembly is like a really cool ecosystem.

59:09There's a lot of missing pieces in terms of like fundamental computing. So if you if you like operating systems, if you want to think about like how LibC works or, you know, low level details, and, you know, you feel like Linux works too well for you to get into them, like, I think WebAssembly is a really great space, because a lot more of that stuff is just like no one has ever even tried to make it work. There's not that much effort. The total number of people working on it is quite small. So there's lots of open niches. And if you find something that you wish worked that doesn't work, you can just sort of wedge yourself in there and fix things.

59:45So I think it's a great space. Excellent. All right. Thank you all for being on the show. I learned a lot. I didn't point out at the beginning, I should have, that I'm a complete newbie at all this edge worker stuff. So it was really interesting to get a look into it. And it's awesome to see it come into the Python space. See you all later. Thank you. Thank you. This has been another episode of TalkPython to Me. Thank you to our sponsors. Be sure to check out what they're offering. It really helps support the show. Tomorrow, Wednesday, November 4th, we're having our first tech meetup, our live tech event as part of TalkPython membership.

1:00:18If you're not yet a member, well, join up and support the show and get an awesome community and experience to boot. Just visit TalkPython.fm, click membership in the nav bar, and you'll be off to the races. If you are a member, we'll be talking about TalkPython in production and some really wild new ideas that I'm exploring. I think you'll find both fascinating and actually really practical, but no one's doing it. So join me on Wednesday, November 4th. And if you're listening to this after and thinking, Michael, why did you just put this in here? Nobody can listen to it because most people listen to after.

1:00:51These tech meetups come with recordings. Just visit TalkPython.fm, click on membership and then browse past member meetups and you'll be able to get it. So hopefully either you can join live or you can join afterwards. Become a member, support the show, join the event. If you or your team needs to learn Python, we have over 270 hours of beginner and advanced courses on topics ranging from complete beginners to async code, Flask, Django, HTMX, and even LLMs. Best of all, there's no subscription in sight. Browse the catalog at talkpython.fm. And if you're not already subscribed to the show on your favorite podcast player, what are you waiting for?

1:01:27Just search for Python in your podcast player. We should be right at the top. if you enjoyed that geeky rap song you can download the full track the link is actually in your podcast blur show notes this is your host Michael Kennedy thank you so much for listening I really appreciate it I'll see you next time

1:02:00Oh, we tapped into that modern vibe overcame each storm. Talk Python to me, I sync is the norm.

From the publisher
Where does your Python code actually run? A server in Virginia? A container in Frankfurt? Pyodide put Python into the browser. Cloudflare put the browser into the server. Combine the two and you get Python Workers, now generally available. My guests are Hood Chatham, Gyeongjae Choi, and Dominik Picheta from Cloudflare. Hood and Gyeongjae maintain Pyodide. Dominik got Python running in Cloudflare Workers in the first place. Your FastAPI app ships as plain Python files. It runs on CPython compiled to WebAssembly, inside V8, at over 350 locations worldwide.

Episode sponsors

Talk Python Membership
Talk Python Membership
Talk Python Courses

Links from the show Guests
Gyeongjae Choi: linkedin.com
Hood Chatham
Dominik Picheta

Pyodide: pyodide.com
Python Everywhere: The State of Python on WebAssembly - Hood Chatham, Gyeongjae Choi: www.youtube.com
PEP 783: peps.python.org
D1 Databases: www.cloudflare.com
Hyperdrive: www.cloudflare.com
R2 Object Storage: www.cloudflare.com
Queues: developers.cloudflare.com
AI: www.cloudflare.com
now generally available: blog.cloudflare.com
Memory Snapshots for CPython (Python Language Summit 2026\): blog.python.org
Cloudflare Worker Limits: developers.cloudflare.com
Litestream: litestream.io
workerd: github.com
Are we PEP 783 yet?: pyodide.github.io
The Birth & Death of JavaScript: www.destroyallsoftware.com

Watch this episode on YouTube: youtube.com
Episode #568 deep-dive: talkpython.fm/568
Episode transcripts: talkpython.fm

Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong

---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython

Bluesky: @talkpython.fm
Mastodon: @[email protected]
X.com: @talkpython

Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @[email protected]
Michael on X.com: @mkennedy