Learn Python with Talk Python's 270 hours of courses

#367: Say Hello to PyScript (WebAssembly Python) Transcript

Recorded on Thursday, May 12, 2022.

00:00 Despite Python being overwhelmingly popular and reactions to it positive, there are major areas of computing where Python is not present, most notably on mobile and on the front end side of the web. Py Script, a new project launched by Fabio Pliger from Anaconda, just might change that. It was made public and announced at PyCon just two weeks ago by Peter Wang and now has over 10,000 GitHub stars. But what is hype versus reality versus projected hopes and dreams? We're going to find out on this episode. Fabio is here to tell us all about his new project. This is Talk Python to Me episode 367, recorded May 12, 2022.

00:53 Welcome to Talk Python to Me, a weekly podcast on Python. This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy and keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via @talkpython. We've started streaming most of our episodes live on YouTube, subscribe to our YouTube channel over at talkpython.fm/Youtube to get notified about upcoming shows and be part of that episode.

01:19 This episode is sponsored by Microsoft for startups foundershub. Check them out at talkpython. Fm/foundershub to get early support for your startup, and it's brought to you by us over at talkpython Training.

01:33 Did you know we have one of the largest course libraries for Python courses? They're all available without a subscription, so check it out over at talkpython.Fm. Just click on courses. Transcripts for this and all of our episodes are brought to you by AssemblyAI. Do you need a great automatic speech to text API? Get human level accuracy in just a few lines of code? Visit talkpython.fm/assemblyai.

01:57 Hey, before we jump into the interview with Fabio, creator of Py Script, I want to just tell you really quickly.

02:02 About this new Youtube video I made.

02:05 After chatting with Fabio.

02:06 But before this episode is released, I decided to play around with Py script some more.

02:12 It's really cool.

02:14 Turns out that one of the things.

02:16 There's not a great example for is.

02:18 How do I take and build a

02:19 Regular web application, something you might do with Vue.js or something like that with.

02:25 Py script using Python on the front end?

02:28 And is it possible to actually avoid downloading the CPython runtime as WebAssembly that comes out of Pyodide and all those things and make your code sort of installed locally and run really fast and have actually a pretty great user experience? Well, it turns out the answer is yes. So I put together a 30 minutes demo tutorial that over on YouTube. If you want to dive in a little bit and see that in action after you listen to this episode, be sure to jump over to YouTube. The link is at the bottom of the show notes in your podcast player on the Episode page. Head on over to my personal YouTube channel and check out that video. I think you'll be pretty impressed. And it'll just make you want to do more stuff with pyscript, I'm sure. All right. Let's chat with Fabio about pyscript.

03:12 Fabio, welcome to Talk Python to me.

03:14 Thank you. I'm really happy to be here.

03:16 Yeah, you're welcome. And I'm excited to have you here because I am quite excited about the Py script announcement that you have put so much work into. I'm very excited about the possibility of finding Python in other places than where it has really great strongholds. For as much as Python is the incredible growth of Python that stack overflow blogged about in 2017 and all the growth in different metrics, but by some metrics, first, most popular language or second, depending. But for all of that, there's still very notable places where Python is not. And what you're working on has the possibility to unlock one or more of those places or a whole different set of contingency the people of data scientists, web developers, UI developers, maybe just for desktop. Even so exciting.

04:08 Yeah. I think it captured a lot of the things behind the project. Really happy to talk about all of those because that's the reason we started it.

04:17 Yeah. And it's super exciting. There's been some attempts at this, and we're going to get into I want to sort of start our conversation about the history of what has come before and so on. Before we do that, let's just hear a bit about you. How did you get into programming?

04:32 In Python programming, I was being curious about a lot of things and probably doing too many things still today, early on, I got into programming through friends who had computers and Commodore or things like that. We would hop on.

04:50 My dad at some point bought a I don't even know the version. It was like similar to Commodore, but it was in Brazil, Gradient, MSX or something. It wasn't local, like a national branded computer, but it allowed you to jump in and do basic stuff and programming. So I remember trying to play with my friends and try to code games. Of course, we never get anything done, but I always been passionate about computers and games and stuff like that. So enter college, computer science degree training to become a game developer also never happened because I got I think it's.

05:27 Really interesting that so many people want to get into game development, and then they kind of see the sort of grinding mode of that industry. Right. It's like both fascinating and has this great pull and you're like, but it's really hard on humans as well, right? Yes.

05:40 It's very hard industry and very competitive. My brother is an indie game developer, and a lot of sleepless nights and working hard trying to get his thing out there.

05:55 And through life just life happens. I met my now wife and started to be a little more serious about gaming is great, but also need to make plans for the future. So I ended up graduating and started to work for a company that automation, like machines, automation in big industries. Many own Pharmaceuticals. And I worked there for a while and I was in the team that would develop high level applications for analytics and we would usually do for big pharmaceutical production lines. So providing all the charts and everything they need to say this production batch is valid for whatever FDA or whatever entity is approving them. A lot of paperwork, a lot of things. Eventually, at some point my unit became a big part of the company. So at the time of the company asked, hey, do you want to start up, spin off of our company, just focus on software. So I did that.

06:58 That sounds like a pretty fun challenge.

07:00 Yes.

07:01 Do a startup without quite the risk of actually being a start up.

07:05 Yeah.

07:06 You're going to get paid, you know what I mean?

07:07 Yes, you're going to get paid. Also, I think the start up reality in New Italy, I was still in Italy at the time is very different from here. It's really hard to have investors or to collect money. And basically it boils down to you investing in your own company and then trying to get profit within a number of years.

07:30 Okay. It's got to be way more bootstrap, self funded sort of thing.

07:34 Okay. Yeah.

07:35 Do you think that's changed or is that still the same?

07:37 I think it's changing, yeah. The last ten years, I think a lot changed just from like the industry in general became way stronger in Europe as well. There's a different mindset and I think culturally South Europe has a sculpture of a different way to see money and investments compared to the US, for instance.

07:58 Sure.

07:58 But eventually this experience led me to the Python community. Early on, I actually got into Python, not by myself. I heard about the language. I was curious, but someone within the company said, oh, the son of this customer is really big in the Python community who could help us see if it's a good fit for our use case. And it was around early 2000, maybe 2002.

08:25 One pretty early days of Python, really.

08:27 Yeah. And early days of scientific Python as well.

08:32 The whole separation between Num Array and NumPy, numeric, all of that. So I love the language. I started to use it in our tools. It was a funny time where it was definitely unknown as a language and to get into big companies, it was a little tricky on the QA point of view, but it was interesting. Eventually I started to get more engaged with community, started to go to meetups in Italy and everything. And then I think it was around 2004 or five, I started to go to my first conferences in Europe. Love the community, started to how can I get involved so at that point, later, late 2000 s, I started with a bunch of friends in the Italian community. We started the Python Italia Association, which is basically non profit trying to push the language. And the main focus was organizing the PyCon Italy conference. We started in 2007. Also that great community, a lot of work, but also pay back. I remember the first year we were like, let's do this thing. We're very passionate and we end up negative and all the members of the society. Yeah.

09:48 So just to say that big props to everyone in the community doing a lot of the community work because it's a lot of work and it often is not paid or can even be out of each one.

09:59 You might have to pay to do the work.

10:01 Yes.

10:01 Like the opposite of getting paid.

10:02 Yeah. Long story short, I started to be also more engaged with the European Community and we organized EuroPython in 2011 for three years in a row. And that got me into the Europa Society, eventually became chairman of that, which basically means your Python Society is this European nonprofit that pretty much in line with the Psf in different ways, but tries to engage with community organized conferences, raise some money to invest back in the community through grants and things like this. And then I did that for a number of years. So eventually back in the day when I was starting to learn Python, I also started to use a lot of the scientific libraries. And one of them was Chaco, which was a graphic plotting library for Python that Peter Wang developed with Brian Van Evan. I think he was in the show.

11:01 Peter Wang, being the CEO of Anaconda.

11:05 Yesterday, is the CEO of Anaconda. And we met for the first time in person at EuroPython in Florence. And he was like, okay, we know each other from the Internet for a while. Let's get more involved. That year, I was still trying to make my company be successful. It wasn't the right time the following year, but with Travis Oliver Fund, the other founder of Anaconda in Berlin, we just figure out like we're doing a lot of things that are similar, we're passionate about the same thing. So I eventually joined Anaconda in 2014 and then eventually the following year I moved to the US, joined the company full time.

11:42 Fantastic. Well, it's quite the journey.

11:45 Yeah.

11:45 This is an interesting language. Let me just start participating in some of the meet ups, meet ups become conferences, conference become continent wide conferences.

11:53 Yeah.

11:53 I think it's a pretty good takeaway for people who want to get more involved in the community. And every one of those steps probably didn't feel massive other than maybe moving to the US and joining the condo. But they all probably seem like really iterative and sort of incremental. But at the same time it builds up this really cool place where you're maybe building amazing Python things in the browser in the conda, right?

12:17 Yeah. My experience has very much been what a lot of people say. You come from the language, you stay for the community. That is really my experience.

12:27 Anaconda allowed me to work on a lot of interesting things. Like, as you said, Python in the browser is the outline project. But when I joined, I started with being a core developer for Bokeh, which had some of that bouquet is a visualization library for Python on the browser.

12:42 And with your project, you have now you can still put Bokeh in the browser.

12:45 Exactly.

12:49 Yes, exactly. Even more in the browser than before, I guess. All right, let's dive in now before we dive in real quick, since you talked about gaming and want to be in game development and your brother and so on, have you watched the documentary Power on the story of Xbox?

13:02 I haven't. No.

13:03 This is a documentary that came out. It's a four hour show. You can watch it on YouTube, and it's like the history of Xbox. If you're just into like tech history documentaries, this thing is pretty interesting. But let's not talk about games. Let's talk about The Birth and Death of JavaScript.

13:19 Have you seen this presentation?

13:21 Yes. Great talk.

13:23 So good, isn't it?

13:24 Yes. One of my favorite funny talks.

13:27 The reason I bring this up is there's a lot of interesting building blocks that I suspect many people in the Python community are fully unaware of. There's been all these developments over in the JavaScript world. And Gary Bernhardt did this talk at PyCon 2014, The Birth and Death of JavaScript. No, I'm not mispronouncing it. That's how it's done in the talk. It tells this hilarious story of the future of weird human evolution and programming and JavaScript and how we don't do JavaScript, but everything is JavaScript. But what is the underlying theme is like an actual interesting technical history, how people started doing crazy stuff with JavaScript pre WebAssembly. So there were compilers, like in script that will compile C Code to JavaScript. And then the JavaScript jits have become so fast. So one of the examples was like Chrome running Firefox, running something else, like maybe like an embedded Windows. I can't remember what it was, but just there were like layers and layers of JavaScript doing wild stuff that we wouldn't imagine otherwise. Right?

14:28 Yeah.

14:29 And I think that's part of also one of the reasons with either we said, okay, this is the right time to try this out because the browsers became so powerful. And so they are basically, if you see from a different perspective, there are many virtual machines. They have their own file system, they have their own isolation, networking. A lot of the things you can really see that as a VM, like.

14:54 The JVM, like the .netCLR, and to some degree, like Python. Right, right. To CPython on a regular machine yeah.

15:01 You can run full operating systems on top of the browser. And honestly, the explosion of interesting things in the last few years have been crazy and doesn't seem to decelerate at all. So the level of maturity is kind of encouraging.

15:16 It is. And the performance, while not native performance, is not that far off. At least some of the examples that Gary gave, it was like 50%. You could run Doom at 50% speed when you compile it to the browser or something insane like that, right?

15:31 Yeah, it's good enough.

15:32 It's more than good enough. Yeah. I mean, because the alternatives so often is, well, we're going to send a request over to the server, and that might be native and fast, but it's also network latency and it's also a shared compute resource with a thousand other people. And here you are sitting on your MacBook Pro Max with 16 cores and you're just waiting.

15:51 Yeah. That's actually one aspect that a lot of people don't consider the performance in terms of how fast it goes. But there are a few aspects that you also need to consider overall and the overall experience.

16:07 How long for the developer side of point of view, how long before they can actually get in front of something usable or speeding up their environments and things like this? Then there's Loading time versus execution time, also very different, but from the eyes of the user, it kind of sums up there are so many small niches or small verticals that we can work on in the whole JavaScript or browser ecosystem that I think we can make a lot of improvements the next few years.

16:37 Yeah. You think of grid computing and distributed computing. Part of the power of the cloud is that I could just go say I need more. We have four servers, but a bunch of people showed up. So give me 20 servers and scale my Kubernetes cluster across that for now. And four to 20 is amazing. But four to 100 million is really different if we can push a lot of that compute to everybody's. Personal computers, even our iPhones, are like unimaginably fast little devices, right. Like the whole in one crazy transition is basically an iPhone chip with more voltage and better cooling. Right. There's not much more to it than that. So finding ways to execute more of our code on the clients, it's pretty interesting.

17:25 Yeah, I totally agree. We already see that even on the server side, projects like Dask, we're very popular pushing computing on nodes and the distributed architecture. It's very powerful and it's needed. We can have the possibility to make the same thing on the client side on the browser as well.

17:43 Yeah.

17:44 Desk for those out there who don't know, is a pandas like NumPy like API that you can just say, but run it distributed across these machines on the cluster automatically.

17:56 Matthew Rockland started coiled and former Anaconda alumni, a lot of tie ins there.

18:02 Yeah, cool.

18:04 It's not the same thing in any way, but it is a way that really takes Python and gives it way more compute resources potentially.

18:12 Are there any particular sort of set the stage with this compile to see and stuff, but is there any other sort of building blocks in the history of how we got to what you all built in the JavaScript stack that you want to call out?

18:25 Yes, definitely. I think one major thing that I want to give props as much as we can do, Piodide project, which is a runtime for Python on the browser. And they've been extremely like. One of the reasons we could work on pyscript was because it has a level of maturity and performance right now that is really stable. And actually, also they're a great community, very supportive. So a big shout out to them, Hood and Roman, specifically the two main core developers and the whole work underneath that project as well. Like the progress of the WASM and WebAssembly. There's a huge community behind that. So actually, that's one of the principles that we try to at the core of our script is we don't want to reinvent anything that we don't need. We want to be really additive to the ecosystem, glue things together, provide nice and easy APIs and high level API so that we can lower the barrier, basically give more accessibility to the tools to the users, rather than reinventing something it's not needed. Yeah.

19:40 So Pyodide, this project is a cool project. I interviewed Michael from the project about this way back a couple of years ago, but yeah, it uses this em scripting and WebAssembly story to basically compile a Port of CPython to run in WebAssembly in the browser, which is fantastic, right. To some degree, that's the building block that you all really needed, right?

20:09 Yes, definitely.

20:11 I must mention also Michael Joplin and Christian Heinz, who has been also pushing a lot of the Python on WASM ecosystem. Yeah. There's a lot of good energy in the Python community to actually try to push that together, right?

20:27 Yeah. And also Brett Cannon has been a big proponent of making that happen. I don't know how directly he involved with the day to day like let's make it compiled, but I know he's been really pushing on that effort as well.

20:40 This portion of Talk Python to me is brought to you by. Microsoft for Startups Founders Hub Starting a business is hard. By some estimates, over 90% of startups will go out of business in just their first year. With that in mind, Microsoft for Startups set out to understand what startups need to be successful and to create a digital platform to help them overcome those challenges. Microsoft for Startups Founders Hub was born. Founders Hub provides all founders at any stage with free resources to solve their startup challenges. The platform provides technology benefits, access to expert guidance, and skilled resources, mentorship and networking connections, and much more. Unlike others in the industry, Microsoft for Startups Founders Hub doesn't require start ups to be investor backed or third party validated to participate. Founders Hub is truly open to all. So what do you get if you join them? You speed up your development with free access to GitHub and Microsoft cloud computing resources and the ability to unlock more credits over time. To help your startup innovate, Founders Hub is partnering with innovative companies like OpenAI, a global leader in AI research and development, to provide exclusive benefits and discounts through Microsoft for Startups Founders Hub. Becoming a founder is no longer about who you know. You'll have access to their mentorship network, giving you a pool of hundreds of mentors across a range of disciplines and areas like idea validation, fundraising, management and coaching, sales and marketing, as well as specific technical stress points. You'll be able to book a one on one meeting with the mentors, many of whom are former founders themselves. Make your idea a reality today with a critical support you'll get from Founder's Hub. To join the program, just visit talkpython.fm/foundershub all one word the links in your show notes. Thank you to Microsoft for supporting the show.

22:31 Let's get to your announcement. I mean, I didn't go to PyCon this year. Mostly just not ready to be in a room with people from around the world for that long and give the world a chance to try it out. Then I'll see how it goes into it next year. But I missed everyone there, but I got a lot of messages. One was friends saying, Why aren't you here? Why can't we have a beer together? Sorry, I really missed that. And then the other is, have you heard of pyscript? Oh, my goodness. This was the announcement. If there's any big piece of news that came out from presentations and talks and announcements like, this is the one. So Py script people can guess, but what is it? Tell us about this.

23:08 So pyscript is a framework that allows users to basically use HTML Tags to define to run Python code and define different components. Those can be related to executing code, but also defining your environments, what packages you want to install, as well as some UI components that make things easier for users that are not familiar with HTML and CSS and all the styling of things. It's based on a Python runtime which is Py Iodide that allows Python execution on the browser, and it has interoperability capabilities with JavaScript as well. So you can use both Python libraries as well as JavaScript libraries in your code.

23:59 Yeah, this is really great. And if people go to PyScript.net and scroll down, what is pyscript? It really calls all these out. Like, if you're trying to present this to your boss or your team, you're like, this is something cool. We should check out. They should definitely go to that list right there.

24:12 Yes. That is the most immediate list of things. There's a lot that we're working on and trying to provide as a tooling, but it's very new and very green.

24:27 So maybe don't totally release a product on it just yet.

24:30 Yes, definitely very bad idea to release a product this expect API code and features to change. Actually, one of the things that we intentionally talked about before Python was should we have a versioning in place or something like this so that you would expect any project to go that goes out there to have versions and everything? We intentionally said, no, let's wait because it is or let's put a version like do not use inproduction zero 0. negative one. Yes. Mostly because with this we wanted to have something that is working that is useful, that it can be used by and hacked on by users day one, but also give the vision that we have in mind and for people to see the possibilities. And that was the main focus for the project until PyCon. Right now, a lot of the following things are just the things that we want to achieve in order to enable a community. And this is an open source project.

25:39 It started at an Anaconda, but it's an open source project. We want to have a strong community, have contributors beyond the Anaconda team, and do it together.

25:50 Yeah. That was one of my questions I wanted to ask you about. Is it sounds like you all have a very strong vision of what this should be and where you want it to go.

25:58 Yes.

25:59 But from what you just said, I was wondering if that means it's more source open than open source. And like we're driving this way and we'll take PR as long as it's on our roadmap or how open are you to people just jumping in and giving ideas and trying to build it up.

26:13 Yeah, great question. We are very open. So it's worth also saying that right now we are at this stage where I don't think we made it that's easy for people to onboard and understand the vision, understand the project, and actually be able to contribute. We're missing a lot of documentation. So one of the biggest pushes that we've been having after Python is to actually build up the documentation around those things so that anyone contributing have an easier time onboarding, understand divisions and can give feedback based on those things. So as soon as we are also growing the team behind it. So there's a lot of small things that we are preparing for being a community that is on itself or itself organized and everything. So overall, I think this is really a community project.

27:07 Sure. Speaking of community, let me just pull up the GitHub page. So you're just shy of 10,000 stars.

27:12 Yeah.

27:12 Crazy.

27:14 I don't know how old it is, but how long has this repo been public not that long. Right.

27:18 We actually made it public. Ten minutes in green, Peterstalk.

27:22 Okay, so you're like half a flask almost. Or half of closing in on FastAPI levels of numbers of stars. There's a lot of interest in this.

27:31 Yes. Which is really exciting, but also somehow overwhelming me. Right. I'll be very honest.

27:37 Probably there's a lot of expectations as well, right?

27:40 Yes, we are aware of all of that. I think the main thing really for us is we want to make sure that our users have patience because we are trying to get to a stable state or at least it's less than two weeks old.

27:58 Come on.

27:58 Exactly. Yes, it's a baby. Yeah. I could talk about this for 4 hours, but at the same time we want to make sure that it's usable and we want to collect users feedback to make it better. Actually, one thing that is very important is that it got a lot of interest and a lot of excitement from the Python community and some of the web community as well. But I really want to make sure that everyone understands the full picture is what Peter said, like programming for the 99%. So beyond developers, how can we have a tool that students can learn very fast, get to learning coding very fast, or even non developers? I would love my mom to write her recipe book with Py Script. Right. Because it's that easy. And thinking about the possibility of shipping that in your phone or your mobile users in developing countries that do not have access to computers and things like this, but they have a phone. Like what we also hope that is that the social impact of a tool like this could be very big. One can dream.

29:05 Yeah, one can dream for sure. So something maybe you could take inspiration from is the Swift playgrounds.

29:12 Right.

29:13 It seems like you can model that pretty well. And I feel like Swift was largely borrowing from Python in a lot of its ways. So it's time to borrow a little back from Swift.

29:21 Yeah.

29:21 For people who don't know, Swift playgrounds is a little bit like a REPL, a little bit like Jupyter, but then on the right you get kind of more iOS outputs like little widgets and graphs and animations and whatever. But it seems like that could be a similar way. That's sort of like Jupyter, but also a little more web playful, right?

29:42 Yes. And I would say we have no shame in borrowing from others. Right. I think that actually is how you can grow well, like take what's successful from this community or this language, etc. And try to use that to make a better tool.

29:58 Yeah, because it's so early, because it's so fresh. Like one of the drawbacks drawback, one of the temporary limitations is people can't just jump in and build the next version of Gmail or whatever with it. Right now but the benefit is so many people want to contribute to open source, and they're like, I love Django, I'm going to contribute to that. Or I love Jupyter. I want to contribute to that. And then it's such a complex, highly leveraged, very polished system that like, well, contributing to that means you have an insane level of understanding to make this little change that won't break everything else, whereas this is pretty fresh. Right. So if somebody wants to come along and build something like a Swift Playground equivalent, and I'm not sure how much you want to accept that, but the door is open for people to grab ideas that are low hanging fruit at the moment.

30:46 Yeah. The idea is also to allow users to extend the tool itself and without having to change the tool, like with extensions and things like this. In my mind, I see that as a sort of Minecraft or programmers. Right. Like, you can build your own blocks and then share with others, and then they can share my mod pack for.

31:10 This thing or whatever. Right.

31:12 Yeah.

31:13 The idea is to make it, well, powerful, but also fun and heckle, yeah.

31:18 Very cool. All right, now let's talk about I know we talked to some of these things here, but let me just dive in a little bit on the bullet points to kind of do a wrap up summary before we move into the coding. So Python in the browser, this means it runs 100% in the browser through primarily WebAssembly, which is leveraging the Pyodide project. Yeah, right.

31:38 That's right.

31:38 Okay. And the WebAssembly stuff runs, I think, even better than the JavaScript C Code compiled the JavaScript because this is still more of a binary form. And whatnot that's pretty excellent. One of the things that really inspires me here, you spoke about this will allow us to do things on our phones and on lower end computers and do other things like that where now we have this possibility, if you have a browser, you can kind of do it. I totally agree. And that's great. But what really gets me excited about where this could go is progressive web apps or something even like ElectronJS, right. Where I built like a true desktop application, like Vs code or Slack or whatever. But instead of having to write everything in JavaScript, write it in Python. Right. It just got to include the two Meg or three Meg WASM file with you what is already a massive Chrome distribution. So no one would know. Anyway.

32:33 Right.

32:33 Anyway. All right.

32:35 The thing about this is what I was hinting at at the beginning as well, like, oh, my gosh, we can have things in our dock that are like modern looking that are based on Python. Easily. Very exciting.

32:47 Yes.

32:47 And if you want to put it.

32:50 Right, the whole story about the native apps and mobile and whatnot Russell Kick McKee maintainer of Beware is he just joined an account a few months ago.

33:00 Oh, he did? Okay. I didn't know that, actually.

33:02 Yes. And he's been sort of looking at the project, collaborating, contributing with some stuff. He actually made up an example. One of the examples is written in Toga, which is the Beware toolkit for UI design and stuff like this. And it's built in Toga, but has a pyscript back end so that it can render To Py script directly, pretty much like it can build for iOS or Android or Mac. But another interesting story is the opposite. Can we have a Py script app and then Toga can transform into an Electron like app that you can just run on your mobile? Lots of possibilities.

33:41 Please do it. Do it.

33:44 People would be happy. Yeah.

33:45 If you're listening. That's for you.

33:47 Yes. Oh, my goodness. Look, I think there are plenty of negatives about Electron apps. Like, why does my password manager need 400 Megs of Ram to run? But we have such a limited set of options for desktop and mobile apps and Python that for now, that would be massively. Welcome to do something like this. And then there's always possibilities of, well, do you actually have to ship Chrome in some massive runtime, or could there be a smaller host?

34:16 There are layers of improvement. All right, next one Python ecosystem. When you think about the history, this is not the first or the second time that someone has done Python in the browser. If you're familiar with are you familiar with Anvil?

34:28 Yes.

34:28 I had Meredith on from Anvil to talk about both Anvil one time, and then it was Sculpt, which is what they use and anvil has both the back and front end. That's all Python and really interesting project. And they were using a JavaScript variant called Sculpt. And there's I think Brython is another one that you could choose. But one of the challenges of that is it's Python like. Right. It's not really the Python runtime. Do you maybe want to talk about how that differs from the Python ecosystem Python runtime that you all have?

35:02 Right. That's exactly the difference. Right. And probably the Pilot folks would have a lot more to say. But the big difference is what you said.

35:10 Like, it's Python like, for example, numerically. Like, JavaScript doesn't have integers, so your Python has to somehow fake integers if you're going to do things like that. Right.

35:19 Right. It's mimicking what you would expect with Python, but with the JavaScript. And it's not really a full blown Python interpreter that you can also install your packages. The whole Python ecosystem is not supported. And I think that's the big difference. That was the differentiator for Pyodide. And now that CPython actually compiles to encrypt. And it's very exciting that we can.

35:45 It's running the same VM or the same runtime that we get with CPython on our desktops, more or less like a cut down limited version, but it's not like a weird transpile to JavaScript and then run it.

35:56 Yes, correct. With a few caveats, right. That's one of the things that I think is worth mentioning. It's the same CPython code and it's the same thing you get in your local installation. Few things are different just because the browser as a VM, they work differently. Right. Like file system is different on the browser sockets, probably spreading multi processing pipes and things like this. Right. There are solutions for some of these that will require work and probably upstream with some of the parts of the standard libraries or the third party packages, but they are just different. So we need to account for that.

36:40 Sure. All right. So you can use it says many popular Python packages and stuff in the scientific data stack. Question from the audience, from Christopher Tyler says, my very limited understanding since you're using Pyodide is that there's a limitation on the libraries you can use. Meaning can you import your own custom libraries? Generally it's yes, right. But not universally, isn't it? Right.

37:02 That's a great question. Let's talk first about the standard libraries and the third party libraries that you have, PyPI, et cetera. So Pyodide ships with the standard library plus a set of packages that they ordered.

37:16 Most of these are they use the extensions and things like that, so they need to be compiled. And so the pilot team took that work and took care of it. They're included in the distribution. There is a way for you to also build packages that depend on the extensions. They have a nice guide in their website that you can follow and they will help with that. In general, you should expect pure Python packages to work if you pip install them.

37:46 Right.

37:46 The caveat there is, do they have other dependencies that are dependency extensions and that will cascade and what works? Or do they rely on some of the things that I mentioned before, like multi processing and sockets and stuff? So in that case the package may install but it will raise an error because multiple processing is not supported or other things like that.

38:12 What about simple stuff like Async and Await?

38:14 Great question.

38:17 What do you expect of the operating system is pretty low, but it's also pretty advanced, right?

38:22 That is more I think it's less of the packaging problem and more of a philosophical problem in terms of how you compare Python to JavaScript for instance. Right. Javascript, even if it's synchronous as a language, it has built DMs over time to always try to be Asynchronous because for obvious reasons you don't want to block your browser or if you're doing something in your page and you block your Chrome on your phone and that.

38:51 Way it seems like it should be a fantastic match for Async and Await.

38:54 Yes.

38:55 The waiting.

38:56 Yes, it is a fantastic match. And almost everything that you do that would be blocking in JavaScript, you would async await. In Python, we are used to do everything blocking, and then when we want to do explicitly, we use async. Io or something different. So I think on that side of things, it's more of how you develop your Python code rather than the language and the package.

39:22 You might have to have a mental model that matches closer to what JavaScript traditionally has.

39:26 Yes, but we can use the Async Await anywhere in your code. In Piodide and Py script.

39:33 Sweet.

39:34 Okay, I should have started on this list here 40 minutes ago. But next question from Roller is how would I pip install something into pyscript, which is a follow up from what Chris asked in this like Python ecosystem integration. Clearly, pip install a thing is got to be at least 30% why Python is so popular, right?

39:53 Yeah. Not commenting on the packaging for Python or JavaScript. And we all know that most people don't have problems with them.

40:02 They all have Idiosyncrates, let's say they all got their weirdnesses, right.

40:05 So Pyodide itself allows you to use micropip, which we will pip install your dependencies.

40:12 So like an NPM like thing where it creates instead of a node modules that creates something else?

40:17 Yeah, it's like NPM. It's more like pip really for Python. And we'll go and if it's a package provided by Piodide itself, we will load that package for you. If it's a package that is not available there, it will check on IPI and you can also specify the location of the package itself. So if you have your own repository but you have your URL that points to a wheel file or zip file, it will install from there.

40:44 Yeah. And that wheel can be remote, just like you might have a CDN pointed thing for JavaScript. Like, here's my wheel. Okay. If it's Python, right? If it's seen, then I'll be off.

40:54 If it's seen, you should have done your duty and ported it to WebAssembly. But the Py script provides a layer on top of that where you can specify a tag called Py Env and it accepts YAML format and you can specify your dependencies there and both for packages and also has an extra key called paths where you can actually provide the link to your modules, custom modules that.

41:21 You want to effectively like the working directory of your Python. So when you type, import, file, name or directory/filename, it kind of mirrors that to the browser, right?

41:31 Yes, exactly. That if you know how Python works, it's basically adding those files to your syspath so it finds them interesting.

41:39 Yeah.

41:40 All right. Another one that's really important here is Python with JavaScript. So it's not like you're locked into this pyscript little box. Right. I think this is another thing that makes me very optimistic for the future is you can communicate back to other JavaScript, to JavaScript events, button clicks, to the Dom. So here's another dream that I have something like a Vue JS wrapper type of thing that I could do in Python and then do sort of model binding or attribute binding to the Dom and have that sort of stuff happening. And this is really important to make it a first class citizen that can work with all the stuff on the page, not like a canvas it was given or something.

42:21 Yeah. So before I go into this, I want to plus one on what you said around reactive sort of programming and components where they can be attributes that auto, notify other elements. That is definitely something that we would love to explore more. And there's a lot of interest. And on the Python with JavaScript side of things, after the keynote at PyCon, I saw a lot of videos coming up with like, oh, is JavaScript that now that Python can run on the browser and things like this, I think that narrative kind of looks at one side versus the other where what we really want to encourage is actually the two together. There is a ton of really great libraries in JavaScript and there is a level of maturity in JavaScript on things on the browser or UI creation or drawing on canvas or on the page that we were nowhere close to 1% in Python and all of a sudden you can use those tools in Python and vice versa. All of a sudden JavaScript users could use NumPy or Scipy and other things to power their applications. Right.

43:34 That's interesting. I hadn't really thought about the benefit others outside of Python people may be receiving, but yeah, now Python becomes a thing that they could leverage.

43:43 Yeah, exactly. I think if we start looking at this that way, then you can see how pyscript is a glue for building Reacher applications independently. If you're a JavaScript developer or Python developer and we are starting with Python, it makes a lot of sense. But if there is a RUST implementation on WASM or R I'm sure the Python scientific community would love to use our tools in the page with Python stuff and maybe JavaScript as well. Right. I think it's putting together kind of movement that we want to push forward.

44:19 Yeah. If I can look out and imagine a future, I don't know, there's a chance how much it would exist, but a really great future. Like, well, we have WebAssembly. What if we really made WebAssembly more of a first class citizen from a browser maker perspective? One thing I think would be fantastic is if instead of getting to the Dom through JavaScript and through the events through JavaScript is if all of the browser makers said, here's a WebAssembly native thing that you can use to bind to the Dom and to the events and basically control it. You could have Rust in the browser, Python in the browser, C# in the browser, and they could all have this common API defined and maybe even an adapter type thing like, well, in C#, as classes and in Python it's lambdas, I don't know, whatever. Right. Like some variation that's more native to your world. But if there was some kind of interaction that we could build on, that would be even better. But we don't have that. So this integration with JavaScript and all of its modern features is fantastic. You still would want that, but it would be nice if there was a way just put Python aside. If I'm doing WebAssembly stuff that I could stay in WebAssembly, stay native to interact more with the browser.

45:29 Yeah. And honestly, the interaction between the WebAssembly part of it and JavaScript, it's very fast.

45:35 Yeah.

45:36 I want to highlight one thing that you said a lot of the future and how can this improve is on the browser folks.

45:43 It's on the vendors. Yeah. It's on the to do it.

45:46 Yeah. Because the huge bottleneck that we have right now is that when you load your things, you still need to compile them and run them in WebAssembly. So the Loading time right now is very high and we're working on optimizing things. And there's a lot of great work from the Cpython folks and the Pilot folks to reduce the size of things that you're shipping by default. But ultimately, if you have a large scientific application, you still want to install NumPy and Bokeh and other stuff like this and you will have a Loading time.

46:20 There is a Loading time, and I think that might mean it doesn't make sense for the home page of Reddit or like your marketing page that needs to load super fast to be implemented in this. But if you're writing something like Google Maps, Gmail, I go to those sites and then they spend and spend and spend for 3 seconds already.

46:42 Like the first time you hit that it does that the second time it would just be cached. Right. All the stuff is off. The WebAssembly stuff is just off disk. And if your expectation is this page might take 2 seconds to load, sometimes you're good, I think. Honestly.

46:55 Yeah. All that to say, like this is the current state. Right. I think there's a huge margin for improvement in the future and a lot of really great people are looking at it.

47:05 Okay. I agree. And I think the momentum is just building. So let's look at some code and some examples so we can make this concrete for people over audio, which is tricky, but let's do it anyway. So you've got the GitHub page, which has a bunch of examples. And so what I want to do is kind of just pull up some of the examples here and let me remind myself what they are called. Let's do this one first. Actually, I want to look at anti gravity. So we all know the Xkcd, and if you go to the REPL and Python, you type import into gravity. Amazing stuff happens. And so here we have that equivalent in pyscript. But there's a couple of things that are really interesting about this. So let's put this up. It says based on this thing and you give it a second and it says the Xkcd is how are you flying? There's someone out there flying like Python. I just imported antigravity. Right.

47:54 It's great.

47:55 But this is a variation. Maybe describe what just happened on the screen here. People can go to the demo and watch it. Of course, they just check out the repo.

48:04 This is a great example done by Philip Ruddher, his core contributor to pyscript, but also contributed to Panel Hall of Use. Okay. He's done a lot of great stuff. What's happening here is we're Loading the SVG first, and then there's another Python function that basically takes the statement and make it float by, basically changing coordinates.

48:29 Literally animates and flies up into the sky. Like it really takes off. Not just it's up there, right?

48:34 Yes. And for anyone wanting to check them out, the examples are also available on Pyscript.net/examples and you can run them.

48:44 They are okay.

48:44 Directly there.

48:45 Interesting. We'll link to that as well. So I said this is interesting. It's interesting for several reasons. One, if I go and look at my task manager in Vivaldi, this is doing like 30% CPU, constantly. Refreshing. I don't know what the frame rate is, but it seems certainly possible in terms of there's cool animations going on rendering this canvas. And it looks good, right. It doesn't seem like all this just isn't going to work. It's like the person doesn't like Glitch, right. You know what I mean?

49:15 Yeah.

49:15 The other one is it highlights many of the things that I think are pretty interesting here. Let me pull up the code for the example and this maybe will give us a chance to talk through the programming model. So first of all, the first thing that's interesting is it has this Py Env section and you have people may have seen examples. And if you go to the home screen, you can actually the pyscript.net. It says there's a new tag done through web components called Py- script instead of just script. And you can just write Python code directly in the browser, but you only want to do that for so long until you want to read it across a couple of pages or whatever. So what's really cool here is the implementation of this is actually a custom Python file on the server, right?

49:58 Yeah, exactly. We've been working on that for some time. The design of this because as you said, there's a tension between allowing people to just drop things in the page and then have your Python code there. And it just works to also suggesting better patterns to do this from a quality point of view. It's really hard to test anything that you just dropped on the page, readability.

50:25 Point of view or refactor it or anything. Right, right.

50:28 But at the same time, we really want this to be something that people can play with and hack with and then don't have too much to think about. Oh, I need a file, I need to name it Python. All of that.

50:40 If there was an NPM install step and then there was a compile step and then a pack step, you would shave off like 75% of the people who just wanted to check it out.

50:50 Right. So we allow this pattern. But you could also say, like the same code could be the same thing in Pym. And then in pyscript, you could also have pyscript source equals in a Python file. So you can run that from files as well, right? Yeah.

51:05 So just like with the regular script tagging, say source, and it can do a thing on startup like Jquery did its dollar document ready hook right at the top all the time. You could use the equivalent of something like that. Okay, this is cool, but this is only part of it. Let me open up the other file, the antigravity.py. And this is the one that made me really happy because when I look at this, how is that animation happening? Right. What you do is you set a timer, do a callback where you are in JavaScript and it goes click, click. Let's see, how often are you doing this? Do you remember what the target frame rate was here?

51:41 I don't remember.

51:42 Yeah. Anyway, there's some sort of time where you say run it this frequently. And basically what you do is you go over here and you say this is Python. You say Document, get element by ID. All right, first of all, awesome with a ternary expression. And then you go and add through the Dom parts and you add the SVG in there. That's amazing. You do a replace child with some HTML stuff and then you go and you hook the set interval. So set interval is the way to say set a callback on a timer in JavaScript. And then you just call the Python function self move. Right. So there's a really cool interaction between JavaScript that's happening at a high frequency that shows do some stuff in Python, go over to JavaScript, go through the Dom, and then call back into Python when things that are interesting happened here. It's an interval, but it could be a button click or a drop down select or whatever.

52:36 Right, right.

52:38 And we're doing some work right now at providing a higher level interface that would be more Pythonic to those JavaScript. The usual things that you would always do in JavaScript, like selecting an element by ID or class or things like.

52:54 This, like a CSS selector sort of model or something.

52:57 Yeah, exactly. So I think the goal is to provide the simplest and more expressive or platonic interface that we could to hide some of that complexity. Because at the end, a lot of Python users or new users will have to end up learning about JavaScript itself.

53:14 Right. I did want to learn JavaScript, and here I am learning JavaScript. What you're learning, though, is you're not learning JavaScript. What you're learning is the Dom API. The API is the JavaScript often consumes.

53:25 Right. Correct.

53:25 Right. You have to learn that the Dom has a get element by tag name rather than I have to say I can't say var anymore VAR, Char. They have to say let or else it will complain. You know what I mean? You're not learning the language nuances, but you are learning the APIs that JavaScript people are very common and familiar with.

53:44 And it's a great point. Another thing, for instance, the set interval could be replaced with full Python and just say like from asyncio important sleep time sleep. And then while just do a loop, just do a loop and async awake.

53:59 No kidding. Okay. Like a while. True.

54:01 Exactly.

54:02 Awaitt sleep, then move. Okay. Yeah. This is really neat. I think this example is so simple, it's playful. And it's not just we put a graph on the page. Not to say that that's not important, but it's different than what we've seen before often.

54:16 Yeah. Honestly, it really prompts you to fill it. Like in I don't know what, 50 lines of code or 40 lines of code.

54:23 Yes, 45 for the entire implementation of flying anti gravity.

54:28 Right.

54:29 Pretty neat.

54:30 And in Python, those are not 45 lines of JavaScript.

54:34 Right. Cool.

54:35 Okay. Audience question. Marcel says would it accept Loading data from a file for processing?

54:41 We're pulling the modules, but what's the data story?

54:44 That's a really great question. I think the data store is yet to be told. We're dedicating a lot of effort to that right now. You can load data using fetch, basically, and you can fetch data and then read just like normal files. Highlight provides a high fetch wrapper around the JavaScript fetch, but there is a lot that can be done and we are working on it to have better support. And just how does the story for larger files look like?

55:12 Can I do a Panda, read CSV and give it a URL or something like that?

55:16 That's a great question. I'm not sure.

55:17 I don't know.

55:18 Yeah. I don't know.

55:19 I have no idea. I really just wondering you.

55:21 Yeah. But yeah, that's one of the stories that I think needs more development right now. You can't pull files and read them with that method, but there's more work to be done there.

55:31 Yeah. Okay. Let's look at another demo here. Let's see. Give me so good. Okay. This one is interesting, too.

55:39 I think it's Panel Stream is the one.

55:41 And this is one of those that is going to take some time to load because under the hood. It's installing panel and installing Bokeh, I think, and other visualization libraries that are heavier.

55:53 Right.

55:55 Let's try it a second time. Right.

55:58 What do you get? Seven or 8 seconds. Maybe it took that first time, but if I hit it again, says it downloaded 3.6 Meg Tock you should have.

56:07 Cached most of the things that you compiled. But also if you set your browser to not cache, it will not change anything.

56:15 Yeah. Well, I think the challenge is that I'm using just Python MHCP server, so I'm not really using a proper server for this. So that's not helping. I let that one load up while we're I'm pulling up another one here that I want to talk about. Is there one that you think we should highlight in particular? I mean, we've got the mat plot lib one, which is pretty interesting over here that shows us the D three.

56:40 One is pretty interesting as well.

56:41 The D31, you said.

56:43 Right.

56:43 Okay.

56:43 D3 has been a library that Python folks have always wanting to be using.

56:50 That one was super fast. That one was two or 3 seconds, right. Maybe less than 2 seconds. Yeah.

56:55 And that should have basically the same Loading time as JavaScript because we're not reinforcing much or installing new operations.

57:02 And once I hit your example server, then it's cached it, right?

57:05 Yeah.

57:06 The second time you do. Yes. So another one, the WebGL right down this one. This also should load pretty fast and shows wrapping WebGL.

57:18 Oh, yeah.

57:18 Directly.

57:19 This one shows an example of Odecahedrons or something a bunch sort of rotating and spinning around. It's a little bit like a 3D asteroid game with no spaceships like that. I guess maybe it's a way to think of it. And if I go to as I move my mouse, it reacts to it. I had to move my mouse. That's pretty cool. I opened up my little task manager thing. I don't know if it shares, but it says basically it shows you how it is working and it's 20% CPU for this 3D rendering interaction thing.

57:52 If you probably try to do this in pure Python and Py game, it might be more.

57:55 Yeah. I'm not sure about the performance and resources, but it should be pretty much once you're using JavaScript things, they should be pretty much the same as JavaScript through JavaScript.

58:07 Much like Python often just sort of orchestrate C Code. Once you've loaded something into the C layer and you're kind of just instructing it through simple commands, it's probably not very different here.

58:16 Exactly. Yes.

58:17 All right, cool. So I strongly encourage people to go check out the demo code. It's just under the example folders in the GitHub repo, which we'll link to. Bobby, we're running low on time here. There's so much more I want to talk to you about.

58:30 You drive.

58:31 Yeah. Let me just see a couple of examples or a couple of areas I want to talk about here. I just want to quickly touch on security. I think the security story is pretty simple, but I do have one question. So to some degree, people might go, oh my gosh, it's compiled C in Java script in the browser. Like what madness are people going to unleash on the world? Right. This is like ActiveX or some dreaded comp thing all over again. And really WebAssembly also has the same sandbox security as JavaScript. Right?

59:01 Right. Actually, a lot of the issues that we've been getting around security boils down to that. People like not being used to seeing the browser as of VM. So, oh, if I type OS Lister and stuff like this, I cannot have access to the file system. Well, you're having access to an Ephemera's file system in the browser and not your local file system. That is a very important aspect.

59:28 One thing that would make me super happy is if we had some beautiful Python API to the local data side of things. So inside the browser, in JavaScript, you get access to local DB and there's different levels. There's like a file sort of per site file storage thing that's tied to your user. And then there's like an embedded SQL Lite thing. If you had something like SQL Model or some other proper Om that would let you connect to query that, I suspect that it could probably be built pretty easily with an interoperability layer to figure out just how to translate that over to JavaScript. But what do you think? More than I do, there are lots.

01:00:11 Of possibilities, scenarios of using what the browser provides you, like local storage or small instances of databases and stuff like that. So that is almost shipped in default with all the browsers. There are interesting projects. Well, at least one that I've seen, like Google Project, where from Google from the Chrome team that is experimenting with scenarios where you can actually allow apps to access your file system or other native resources. Right. And it goes through a process of approval, but you can mount directories and use them from your browser as a local mount. Those are also very interesting scenarios that could open up a lot of different ways of interacting with Py script. Maybe it would mean you can actually develop your Py script app directly from your local machine and then serve it on the browser in real time. Or your app could write files or do your models or computation on the browser and then write results your local files. There's a lot that can be explored.

01:01:17 Yeah, very exciting. Okay, my security question though, outside of the all the sandbox, let's not stress about it. We already have had WebAssembly for a long time. Is this Py Env section here where you can say go find this file. Right. And I'm thinking of my website which has a static files, static files folder section where I might put this because that needs to be served up as effectively a static file to the front end. But I've also got my app.py, my various views and settings.JSON. And like if I put too many dot dot slashes there, am I going to be able to get to other stuff or is it okay, suppose this folder, this file lives in like static antigravity HTML, but the rest of my app is like one directory up from that, could I say my path to my module is ../app.py and then maybe read some source code with a token that I put in there that I shouldn't have put in there, but then now it's public?

01:02:13 Yeah, relative path should work just fine. Also, I think with Py Script, the distinction between development time and deployment time or bundling time is a little more highlighted. As a developer, I'd love to have those relative paths and explore and have full access to a lot of libraries. But when I deploy bundle my application.

01:02:39 One of the things that we are very interested in developing more is we should bundle that as one thing and path should be absolute. So there's no issues with what you're saying. We could bundle the interpreter and your dependencies so that we can optimize size, remove dependencies that you're not using. So the Loading time is smaller. Basically three shake like a lot of JavaScript libraries do.

01:03:07 There are definitely patterns to explore in that scenario too.

01:03:10 Yeah. Okay.

01:03:11 Yeah.

01:03:11 You definitely don't want to go app because somebody could then inject that. But it's interesting. I'll be able to see what you'll do there. But definitely that's the only thing that's coming to mind. Like, I wonder what's going to happen there.

01:03:24 But if you do app, it's basically on you to define what you're actually serving as a static file server.

01:03:32 If it's not accessible as a static file already, this will just 404.

01:03:37 Yeah.

01:03:37 Okay, then flask pyramid friends have it covered.

01:03:41 Yeah, exactly.

01:03:42 Now I see where it's so it's just you're like, it's not our responsibility, but you shouldn't be allowing static/appy being served anyway. Right? Okay, cool. The other thing is one of the things that Steve Dower talked about recently is that they started in built enable the full CPython to being built within scriptin WebAssembly targets. Is this of interest to you all? Does this very much supersede Piyodide's version in some way? Is this what Pyiodide version actually is?

01:04:17 The CPython team are collaborating on making pyiodide basically use that as a baseline Python.

01:04:29 Okay.

01:04:29 That actually would be very helpful to the Piodide team as well. They would have way less things to maintain. They can just delegate to improvements and optimizations that the CPython core team they're doing and can focus on the additional features of Pyiodide. So that actually we had a few.

01:04:48 They're building in the WebAssembly version because it didn't exist. That's probably not what they wanted to do.

01:04:53 Right, exactly, yes.

01:04:55 Okay. Their real innovation, I think, in addition to just getting the WebAssembly thing working, is like, how do you bring these important mixed C libraries in like NumPy and such to the browser that otherwise wouldn't just drop in as Python stuff running on top of the interpreter. Right. That seems to be the most important thing that they brought to the table.

01:05:19 Right.

01:05:19 Not discounting that there was not a WebAssembly version and they made that also happen. Right. That's also super important.

01:05:26 Well, yeah, I guess what makes them more distinct of all the other attempts is that they're really focused on making sure that data science libraries work in the situation.

01:05:33 Yes. I think that is one of the main things that made Highlight successful, because a lot of times you would support just the language itself, and then when you want to support more complex use cases like C dependencies, you are too far in the process of your implementation. And then you're like, oh, and now we have to rewrite half of the code refactor to account for a lot of the complexities.

01:05:58 Yes. We got to backfill it. So we have support for all these things. How are we going to write our own NumPy now or something?

01:06:03 Right. Yeah. And see, extensions are always the place where most projects have a hard time. Right. Historically, the different implementations of Python.

01:06:13 Net or PyPy or others check extensions has always been like the trouble.

01:06:20 It definitely is. It's also tricky for the Gil. It's also tricky for thinking about reference accounting versus other collection cleanup titles. It's an important boundary to be aware of, but it's also really been a lot. All right, final thing, let's just wrap this up with what's next? Where are you going?

01:06:35 So I think I hinted at a lot of those.

01:06:39 I think the main thing for us in the immediate future is really to work with the community and build up more of that side of things and then also work on documentation to put out also the vision and what's next. There are a bunch of things that are really interesting that we will be looking at a reactive layer or components to interact with each other and notify each other. The story around Data and how does working with Data looks like in Pyscript a lot of development around the possibilities of using pyscript in a peer to peer or web three sort of scenario. Right. What can we make to support applications talking to each other directly or using a mode where you work offline and online and you can make the experience better.

01:07:33 Right. Like a little bit of a progressive web app type of thing.

01:07:37 I'd be super excited to see that come along.

01:07:39 Yeah. Honestly, one of the difficulties with this project is that it breaks so many patterns that we are used to both like, oh, I'm running my thing on my machine or on a server or I'm doing a web. It means okay, it means that always have a server and a client side, they have the network in between.

01:07:59 Now we're shifting the paradigms and a lot of things are new so we can explore. Right. The other thing that we're looking at, well, better support for the optimization Loading times, all of those things. How can we can you hold state of your application? So basically as it's running, etcetera. Or if you just have a notebook like sort of workflow, how can you save the state of your high script app and share with others and they can start from the same point you were.

01:08:31 Okay. Those are all great things to be working towards. Is this tie in any way to Jupyter Lite and it's got similar goals. I'm not sure if it has any similar foundations or anything.

01:08:42 Maybe. I'm very familiar with the Jupyter folks.

01:08:47 I work together with many of the core developers. Historically, Jupyter Lite is a great project that basically implements Jupyter notebooks using Pyodide as the runtime or shell. Yeah.

01:09:02 So it's not that far out of being maybe in a similar space, but.

01:09:06 Right.

01:09:09 It ties right into the Jupyter experience. So it's locked into the notebook flow and authoring notebooks and stuff like that, where pyscript has a larger scope and it's really to author applications and a little different.

01:09:27 Okay, very interesting. All right, well, Congratulations. It seems like a pretty promising project, and I know there's a lot of interest in it. Let me close it out with a comment from the audience. Andre Mueller said, I tried the Jinja wheel just straight up with pyscript and it works straight away like no changes. So that's kind of meta, actually, that's really Jinja within pyscript within HTML. Love it.

01:09:52 Yeah.

01:09:52 Awesome. All right, well, let me ask you the final two questions before we get out of here. If you're going to write some Python code, what editor are you doing using these days?

01:10:00 I'm usually a mix between Vs code or PY Charm.

01:10:04 All right, cool. Yeah. Both good and notable. PyPi package or some other kind of maybe it doesn't come quite off PyPI. Maybe it comes off a CDN these days. Py script, obviously. What do you want to give a shout out to?

01:10:17 Give a lot of shout out to Pyiodide. Once again, it's a great project. I think I use notebooks and the whole Jupyter ecosystem a lot as well. The whole scientific stack and a lot of the things that are around the many interesting projects like NumPy, Pandas, Dask, Bokeh, Numba, a lot of that ecosystem is really in my day to day kind of workflow.

01:10:45 Yeah. Fantastic.

01:10:45 Yeah.

01:10:46 Cool. All right, well, once again, Congratulations on all the interest and excitement.

01:10:52 It's really taken off in the last couple of weeks. So thanks for coming on the show and talking about it.

01:10:57 Thank you so much for the opportunity. I had a great time chatting about it now.

01:11:00 You bet. And final call, action. People want to get started. What do they do?

01:11:03 Great question. Go to pyscript. Net, check the website. We have links to the repo.

01:11:09 You have very interesting install steps here. Okay. And it says no, you don't install it.

01:11:15 Yes, we hope people would click and actually see the Easter AG, which is good. And yeah, we really want to be an inclusive community. So if you have questions or you want to report bugs or just ask where you can help, just reach out either on the twitter or reach out on the repo. Open bugs there.

01:11:36 You should expect more documentation on community engagement, having a discussion group where people can actually ask questions more easily. We're evaluating starting Biweekly or something like that, community call where we just are there for the community to ask questions live on a Zoom or something like this. So be patient. We are getting there to support our community and allow people to actually contribute back to it.

01:12:02 Well, very exciting. Thanks for doing it. Thank you for being here.

01:12:05 Thank you.

01:12:05 Yeah, you bet. Bye.

01:12:07 This has been another episode of Talk Python to me. Thank you to our sponsors. Be sure to check out what they're offering. It really helps support the show. Starting a business is hard. Microsoft for Startups Founders Hub provides all founders at any stage with free resources and connections to solve startup challenges. Apply for free today at Talkpython. Fm/Foundershub want to level up your Python? We have one of the largest catalogs of Python video courses over at Talk Python. Our content ranges from true beginners to deeply advanced topics like memory and Async. And best of all, there's not a subscription in site. Check it out for yourself at Training Python. Fm. Be sure to subscribe to the show, open your favorite podcast app and search for Python. We should be right at the top. You can also find the itunes feed /itunes, the GooglePlay Feed at /play and the Direct rss feed at rss on talkpython.fm

01:13:03 We're live streaming most of our recordings these days. If you want to be part of the show and have your comments featured on the air, be sure to subscribe to our YouTube channel at talkpython.fm/Youtube this is your host, Michael Kennedy. Thank you so much for I really appreciate it. Now get out there and write some Python code.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon