Michael Kennedy: Building a UI in Python usually means choosing between quick and limited or powerful and painful.
Michael Kennedy: What if you could write modern, component-based web apps in pure Python and still keep full control?
Michael Kennedy: Nice GUI, pronounced NiceGUI, sits on FastAPI with a Vue Quasar front end and gives you real components, live updates over WebSockets, and is running in production at Saubersoig, a German robotic company.
Michael Kennedy: On this episode, I'm talking with NiceGUIs creators, Radja Trappe and Falco Schindler, about how it works, where it shines, and what's coming next.
Michael Kennedy: With version 3.0 releasing around the same time as this episode drops, we spend time at the end celebrating the 3.0 release.
Michael Kennedy: This is Talk Python To Me, episode 525, recorded September 25th, 2025.
Michael Kennedy: Welcome to Talk Python To Me, a weekly podcast on Python. This is your host, Michael Kennedy.
Michael Kennedy: Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython, both accounts over at fosstodon.org, and keep up with the show and listen to over nine years of episodes at talkpython.fm.
Michael Kennedy: If you want to be part of our live episodes, you can find the live streams over on YouTube.
Michael Kennedy: Subscribe to our YouTube channel over at talkpython.fm/youtube and get notified about upcoming shows.
Michael Kennedy: This episode is sponsored by Posit Connect from the makers of Shiny.
Michael Kennedy: Publish, share, and deploy all of your data projects that you're creating using Python.
Michael Kennedy: Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs.
Michael Kennedy: Posit Connect supports all of them.
Michael Kennedy: Try Posit Connect for free by going to talkpython.fm/posit, P-O-S-I-T.
Michael Kennedy: And it's brought to you by Agency.
Michael Kennedy: Discover agentic AI with Agency.
Michael Kennedy: Their layer lets agents find, connect, and work together, any stack, anywhere.
Michael Kennedy: Start building the Internet of Agents at talkpython.fm/agency, spelled A-G-N-T-C-Y.
Michael Kennedy: Falco, Raja, welcome to Talk Python To Me.
Michael Kennedy: I'm so excited to talk about GUIs, maybe even a little hint of a desktop GUI for Python.
Michael Kennedy: Oh my goodness.
Michael Kennedy: You all have built something great.
Michael Kennedy: So welcome to Talk Python To Me.
Michael Kennedy: Happy to have you here.
Michael Kennedy: Thank you for having us.
Michael Kennedy: We're going to talk about NiceGUI.
Michael Kennedy: Sometimes said nice GUI, but we're going to learn that it's NiceGUI.
Michael Kennedy: And basically a nice blend of Python plus web plus a possible package in these up as, I don't know what you want to call it.
Michael Kennedy: I think the name's probably already taken, but I feel like not Electron, but Positron, right?
Michael Kennedy: Like we got to have something with a P, but that's kind of like Electron for like desktop
Michael Kennedy: apps.
Michael Kennedy: Yeah, I believe Posit would already have that taken for their new IDE thing.
Michael Kennedy: Anyway, welcome.
Michael Kennedy: Let's get a quick bit of background on both of you all before we dive into the project.
Michael Kennedy: Falko, you want to go first?
Michael Kennedy: Tell us about yourself.
Falko Schindler: Yeah, I'm Falko Schindler.
Falko Schindler: I'm basically addicted to programming since my childhood, but I only discovered Python around 12 years ago.
Falko Schindler: It was the time when I finished my PhD at the university.
Falko Schindler: And that was also the time I met Rodja and I became one of his first employees of the newly founded company, Zauberzeug.
Falko Schindler: Now I'm a full-stack software developer and robotics engineer.
Falko Schindler: and have been working on a wide range of projects like mobile apps, web apps, robotics, microcontrollers, basically the full stack.
Falko Schindler: And yeah, and since 2021, I'm one of the, or we both are the creators of NiceGUI, a Python-based web framework.
Michael Kennedy: - Awesome, what languages, what tech were you using before?
Michael Kennedy: You said 12 years ago you got into Python.
Michael Kennedy: What was before Python?
Falko Schindler: - I basically was introduced to Python as an alternative to MATLAB, which I was using at the university quite a lot.
Falko Schindler: But I grew up with Pascal and did other stuff like web development, of course, with HTML, CSS, JavaScript, and some C-based languages, of course.
Michael Kennedy: Yeah, nice. I did a lot of MATLAB when I was in university and grad school and stuff, and then I escaped.
Michael Kennedy: Radja.
Michael Kennedy: Yeah.
Michael Kennedy: Welcome.
Rodja Trappe: Welcome. Thank you.
Rodja Trappe: My name is Rodja Trapper.
Rodja Trappe: I'm living here in Haviksbeck near Münster, where I founded the company.
Rodja Trappe: And I've grown up on a horse farm.
Rodja Trappe: But at 13 years of age or so, there was the first computer in my room.
Rodja Trappe: And I was really addicted.
Rodja Trappe: But I started only programming.
Rodja Trappe: Then in school afterwards, there was a course of study where I needed to program something.
Rodja Trappe: And I really got into this.
Rodja Trappe: And I liked it very much.
Rodja Trappe: I struggled in school normally, but the programming made it all worse, I think.
Rodja Trappe: And yeah, then after a course of study of computer science, I worked a little bit in Berlin.
Rodja Trappe: and then moved back to my hometown with my three kids now.
Rodja Trappe: And yeah, now I founded the company in 2012.
Rodja Trappe: It's Zauberzeug.
Rodja Trappe: It's like a company where we do mobile automation, robotics stuff, and also a lot of software development and AI.
Rodja Trappe: So we bring everything together.
Rodja Trappe: We have mechanical people and electrical engineers, but a lot of software engineers.
Rodja Trappe: And yeah, we are doing all the things which are needed to automate stuff, and mainly in the agricultural sector because we are, of course, very close to test grounds there.
Rodja Trappe: Yeah, it's nice.
Michael Kennedy: Yeah, very neat.
Michael Kennedy: A lot of the places that say robotics, they're like kind of toy things or Roomba-like things, but these are serious.
Michael Kennedy: These go out on farms and are large-scale human assistants.
Michael Kennedy: Yeah, it's fantastic.
Rodja Trappe: Yeah, we really, in Soberzeug, we really want to do the hard and the difficult stuff to advance in the field and do the advanced research to find new solutions and automations for the difficult parts where traditionally only human hands can do stuff.
Rodja Trappe: And we want to be on organic farms and in horse stables and so all the tricky parts where everything needs to be very perfectly suited together to bring a new age into place.
Michael Kennedy: Yeah, it sounds cool. Did you found Sapozoi right out of school or how did you get to starting this company?
Rodja Trappe: Yeah, while studying, I was very sure, even in school, I was sure that I wanted to one day found my own company, but I needed to know a little bit about how to run a company.
Rodja Trappe: And so I moved to Berlin for four years and got into a nice company, Art & Comm, and learned a lot of project work and how things work together.
Rodja Trappe: And after that, I was very sure I can do that.
Rodja Trappe: And I did the freelancing and contractual work.
Rodja Trappe: And then the contracts grew a little bit bigger.
Rodja Trappe: And then I decided, okay, this is the right time.
Rodja Trappe: I can hire my first employee and start the company and grow from there just in little steps and basically bootstrap myself.
Michael Kennedy: Yeah.
Michael Kennedy: Well, congratulations.
Michael Kennedy: It's not easy to start or run a business, is it?
Michael Kennedy: Yeah.
Rodja Trappe: Yeah, it's true.
Rodja Trappe: But especially if you really, most things I like is programming.
Rodja Trappe: So I needed to really think about how to arrange the company and how to do the things that I still can do like 20 to 30 hours a day a week by programming and sitting down and thinking about the cool and nice stuff.
Michael Kennedy: Yeah, of course. We're going to talk about it.
Michael Kennedy: Good for you because I think staying grounded in the technology really gives you an edge to, you know, Valco comes to you and says, hey, I'm working on this project and I want to use this tech or should we use FastAPI or whatever? You're like, yeah, of course. I've been working FastAPI or whatever, vice versa, right? Like you're swimming in the waters and it's really good.
Michael Kennedy: Awesome. All right. Well, you already gave a bit of a shout out to it. Let's talk about NiceGUI and like i like you know we were talking just a little bit before i hit record a lot of the projects it's really i think powerful to talk a bit about how you pronounce things because i don't know i i end up at a lot of conferences or maybe conferences not as much but meet people that are doing programming and they'll they'll tell me that they installed a library from pi pi and it was numpy and i'm like hold on hold on hold on you know the people who make that. They call that PyPI and they call it NumPy. And so just pyx, for example, right? It could have many pronunciations. There's nothing implicit about how you say that one, but Charlie Maher says pyx. And so you guys talk a bit about the naming and the pronunciation. I think it's an interesting
Falko Schindler: story. We have been looking for a name for a UI framework where the term nice was not on the table yet, but we had a kind of mindset in our minds. And in the end, we played around with the GUI term and ended up wanting to call it a NiceGUI, a pun on the Nice Guy ethos, a guy which is just who tries to be nice to everyone and tries to do things right. And that's a friendly UI framework, right? Exactly. And that's what we had in mind for our UI framework. But the guy with the Y, because then you would Google a NiceGUI and you would never find our framework.
Michael Kennedy: And that's why we had to find a term that's unique in the internet and it works quite well.
Falko Schindler: There were other examples where I don't understand until today, why did they call it like that?
Falko Schindler: You just don't find it. Yeah, that was basically the motivation for the name. And we didn't make that explicit that it should be pronounced NiceGUI but we are fine with NiceGUI as well
Michael Kennedy: yeah well i think it's i do appreciate that you have something unique in the search in the search both in the search and in these days in the ai like i'm working on a program with NiceGUI like well is he really helpful like no no no i mean there's a framework right you know so it's having something that you can search is super, super important. It's as if Jupyter spelled it the same way as the planet instead of with the Y, right? And you're like, oh no, you're never going to find anything about this. It's like all space. So very cool. I know at some point we're going to talk about version 3.0 and there's already a couple of comments in the chat of excited things about there, but we're going to save that for a little bit later. Let's just start by talking a little bit about you know where did this come from why did you all build this i'm gonna guess robots
Rodja Trappe: but radia yeah it's um of course it's it's robots uh because a lot of things uh hinge around the robot uh interfaces and interaction with that um basically um i think we did a lot of interface design before and we also invented uh interfaces before and how to write them but um uh one day Falco came into the office and said, OK, I need to control this motor controller and I need to tune it.
Rodja Trappe: And the robot is driving around. So we only have Wi-Fi.
Rodja Trappe: We need to have some access to the system.
Rodja Trappe: And he basically wrote something up where he could write some Python code.
Rodja Trappe: And there came out some web interface. And it was really nice.
Rodja Trappe: And I said, well, this is great. Let's do that.
Rodja Trappe: And maybe, Falco, you can take it from here because, yeah.
Falko Schindler: Exactly. We had a kind of a moving target and we had to control it.
Falko Schindler: but just the command line interface is sometimes too weak to control sliders because we had to tune some parameters.
Falko Schindler: So we wanted some sliders and maybe a joystick and some things like that.
Falko Schindler: And I think the manufacturer already came with some user interface for it, or they were in the making of such a framework.
Falko Schindler: And it was very limited, but it gave the idea of, okay, the UI framework could consist of some building blocks that you could somehow arrange, but why do it graphically? Why not writing it? You could simply write the building blocks in Python or in other language, but of course, Python was our choice.
Falko Schindler: And so in Python, you can quickly create a web server with FastAPI. So this part is basically solved. And then the idea was the building blocks could simply deliver some HTML with corresponding CSS and JavaScript. At that time, I was working in Angular. So the very first commits of NiceGUI was based on FastAPI and Angular. And later we switched to Vue. Yeah. Yeah. And within a few hours, the basic concept was there and was looking promising. Of course, not to the extent that we could imagine it could get that large. It was just meant as an internal tool just for doing some internal things.
Rodja Trappe: But what we did there is we set a lot on one computer and did wishful programming.
Rodja Trappe: How did we would like to have written the UI and what should be on the screen there?
Rodja Trappe: So we wrote it and tested it and then we thought, okay, how to implement this?
Rodja Trappe: So we have a very, very nice interface for the developer, but how to write it actually the framework behind that?
Rodja Trappe: And this was the challenge.
Rodja Trappe: But after we did it a little bit, and then we started the first project with that, and we thought, okay, let's do all the robotic stuff with it.
Rodja Trappe: And let's do our website with that.
Rodja Trappe: So the website of sauberzoic.com is also written in NiceGuy, like the full documentation of the NiceGuy webpage and all the things.
Rodja Trappe: We are doing really a lot of things, big interfaces where we have annotation programs and data pipelines.
Rodja Trappe: So we really use it now everywhere and it's grown much faster and more robust than only just conductorial motor.
Michael Kennedy: That's really great.
Michael Kennedy: You know, even just looking at the UI, it's got this kind of friendly feel to the way the UI looks.
Michael Kennedy: You know what I mean?
Rodja Trappe: Yeah.
Rodja Trappe: We are very happy to have also a professional graphic designer in our team, not only for the robotics, but also for websites.
Rodja Trappe: And we really are thinking about how to present the things here.
Rodja Trappe: And you can do basically anything in NiceGUI here because it's just HTML, HTML and JavaScript.
Rodja Trappe: You can do everything, but most things you can do simply in Python without touching all the underlying infrastructure.
Michael Kennedy: So you're telling me that those cool robots we saw cruising around,
Rodja Trappe: They're running NiceGUIs.
Michael Kennedy: They have a little web.
Rodja Trappe: Yeah, exactly.
Michael Kennedy: NiceGUI server cruising on top of them.
Rodja Trappe: Yeah.
Michael Kennedy: Sorry, do you give them DNS names, like Marco or whatever, like Marco, HTTP Marco, and start working with them?
Michael Kennedy: Or how does that work?
Rodja Trappe: The first few robots, we had some names for it, but right now we are just counting them up.
Rodja Trappe: So like it's F35 or something, because there are so many and you need to really find the right one, which is running where.
Rodja Trappe: But we have also in NiceGUI a web interface where we can manage the whole hive of all the robots running around and looking at the battery status and what they have done, the KPIs and so on.
Rodja Trappe: The F stands for field friend.
Falko Schindler: So we call them the field friends.
Michael Kennedy: Yeah, amazing.
Michael Kennedy: This portion of Talk Python To Me is brought to you by the folks at Posit.
Michael Kennedy: Posit has made a huge investment in the Python community lately.
Michael Kennedy: Known originally for RStudio, they've been building out a suite of tools and services for Team Python.
Michael Kennedy: Today, I want to focus on hosting your Python-based data science workloads.
Michael Kennedy: This includes dashboards, reports, plots, interactive web apps, all the way to custom Flask and Django apps.
Michael Kennedy: Their service is Posit Connect.
Michael Kennedy: Posit Connect makes it easy for data scientists to share work built with Python code.
Michael Kennedy: If you have a Streamlit app, Dashboard, Plotly interactive plot, a FastAPI service, or even a Quarto report, just give Posit Connect the code it needs to maintain the asset and Connect automatically does the rest.
Michael Kennedy: Connect will manage your APIs and serve your interactive apps for you.
Michael Kennedy: And if you want, you can update your reports and dashboards on a scheduled basis.
Michael Kennedy: That's right. No need to explain to the stakeholders why that dashboard or plot stopped updating last week.
Michael Kennedy: You get a focus on your data science and leveraging your skill set while Connect makes you look good, keeping your code running and private.
Michael Kennedy: With Connect, you get a private URL on your Connect server, ensuring that your asset is continuously available to your shareholders.
Michael Kennedy: And you can control which users have access to the asset.
Michael Kennedy: Let Posit Connect handle the delivery and DevOps involved in sharing your work.
Michael Kennedy: You focus on what you do best.
Michael Kennedy: So if you work on a data science team, you owe it to you and your org to check out Posit Connect.
Michael Kennedy: Visit talkpython.fm/connect today and get a three-month free trial to see if it's a good fit.
Michael Kennedy: That's talkpython.fm/connect.
Michael Kennedy: The link is in your podcast player's show notes.
Michael Kennedy: Thank you to Posit for supporting Talk Python To Me.
Michael Kennedy: Let's talk a little bit about building blocks, I guess, and then we could talk a little bit about the API.
Michael Kennedy: So you chose FastAPI, and you said you considered Angular, but you went with Vue, but maybe through Quasar.
Michael Kennedy: So let's, why FastAPI?
Michael Kennedy: I mean, FastAPI is certainly a good choice.
Michael Kennedy: Yeah.
Michael Kennedy: But why?
Rodja Trappe: FastAPI is great because it's, yeah, you can write very good REST interfaces with that.
Rodja Trappe: And also what you get is this whole async support.
Rodja Trappe: So you have an ASGI server running there.
Rodja Trappe: So it's, from our point of view, much better suited for this super large scaling and a single CPU running all the tasks than, for example, Flask or so.
Rodja Trappe: And so FastAPI was quite natural for us because we switched from Flask to FastAPI a few years before.
Rodja Trappe: We were very sure that we can work with that.
Rodja Trappe: this is supporting all the web traffic and server stuff we need.
Rodja Trappe: And we did also a few big applications with that.
Rodja Trappe: So this was quite a no-brainer farce.
Michael Kennedy: Okay.
Michael Kennedy: And then, Falco, you talked about Angular.
Michael Kennedy: I don't know if this is Angular 1 or 2, but I know the transition from 1 to 2 was a little rocky.
Michael Kennedy: It was after 1.
Falko Schindler: It was 2 or 3.
Michael Kennedy: I'm not sure.
Michael Kennedy: Okay.
Michael Kennedy: So you didn't have to write out that roller coaster.
Michael Kennedy: But then you chose Vue, and if I got that right, it's actually Quasar.
Michael Kennedy: That's not Quasar, that's Quasar.
Michael Kennedy: Tell us a bit about this.
Falko Schindler: I know Vue pretty well, but I don't know Quasar.
Falko Schindler: We didn't know it either.
Falko Schindler: Though I have to mention one important step in the development of the NiceGUIs was when we were thinking about a good name, we brainstormed.
Falko Schindler: And we thought, yeah, at one point we thought it's basically we are writing everything in Python.
Falko Schindler: So it's just Python, just Python, just Py.
Falko Schindler: So we ended up and wanted to use the name just Py.
Falko Schindler: And we looked up if there's something else called just Py already.
Falko Schindler: And as it turns out, there was a UI framework, exactly what we were about to do with NiceGUI.
Falko Schindler: And what was your thought?
Speaker 5: Were you like, oh no, it's, why am I even doing this?
Speaker 5: Kind of.
Speaker 5: Oh, look.
Falko Schindler: They've been ahead of us pretty much.
Falko Schindler: They already had a full-fledged UI framework, basically.
Falko Schindler: But it was a bit low-level for us.
Falko Schindler: They basically mimicked HTML elements.
Michael Kennedy: Yeah, I think I've seen this before and talked about it, yeah.
Falko Schindler: Yeah, maybe.
Falko Schindler: But they also used Quasar already.
Falko Schindler: And so we still wanted to build our own framework with our own components and some nicer API in our point of views. But we decided to use JustPy as a foundation. And that's where Vue and Quasar came into NiceGuy as part of the JustPy foundation. And just maybe a year later, we had some issues, some unsolved bugs with just by a bit poor performance.
Falko Schindler: And there was an effort to save just by and to push it forward.
Falko Schindler: And though that we can stay relying on it, but in the end we decided to stop it, to remove it from the code base, to reimplement the whole transportation layer and do it ourselves.
Falko Schindler: And it turned out pretty successful.
Falko Schindler: I think we turned out, yeah, with less bugs, with a better performance.
Falko Schindler: And maybe a year later, TrustPy was basically put on hold and isn't developed any longer.
Falko Schindler: But it was a very important tool for us, a very important foundation.
Rodja Trappe: It's a great stepping stone to give us some fundament which we could use to show what we want to do with the user interface, how to develop the user interface and what abstraction is the right one.
Rodja Trappe: And then we could easily swap out the engine after the first release.
Rodja Trappe: Yeah.
Michael Kennedy: One thing when I see, this is not a judgment on just Py, people see me this kind of stuff all the time, not all the time, but often enough, like, oh, here's a really cool thing that lets you not use HTML or JavaScript.
Michael Kennedy: You just do everything in Python.
Michael Kennedy: And sometimes the examples are just so close to HTML, but the frameworks are so close to HTML.
Michael Kennedy: It's like, well, why would I not just use HTML?
Michael Kennedy: If it's like I have to create divs and I've got to create spans.
Michael Kennedy: And like I've literally, the framework is just the same as HTML, but in Python, like that's interesting and it's a cool framework, but also there's so much tooling for working with styling, et cetera, deploying HTML like that.
Michael Kennedy: I don't know, I feel like it's maybe too low level, kind of like you were saying.
Rodja Trappe: Yeah.
Rodja Trappe: And so, yeah, a little bit higher abstraction where you have a button and you can put a click handler on there and if the button is clicked, then of course the click handler is called.
Rodja Trappe: That was really the main goal of NiceGUI.
Rodja Trappe: And I think that works pretty well and it scaled very far.
Rodja Trappe: So we could also have other UI elements like e-charts or so where we have really diagrams and things like that.
Michael Kennedy: Yeah.
Michael Kennedy: Yeah, I think, Ido, you were talking about Vue and Quasar.
Michael Kennedy: One of the concepts in that world is kind of like components and bigger building blocks than just raw HTML elements.
Michael Kennedy: You know, here's a card or here's a turnstile
Michael Kennedy: or here's a panel or whatever, right?
Michael Kennedy: And I think that that's a much better programming level to talk about these UI building block elements rather than HTML elements.
Rodja Trappe: It relieves the developer from the plumbing a lot.
Rodja Trappe: We can think about, okay, what do we want to show at what time and how does it all connect together?
Rodja Trappe: If it's too fine granular, then it's really this fine-grained stuff is really taking up all your mental energy to think about what you really want to achieve there.
Michael Kennedy: 100% agree.
Michael Kennedy: Okay, so that brings us back to Quasar a bit.
Michael Kennedy: So Quasar is kind of these building blocks.
Falko Schindler: Is that right?
Falko Schindler: Yeah, right. Exactly. It turned out to be the main UI framework in NiceGuy. Most or many elements are based on Quasar or existing Quasar components. We call them elements in NiceGuy, but there are components in Quasar. It's just a choice.
Falko Schindler: And other components or elements like eCharts or Acrid or something, they are independent of Quasar.
Falko Schindler: So you're not tied to using Quasar when using NiceGUI, but it delivers a nice foundation, a basic set of elements you can use.
Michael Kennedy: Cool.
Falko Schindler: So another one.
Michael Kennedy: Let's go with this.
Michael Kennedy: The AG grid looks like a super cool way to put grids of data, editable grids, sortable grids.
Michael Kennedy: And tell us about like this.
Michael Kennedy: It's probably something you do a lot with the analytics coming off the robots and stuff.
Michael Kennedy: But I know other people do other interesting things.
Michael Kennedy: An example on their website is like kind of a stock chart that updates live.
Falko Schindler: Yeah, we learned AG grid also through JustPy.
Falko Schindler: It was the way to present a table in JustPy.
Falko Schindler: So we basically adopted it.
Falko Schindler: Meanwhile, we are also offering a UI table, which is a quasar table.
Falko Schindler: So you can choose if you want to use UI ag grid or ag grid for an ag grid, or you can use the quasar table, which is a bit different in look and feel and the interface.
Rodja Trappe: Yeah, but generally what we discovered when NiceGuy grew bigger and bigger that people really are into these tables.
Michael Kennedy: They really need that a lot.
Rodja Trappe: And all the features.
Rodja Trappe: And AG Grid, for example, is really, really powerful.
Rodja Trappe: And the abstraction we chose at NiceGuy is really great to bring all this into the Python world, where you can simply write something in and you can use it in the web like it would be in the web, but you use it simply in Python.
Rodja Trappe: And so the interaction with that when you're writing, when you're developing, what do we want to do?
Rodja Trappe: And so it's quite a good fit together.
Rodja Trappe: And we could map all the features basically into Python.
Rodja Trappe: And this is true for all the other elements also, that they are simply just a JavaScript component somewhere.
Rodja Trappe: And we can write a small layer around that to bring it into the Python world.
Rodja Trappe: And then you can really instantiate the object.
Rodja Trappe: And then it automatically connects to, we have a web server and sends the messages over the secure channel to the website.
Rodja Trappe: And so we have this great user interface at the browser.
Rodja Trappe: And in Python, it's simply just a Python program running everything you want to run.
Michael Kennedy: Yeah.
Michael Kennedy: And I definitely want to dive into the server front-end data exchange.
Michael Kennedy: This is going to be fun.
Michael Kennedy: But rounding things out, I guess we also have some really nice charts.
Michael Kennedy: with eCharts. I guess there's a pretty strong data science story here as well with what you all can build and the tools you got integrated, right? Yeah, of course. There are a lot of data scientists
Rodja Trappe: out there which really like to use a simple framework to simply show a chart. And there are other kinds of frameworks which can deliver on that, like Streamlit or so. But Streamlit is quite difficult when you come to state management, how to do the database or how to integrate another third-party library.
Rodja Trappe: You get really stuck into that. This was also one of the motivations behind NiceGuy when we invented it because of course we knew Streamlit and we know how to use it. This also has a lot of charts. NiceGuy is really meant to be very friendly for the programmer to not break the intentions you have and also be very powerful.
Rodja Trappe: And of course, with eCharts and also other charting libraries, we can very easily integrate.
Rodja Trappe: We have some powerful tools here for data scientists.
Michael Kennedy: Yeah, it looks beautiful.
Michael Kennedy: Now, the final building block that I want to talk about.
Michael Kennedy: One, and I kind of said this earlier with this looking towards this in mind, is if you do everything in Python and you're just doing HTML, then it gets really hard to style those sorts of things.
Michael Kennedy: But you all chose Tailwind for your styling, right?
Michael Kennedy: If you need to, you can actually almost drop into the HTML level and do Tailwind type of stuff.
Michael Kennedy: But there's also a fluent API in Python to apply Tailwind classes.
Michael Kennedy: Give people, I don't know how much I've talked about Tailwind.
Michael Kennedy: I'm sure there's a lot of people that are like, what is Tailwind?
Michael Kennedy: And then why is it special?
Michael Kennedy: Why is it especially good for this type of programming where you're interacting with the widgets?
Michael Kennedy: or the components themselves.
Falko Schindler: Yeah, Tailwind or Tailwind CSS is basically an abstraction layer for CSS.
Falko Schindler: CSS is the way you are styling things in the web in HTML.
Falko Schindler: Plain HTML is pretty dry and has no styling, and you're usually using CSS to style it.
Falko Schindler: And Tailwind CSS makes it a bit easier, for example, well, they have a good example, It provides many shortcuts by adding classes to your HTML elements.
Falko Schindler: You're achieving more complicated things or you just can write it shorter.
Falko Schindler: And so like a P4 is four units padding for an element.
Michael Kennedy: Right, right, right. All the way around.
Falko Schindler: Yeah, usually then the fun starts when you can add prefixes like hover.
Falko Schindler: then this styling only applies when hovering and for certain screen sizes or in dark mode and not in light mode and same things. So it's pretty powerful. And by adding it to NiceGuy, you have an easy way to style your elements. You have been written in Python without having to write plain CSS. It's a bit shorter. In the beginning, we didn't think that it would take off so much, but when you start using it, you do not want to stop. And then you want to write all your styling in Tailwind. Easy and simple. But to address your thought about, well, then you can, I'm assuming that you are thinking then you can just use plain HTML and Tailwind.
Falko Schindler: We thought about introducing a NiceGUI abstraction, some kind of styling language in NiceGUI, which is on top of Tailwind CSS. But this proves to be very hard. And then you don't win that much that it's worth the effort. And if you are introducing a new abstraction layer,
Michael Kennedy: then you have to document it, you have to test it, you have to find the right level of abstraction.
Falko Schindler: And using Tailwind CSS as it is, we just can refer to the documentation, which is great.
Falko Schindler: and everybody can just look it up.
Falko Schindler: And while doing, though, learning CSS and styling and tailwind, and that's useful as well.
Rodja Trappe: I think we had a pull request like four years ago or multiple attempts to create an own layout engine where you can define, okay, how the width and how the height and stuff like that.
Rodja Trappe: But then you need to think about, okay, this is always the web, what you're talking about, and it's super, super powerful.
Rodja Trappe: And the language for the web for styling is CSS.
Rodja Trappe: There's no way around it.
Rodja Trappe: If you find some other abstraction, it will definitely break at some points and also not allow every mutation and every kind of variance or so.
Rodja Trappe: And maybe we will introduce something later on or sometime.
Rodja Trappe: But what we really try to do with NiceGUI is that you can do the simple things very easily and you can do it very quickly.
Rodja Trappe: But the difficult things should also be doable.
Rodja Trappe: And so if we have an abstraction, then like in Streamlit, you cannot do it.
Rodja Trappe: It's just you are locked in.
Rodja Trappe: And this is not something we would like to have in NiceGUI.
Michael Kennedy: This portion of Talk Python To Me is brought to you by Agency.
Michael Kennedy: Build the future of multi-agent software with Agency, spelled A-G-N-T-C-Y.
Michael Kennedy: Now an open source Linux foundation project, Agency is building the Internet of Agents.
Michael Kennedy: Think of it as a collaboration layer where AI agents can discover, connect, and work across any framework.
Michael Kennedy: Here's what that means for developers.
Michael Kennedy: The core pieces engineers need to deploy multi-agent systems now belong to everyone who builds on agency.
Michael Kennedy: You get robust identity and access management, so every agent is authenticated and trusted before it interacts.
Michael Kennedy: You get open, standardized tools for agent discovery, clean protocols for agent-to-agent communication, and modular components that let you compose scalable workflows instead of wiring up brittle glue code.
Michael Kennedy: Agency is not a walled garden.
Michael Kennedy: You'll be contributing alongside developers from Cisco, Dell Technologies, Google Cloud, Oracle, Red Hat, and more than 75 supporting companies.
Michael Kennedy: The goal is simple.
Michael Kennedy: Build the next generation of AI infrastructure together in the open so agents can cooperate across tools, vendors, and runtimes.
Michael Kennedy: Agencies dropping code, specs, and services with no strings attached.
Michael Kennedy: Sound awesome?
Michael Kennedy: Well, visit talkpython.fm/agency to contribute.
Michael Kennedy: that's talkpython.fm/agntcy the link is in your podcast player show notes and on the episode page thank you as always to agency for supporting talk python to me i think one of the interesting things on tailwind is that you know it's kind of grouped in the utility css frameworks and i don't know that that makes any more sense to people that already know tailwind but it lets you put the css classes right onto the elements and that directly affects them because a lot of CSS frameworks have a kind of a very separated, here's your CSS and style. And then here's your, the effect it has, like if it's in a row, if it's in a container, which is in a row, which then has this property, then it has some effect. And there's a very big separation of ideas. And this is more of a, let's leverage the locality, like right on the element, you can see that it says font dash medium text-2xl.
Michael Kennedy: Oh, okay, well, that's what the property...
Michael Kennedy: You don't have to look anywhere else than right there, right?
Michael Kennedy: And so it still works pretty well, I think, with NiceGUI, because as you're working in Python writing code, when you apply the style, you apply it to the thing in a real similar way to Tailwind, unlike, say, Bootstrap or something more separated.
Rodja Trappe: Yeah.
Rodja Trappe: Also, when you look at C# and Samuel also, they wanted to separate the layout from the content, and we decided that it's not good to do this.
Rodja Trappe: Because when you're writing UI, this is a good example for the with statement, where you open a context to do an intent like, okay, now we have a new row, and inside the row there's another row, but we have always an intent invention so that you can look at it and you see in the code, okay, there's something new going on in Clojure.
Rodja Trappe: And when you can then put the styling right to it, then you really know, okay, this is the point, there it's going on, and you can simply do it.
Rodja Trappe: And of course, you can do all the abstractions you can do with Python.
Rodja Trappe: You can make a class from that and use the component somewhere more abstract.
Rodja Trappe: You don't need to write like 100 lines of code in UI code right from one step to the other.
Rodja Trappe: But when you have UI code, you can really look at it and understand very good the structure of it.
Michael Kennedy: Yeah, 100%.
Michael Kennedy: Yeah, I'm actually, I don't know if people know, I'm a pretty big fan of C# and.NET and so on.
Michael Kennedy: Not as much as Python, but for sure.
Michael Kennedy: But I hate SAML.
Michael Kennedy: I hate the way they build that.
Michael Kennedy: It's such a frustrating framework to work in.
Michael Kennedy: I never.
Michael Kennedy: Interesting.
Michael Kennedy: Astro Strongbox out there says, Love NiceGUI.
Michael Kennedy: Building a battery pack simulation GUI plot.
Michael Kennedy: UI.plotly.figure.classes.
Michael Kennedy: W-full.
Falko Schindler: H-100.
Michael Kennedy: Boom.
Michael Kennedy: Just like that.
Michael Kennedy: Great.
Falko Schindler: Yeah.
Michael Kennedy: And that is the NiceGUI code.
Michael Kennedy: So maybe it's a good time to start talking about, you know, how do we maybe, how do we get started working with this?
Michael Kennedy: Let me zoom out a little.
Michael Kennedy: So find some examples.
Michael Kennedy: Right on the start page of our website, exactly.
Falko Schindler: There we have basically the most minimal NiceGUI app.
Falko Schindler: And it was always important to us that this is easy and short.
Falko Schindler: And the minimal NiceGUI app is basically three lines of code.
Falko Schindler: You import NiceGUI or you import UI from NiceGUI.
Falko Schindler: You add some label, maybe UI label, hello.
Falko Schindler: And then you write UI run.
Falko Schindler: And this will run the UI for you, start the server.
Falko Schindler: As a default, it auto-reloads when you change the code.
Falko Schindler: It automatically opens the browser for you.
Falko Schindler: So you're right on the right URL.
Falko Schindler: And that's it.
Falko Schindler: And your app is running.
Michael Kennedy: All right.
Michael Kennedy: Let's talk through what actually happens when this code runs.
Michael Kennedy: So you run this.
Michael Kennedy: And then this basically starts a server running UVicorn on the default port for FastAPI, which is 8,000.
Michael Kennedy: So localhost 8,000.
Michael Kennedy: You click that, it opens in a browser.
Michael Kennedy: And you've got a UI element that is a label.
Michael Kennedy: Excuse me.
Michael Kennedy: That's a label.
Michael Kennedy: It says, hello, NiceGUI.
Rodja Trappe: That's unimpressive, of course, because it's just sending some HTML to the web browser and the web browser is rendering it.
Rodja Trappe: But in the background, the web page is connecting back to the server with an ID of a client which is created on the server and says, okay, I'm connecting back.
Rodja Trappe: I now establish a WebSocket connection.
Rodja Trappe: And from there on, the web browser is connected to the web server.
Rodja Trappe: And all the events which happen, like when you have a button or so, when you press it, the command is sent through the web socket to the server.
Rodja Trappe: And then the server can decide, OK, what to do about this?
Rodja Trappe: What is the command?
Rodja Trappe: What should be done?
Rodja Trappe: And then it executes the Python code and sends back the commands for the UI update to the web page.
Rodja Trappe: And so we have this dynamic interaction very neatly packed into the web socket connection.
Michael Kennedy: Yeah, and that's where it starts to get interesting.
Michael Kennedy: So for example, if you pull up the docs for button, it has an on click.
Michael Kennedy: And the thing you pass to that on click is a Python callable, right?
Michael Kennedy: And if I go to the button in the page and I click it, stuff happens in HTML.
Michael Kennedy: But you're telling me that's because there's a web socket that connects some kind of JavaScript trigger to a Python action on the backend.
Michael Kennedy: Is that right?
Rodja Trappe: Yeah, exactly.
Rodja Trappe: In the example here, the onClickHandler is just a Lambda statement calling UINotify and then a message like "You clicked me." And then if the button is clicked, the WebSocket sends to the server that the button is clicked and then the server decides, "Okay, I have a click handler on this button and I will now execute the Python code there." UI notify will then decide, okay, when I execute, I will take the message, pack it into the WebSocket connection and send it to the browser again.
Rodja Trappe: And the browser then decides, okay, let's show the message here in Quasar.
Rodja Trappe: And so you see the message appearing on the screen like a pop-up.
Michael Kennedy: And this runs in the context of a Python executable on the server, I guess, depends on how you connect to it, right?
Michael Kennedy: It could be a desktop application.
Michael Kennedy: runs maybe as an invisible server on your machine or in the case you described earlier on the robot
Rodja Trappe: so on right yeah yeah or simply deployed to the cloud like um with um any framework there are a lot of things like you can simply uh host it behind an apache web server or traffic or even uh use things like uh these um what we are using a lot when we are hosting services like fly io they are hosting it, getting an IP address and the domain registration and then you can simply run all the code there.
Michael Kennedy: That's awesome.
Michael Kennedy: Fly.io. Interesting. How about Caddy? Have you checked out Caddy?
Michael Kennedy: Have you guys played with this?
Rodja Trappe: I think we have not used it a lot ourselves, but this is something people in the community ask us about or use it even and reported that it's a nice and a great server environment. Yeah. Yeah. And it seems really, it seems really interesting. One of the big selling
Michael Kennedy: points is it automatically does SSL creation through let's encrypt. So if you set up a server and on a domain and you just access it and it doesn't have SSL yet, it'll just, as part of the first request, just create an SSL certificate, which is pretty cool. I've thought about using it, but I have 2000 lines of Nginx configuration. It's just, it's not time well spent to try to convert all that to work seamlessly with caddy it's just like you know what it works let's just not go down that so very cool all right let's go back to more um more ui elements and more programming models i think it might be fun to take a little bit of a tour of the different things that you can build you know so if i jump over here maybe let's go controls for example We talked about buttons, but you've got little groups of action buttons.
Michael Kennedy: You've got dropdowns, a lot of different little expanding, what do you call this, floating action buttons.
Michael Kennedy: Badges that have numbers like in macOS in your dock or on mobile phones.
Michael Kennedy: You've got like a little icon, but then it gets a little number over it with notifications, those kinds of things.
Michael Kennedy: Talk about some of the UI elements that you think are good building blocks.
Falko Schindler: Yeah, you mentioned some.
Falko Schindler: And most of them, if you check the first line of the documentation, it says based on Quasar's
Michael Kennedy: Q button toggle or Q chip.
Falko Schindler: And so right now you're looking at mostly the elements which were borrowed from Quasar.
Falko Schindler: And they are mostly not that spectacular from the implementation point of view because they've just fit easily into the NiceGUI framework.
Falko Schindler: We are writing a small wrapper class, and that's mostly it.
Falko Schindler: We just say, use the tag Q button, and then the rest is done by view, translating the view button tag into a real button.
Falko Schindler: Other elements need some help from our side where we adjust the front end code.
Falko Schindler: And then there are elements like the more complex things.
Falko Schindler: We have 3D views where we use 3JS, which is completely independent of a quasar, which we use for our robots quite a bit.
Falko Schindler: So we implemented kind of a subset of a tiny subset of three jets.
Falko Schindler: Three jets is just huge, but some building blocks we are using a lot.
Falko Schindler: Some 3D objects like cubes, spheres, even 3D meshes
Michael Kennedy: and some 2D elements.
Falko Schindler: And you can control the camera and move it around and actively group objects, animate objects.
Falko Schindler: And it's a quite powerful foundation for what you want to do with your robot maybe.
Rodja Trappe: And what you can see when you look at the interface and the writing the API or so, you simply say, OK, I get it with a new UI scene. I then have with a group or with some element. And you can then write the scene STL and you load some STL file in 3D.
Rodja Trappe: And the thing is that we try to make it very, very simple from the API that when you are writing code, that you don't have to think about what to do next and how to arrange it.
Rodja Trappe: But you simply can write it down and then you have modifiers like.scale 0.3 that you can really say, say, okay, no, it's a little bit smaller, and here you go with auto intention and completion.
Michael Kennedy: Yeah, you know what I really like about this?
Michael Kennedy: That the shape of the code mirrors, the hierarchy of the code mirrors the hierarchy of the HTML and the DOM and all those kinds of things.
Michael Kennedy: That is really nice.
Michael Kennedy: So you have a width, you have a context manager for the grid, and then you put the things into the grid.
Michael Kennedy: And it looks visually like the code of the things that are in the grid is indented into that area, right?
Falko Schindler: Yeah, that's an example for two very important design decisions in our language, basically.
Falko Schindler: The one is the with statement, which could be read as a within statement, but it's called with, but it's close enough.
Falko Schindler: So you're saying with a grid, we are arranging these elements like this, and all elements that are nested in the with statement in the grid appear within the grid.
Falko Schindler: That's one thing.
Falko Schindler: And as you say, that results in a very visually clear code.
Falko Schindler: And the other one is the builder pattern, which we strongly encourage and use a lot.
Falko Schindler: Most modifiers like styling or event registrations or binding can be done with a method which returns the object itself.
Falko Schindler: So you can chain them like you could scale the teapot and move it and rotate it and all in one line.
Falko Schindler: And if you break the line, then it still looks visually grouped and you still see, okay, that's one element which is undergoing some transformations.
Falko Schindler: And it turns out pretty nicely.
Falko Schindler: In contrast to what we saw at the JustPy example, which was one pain point with JustPy itself, they don't do that, the automatic context switching, but they use classic add functions.
Falko Schindler: You have to create the object first, and then you can create the container, and then you can add the object to the container.
Falko Schindler: And in the end, you lose complete control over the structure of the UI.
Falko Schindler: The code doesn't match the UI.
Michael Kennedy: And that's what we...
Michael Kennedy: It's really tough to figure out when it gets to be a complicated UI setup.
Michael Kennedy: And it's fine for automation to write this kind of code if you had a builder sort of thing, but it's not good to read.
Rodja Trappe: Yeah, exactly.
Michael Kennedy: Yeah.
Rodja Trappe: Another interesting element could be the interactive image, which we came up with because the normal image from Quasar is very powerful, but could not do overlays where you can paint on the object in image coordinates.
Rodja Trappe: And so now the interactive image where you can simply click and do annotations like drawing circles and getting mouse events back from the image coordinates, which we use for annotating images for AI trainings and so, but also to overlay camera data and things like that.
Rodja Trappe: Also, the image can be very efficiently updated.
Rodja Trappe: So we simply update the image content.
Rodja Trappe: And when we send the data back to the browser, only when the browser really decides, "Okay, now I can load a new image," then it will update the image.
Rodja Trappe: So if you have a lower bandwidth connection and you send update images 30 times per second and the connection only can do two images per second, then it will only load two images per second And you have automatic frame control with that.
Michael Kennedy: Very cool.
Michael Kennedy: Yeah, that's amazing.
Michael Kennedy: So I think I want to focus a little bit more on some UI elements and some building concepts to drive home a few points.
Michael Kennedy: And then maybe we can talk some of the deployment, the 3.0 side of things.
Michael Kennedy: So that's a very interesting question in the chat.
Michael Kennedy: We'll come to that.
Michael Kennedy: So one of the things I want to talk about is subpages and building basically how do you build.
Michael Kennedy: So these are all really interesting building blocks, right?
Michael Kennedy: Each of these have been super impressive.
Michael Kennedy: But how do I create something that has the feeling of more than one page?
Michael Kennedy: How do I navigate around?
Michael Kennedy: How do I give it like a navigational structure and elements and so on?
Michael Kennedy: So, yeah, maybe talk a bit about that.
Rodja Trappe: The basic idea of what comes from FastAPI is simply you send a get request via browser and you get a webpage and then you look at it and when you click on a link, then you send another GET request and you get another page and you show it.
Rodja Trappe: So this is the normal way and this is what NiceGuy supports from day one.
Rodja Trappe: But now in preparation for our 3.0 release, we also introduced the sub-page concept where you simply have support for a single page application. You only once connect to the server, get your image, get your website, and then you can say, okay, there's a subpage. And if I click that, then the content will be replaced, cleared, and drawn anew with another function. And so you can
Michael Kennedy: navigate on the page and it's much, much faster. Yeah, that's, and it's support, it's more spa friendly, single page application friendly, which potentially you could right click on and say,
Rodja Trappe: install. Yeah, exactly. The single page application sounds so easy from the concept. So we did a few runs and edits to get the API right and to get everything into place. And if you look at the code, it's really demanding from the maintainer point of view because there's a lot going on. You need to rewrite the history of the browser so back and forth buttons are working correctly and nested sub pages so sub pages in sub pages and stuff like that you need to all support that it was really
Michael Kennedy: you could take a take a grab the url and then like send it to somebody and they have to open it as they go to the right place all these things are hard yeah yeah so is this something sorry go
Falko Schindler: ahead falker um the documentation page itself uses the sub page uh concept which is basically a single page application um uh our way of writing single page applications so if you uh open the menu and jump from one subject to another. This is all done without reloading, without sending new get requests to the server, just swapping the content, and that's much faster. Yeah, that's cool.
Michael Kennedy: And if I right-click on it, I can say install page as an app, right? That's pretty awesome.
Michael Kennedy: I'm actually a huge fan of single-page applications. I think it's really great.
Michael Kennedy: You know, you can save it into your doc or your taskbar.
Michael Kennedy: And sure, it's just a web page.
Michael Kennedy: But it actually, I think it makes a really big difference to have it there just appearing to you as a separate thing.
Michael Kennedy: You can command tab or alt tab between them easier, all sorts of stuff.
Rodja Trappe: Yeah, the web is really the most powerful application engine you have ever got.
Rodja Trappe: So running web pages as desktop applications like Electron or like your Proton idea was that you say, okay, there's something and we support this.
Rodja Trappe: With NiceGuy, you can simply write, okay, I will have a native true argument in the UI run.
Rodja Trappe: And then you start it up and it's really enclosed in a window.
Rodja Trappe: But it's still running the web application there.
Rodja Trappe: And because the web is so powerful and with NiceGuy, you can get access to all these powerful features.
Rodja Trappe: You can really write very nice applications right now with all the interaction simply in Python.
Michael Kennedy: Yeah.
Michael Kennedy: All right.
Michael Kennedy: Let's talk a little more deployment before we jump into the 3.0 features.
Michael Kennedy: So first of all, you've got UI.run.
Michael Kennedy: And that was even in your three-line example that appears at the end.
Michael Kennedy: you pass a bunch of commands like reload false and those sorts of things, right?
Michael Kennedy: In order to give it more of a high performance perspective instead of watching for reloads and that kind of stuff. With that one, I can just go and put it into, you know, like running on my server in a VM point engine X or caddy or whatever at the local host port and set up an SSL certificate get and just turn it into a proper web application, right? Because it's basically FastAPI on that end,
Rodja Trappe: right? So it's simply starting the server and then it opens support and you can access it however you like and how you want your deployment to be. But I think one of the interesting feature requests from the community was that they have an existing FastAPI application and they want to add some UI to it. And the interesting part is that it's really easy because it's all FastAPI, So we could sub-mount it.
Rodja Trappe: And there's a UI run with statement where you can say, okay, I want to run this with another FAS API app behind that.
Rodja Trappe: And then you give a sub-path and then all your application is running on another FAS API app.
Michael Kennedy: Interesting.
Michael Kennedy: Okay.
Michael Kennedy: And I guess because it's running on U of Ecorn, that's already a production Python app server.
Michael Kennedy: But one of the things that happens frequently when you put stuff into production for more than just a small project is you have a web garden, I guess it's called, where we have multiple workers of UVicorn or something like that.
Michael Kennedy: And that works okay if you set it up that way.
Rodja Trappe: It's not some kind of weird issue.
Rodja Trappe: The main problem is that the NiceGUI architecture demands that the web socket connection comes back to the same server to find the ID.
Michael Kennedy: And if you have multiple workers, then there's round robin from the unicorn to send it to some of the other workers.
Rodja Trappe: And maybe the worker doesn't know about it.
Rodja Trappe: We recently introduced a feature, or maybe it's a year ago already, that we support a storage space where you get access to via Redis.
Rodja Trappe: So you can get the data stored from the user again or so.
Rodja Trappe: then you only need a proxy server which can have sticky sessions where you connect to the server and it routes you back to the right server instance.
Michael Kennedy: And so you can really get a lot of instances running.
Rodja Trappe: And we do this for the documentation page, which is crazy.
Rodja Trappe: Also deployed around the world so that in Taiwan, they are also having a nice snappy interface.
Rodja Trappe: So we need to run, like, it's now 30 servers or so to have really at the edge all the documentation ready.
Michael Kennedy: Wow, that's amazing.
Michael Kennedy: That's so cool.
Michael Kennedy: So you mentioned Redis.
Michael Kennedy: What about Valkey?
Michael Kennedy: Are you familiar with Valkey?
Michael Kennedy: I imagine you could probably just swap it off.
Rodja Trappe: Yeah, it could work very similar, I guess.
Rodja Trappe: We have not tested it yet, to be true, but I think from the concept space, it's the same.
Rodja Trappe: You need to really store the data and get it back to get the synchronization right.
Michael Kennedy: Yeah, I think Valkeyis basically was forked from Redis.
Michael Kennedy: So it probably, it might be able to just work.
Rodja Trappe: Okay, yeah, yeah.
Rodja Trappe: Could be that too simple.
Michael Kennedy: Yeah, because I think Redis changed their license in ways that some people were frustrated with or didn't work for them.
Michael Kennedy: So a group said, okay, well, there was a really permissive license not too long ago.
Michael Kennedy: We're going to make a version of that basically.
Rodja Trappe: Yeah, so it could work out of the box.
Rodja Trappe: Worth a try.
Michael Kennedy: I have not tried it.
Rodja Trappe: I mean, let's be sure.
Michael Kennedy: Okay, a couple other options here that I think are interesting.
Michael Kennedy: I'm a big fan of Docker and Docker Compose.
Michael Kennedy: And you all provide a really interesting way to just run it in Docker.
Michael Kennedy: So a lot of times I find, okay, I'm building, I'm going to deploy an app, so I'm going to copy my code over and set up a, maybe I'd set up UVicorn in that Docker image and then run it.
Michael Kennedy: But because it's all the, you already have that as a concept of it.
Michael Kennedy: You guys have a NiceGUI image and you just map to the source and run it, which I think is actually really nice.
Rodja Trappe: Yeah.
Rodja Trappe: Yeah, it helps to make deployments a little bit easier.
Rodja Trappe: And the NiceGUI image we deploy there has also some fancy features like having a non-root environment where you can simply have your group ID and things you normally not want at the first start when you do it.
Rodja Trappe: but when you are going into production, you really need that.
Rodja Trappe: And it's all packaged away in the stocker container already.
Rodja Trappe: So you can simply use that for running and deploying.
Michael Kennedy: Yeah. Yeah. Yeah. Very cool. All right.
Michael Kennedy: I do want to leave just at least a little bit of time to talk about the 3.0 direction, but the one that there's one here, that's just, we got to talk about it. It's native. Yeah. This, this is incredible. This is the proton, right? Yeah, exactly.
Michael Kennedy: You guys tell me about this. This is great.
Falko Schindler: Yeah, when you run UI run, when you call UI run, you have a parameter native and you will set it to true. And then there is no web browser opening, but a native window. And what used to be a website is now running inside this native window. And yeah, it's behaving like a native app and you don't notice that it's actually a website running.
Michael Kennedy: Yeah, because it uses PyInstaller, or you can use PyInstaller to package it up.
Michael Kennedy: That's the next step, yeah, of course.
Falko Schindler: You can take this app, or you can also use a regular app, which is not native, I guess.
Falko Schindler: I'm not sure.
Falko Schindler: But yeah, once you have a native app, you can package it, and then you can distribute it much easier.
Falko Schindler: Let me throw an idea out there for you.
Michael Kennedy: With either PIPX or uv, you can basically install something from PyPI, right?
Michael Kennedy: In there, you can set a entry point, like my app or whatever, right?
Michael Kennedy: Give it a good name.
Michael Kennedy: And then, so you could just say uvx space, like the name of your package, you know, run, yeah, uvx space package, right?
Michael Kennedy: And it'll just run it and it'll download it and run it from the virtual environment like you need.
Michael Kennedy: I think people could start shipping GUI apps that look like native windows just using uv and uvx.
Falko Schindler: Yeah.
Falko Schindler: Have you tried this?
Falko Schindler: We haven't tried it.
Falko Schindler: But we're just beginning to work with UE and UEX, but UEX is a really powerful tool.
Falko Schindler: You're right.
Michael Kennedy: Yeah, and if you just put an entry point or a script entry into the PyProject.toml, then that would do the launch.
Michael Kennedy: And then if you run it as native, it would show up without a terminal.
Falko Schindler: And you wouldn't even need to package it, right?
Falko Schindler: Yes, exactly.
Michael Kennedy: Yeah, you wouldn't have to package it at all, and it would be cross-platform.
Rodja Trappe: That's an intriguing idea.
Rodja Trappe: Maybe someone has already done it.
Rodja Trappe: So if so, please leave a comment there.
Michael Kennedy: Indeed, indeed.
Michael Kennedy: Okay, let's talk about 3.0.
Michael Kennedy: So if I go to the GitHub right now, and I unzoom my window and go to releases, we're on 2.24.2, but I know really soon you are going to be releasing 3.0.
Michael Kennedy: You have plans for some really cool features.
Michael Kennedy: And sort of the title of this podcast was like, Let's celebrate both NiceGUI and then sort of a milestone of you guys reaching that.
Michael Kennedy: Most of the people will be listening in like four weeks, so you got a little time before.
Michael Kennedy: But let's just talk about what's coming in 3.0.
Falko Schindler: You can scroll a little bit down.
Falko Schindler: There you'll find the release candidate.
Michael Kennedy: Ooh.
Falko Schindler: Around.
Falko Schindler: There we are.
Falko Schindler: Yeah.
Falko Schindler: There it is.
Falko Schindler: Three weeks ago, we released release candidate one.
Falko Schindler: That was before I went on vacation for two weeks.
Falko Schindler: And yeah, we are in the last steps, maybe a few days ahead of releasing 3.0.
Falko Schindler: And yeah, it started with some housekeeping and basically no big breaking changes.
Falko Schindler: And we just wanted to update all dependencies like upgrading from, well, the most important thing was upgrading Tailwind, which is on version 4 for a while now.
Falko Schindler: and we've still been using version 3.
Falko Schindler: But as it turns out, of course, there are some nasty changes that we have to account for so our users don't have to.
Falko Schindler: And that's why it takes quite a while to tackle all tiny difficulties.
Falko Schindler: So that we are trying to release a major version once a year, around once a year, to get all dependencies up to date and that people are not confused on the tailwind documentation, there's a feature which NiceGUI doesn't have.
Falko Schindler: And of course, it depends on the version.
Falko Schindler: But at that time, once in the year, we are liberal. We are free to break some things, but we only want to do it once. So we have to be careful to do it right. And we can't change it a few weeks later again.
Falko Schindler: And we want to have only breaking changes that are okay to migrate. We want to have a migration guide and no nasty things that you only find when you're reading all your code again and with the changes in mind. That's why it can become a bit difficult. Yeah. The new release is really,
Rodja Trappe: like the major version, is really challenging, but also a good point where we can introduce very great and new features which help the code base and NiceGUI to evolve into the thing we envisioned there. And one of the great things we did there is we have this now a new root parameter where you can say UIRun and then you pass one page like a function, simply a function there, and this will be the main page. So it's much more single page application friendly. You simply have one function and you pass it into the UIRun and this is your page. And then inside you can use UI page, subpages, to create subpages, which are then single pages running.
Rodja Trappe: And so it makes it much more easier.
Rodja Trappe: You don't have these boilerplate annotations, at UI page, and then some URL parameters or so, but you can streamline that a little bit.
Rodja Trappe: And things like that are really nice to have in a framework.
Michael Kennedy: Yeah, that sounds really great.
Michael Kennedy: Will it have full spa support?
Michael Kennedy: If somebody writes an app that way, could they right click and say install page?
Michael Kennedy: or install this app so it'll have serviceworker.js and all that kind of business?
Rodja Trappe: Yeah, you can basically do it. We don't have a Python API for the service workers yet, but of course you can always write your special JavaScript or HTML code and pass it along with your Python code and then you can get the data there. But most of the applications when you write them with NiceGUI they rely on this server connection so if you are offline it doesn't make so much sense to to use it and um but still there are if you install something on your desktop um and you connect to it back then of course if you have an internet connection you can load everything and um be right back where you left yeah yeah i think there's two
Michael Kennedy: parts to single page applications more like pwas i guess is the way i want to say it exactly and I know one of the ideas is it can completely work offline
Michael Kennedy: and it uses local DB and all.
Michael Kennedy: And it's just an app that runs locally.
Michael Kennedy: But I think a lot of apps need the server to be doing anything interesting anyway.
Michael Kennedy: You've got to have a very complicated app to do.
Michael Kennedy: If I was building Notion but 100% offline, that's a really complicated app.
Michael Kennedy: But I think it's also really nice to have an app model for the way you interact with it.
Michael Kennedy: So you don't have all the Chrome around.
Michael Kennedy: If you close your browser, you don't necessarily close that.
Michael Kennedy: But also just the speed of loading, you can cache a bunch of things potentially and then sync them with the server.
Michael Kennedy: I think there's still a lot of interesting benefits, even if it requires being connected to work.
Rodja Trappe: Yeah, totally true.
Michael Kennedy: Okay, a couple of questions real quick, and then we're out of time.
Michael Kennedy: First, Alan out there says, will 3.0 have LLM-friendly docs in the sense that could I download something that I could put into my project and tell my agentic coding agent, anytime you need to know about it, this is the one, look here, and then not have to have it always searching different parts of the web and so on.
Falko Schindler: Rodja, remind me, we do have an endpoint for AIs already, right?
Rodja Trappe: Yeah.
Falko Schindler: We don't have the rendered documentation in a single page format, but we prepared for AIs.
Falko Schindler: Yeah.
Rodja Trappe: When you look at the documentation implementation, it's simply Python code running through our PyDocs and getting all the strings out.
Rodja Trappe: And the same mechanics is used to build a text version only, dump down version where you simply have a TXT file.
Rodja Trappe: And I think we provided it a year ago or so already.
Rodja Trappe: And right now the LLMs not know everything of NiceGuy, but a lot.
Rodja Trappe: But if you put this URL in there to have a documentation lookup, it's much, much better.
Michael Kennedy: Okay, that's really awesome.
Michael Kennedy: What about an MCP server?
Rodja Trappe: Have you considered this?
Michael Kennedy: I think it's probably not super different.
Rodja Trappe: It could be a worthwhile addition.
Rodja Trappe: We have not taken the time to do it.
Rodja Trappe: But, of course, contributions in that area would be really nice to make it even better.
Rodja Trappe: I think there are also two ChatGPT endpoints which are primed to answer questions for that.
Michael Kennedy: At least two.
Michael Kennedy: What's the URL?
Michael Kennedy: How do I find it so I can put it in the show notes?
Rodja Trappe: Do you know?
Rodja Trappe: I don't know.
Michael Kennedy: All right.
Michael Kennedy: Give it to me later.
Michael Kennedy: We'll put it in the show notes.
Michael Kennedy: Yeah, give it to me later.
Michael Kennedy: Give it to me later.
Michael Kennedy: Okay.
Michael Kennedy: And then another one is I have a friend who's building really interesting full-fledged SaaS type of application applications using NiceGuy.
Michael Kennedy: And it looks so impressive, what they're building.
Michael Kennedy: It's great.
Michael Kennedy: But what about authentication, multi-tenants, so certain people can only see their data versus all the data?
Michael Kennedy: What's the authentication and multi-tenancy, I guess?
Rodja Trappe: Basically, because we are running FastAPI, you can do anything what FastAPI can do with authentication.
Rodja Trappe: And we also have quite a few examples on the webpage where you can see, okay, how to do OAuth authentication with Google or Runtab authentications.
Rodja Trappe: You could simply build a passphrase input and do a login.
Rodja Trappe: Because when you are looking at it, it's simply a decision what to show the user.
Rodja Trappe: And you have Python at your hands, so you can decide whatever you want.
Rodja Trappe: And you can load the right data from a database or use our local storage system where you can ask, okay, for the user, what are the configurations?
Rodja Trappe: What is he allowed to see?
Rodja Trappe: What are the permissions?
Rodja Trappe: And you can store it there and you can retrieve it from there.
Rodja Trappe: And it's a cookie-signed process, which is a web cookie, which is pretty safe and is right the way to do the authentication.
Michael Kennedy: Yeah.
Michael Kennedy: Okay.
Michael Kennedy: Fantastic.
Michael Kennedy: And a couple of people have asked, including SilverBlade says, will it be possible to switch from Quasar to something else, or would it be possible to switch Tailwind for another utility-type framework like Bulma or something like that?
Falko Schindler: That's a good question.
Falko Schindler: Right now, starting with Tailwind.
Falko Schindler: Tailwind is already a pretty thin layer on top.
Falko Schindler: You can already disable Tailwind, and NiceGUI runs without Tailwind support.
Falko Schindler: And you can pretty easily add other frameworks like Bulma as far as...
Falko Schindler: I haven't tried it, but it looks like you just have to add a CSS file.
Falko Schindler: You can simply add it to your...
Michael Kennedy: Yeah, that's right.
Michael Kennedy: You literally just include the CSS file.
Michael Kennedy: There's no build steps.
Michael Kennedy: And then you just use utility classes there.
Michael Kennedy: So it's plausible.
Falko Schindler: Exactly.
Falko Schindler: And because NiceGUI is pretty agnostic when it comes to classes, you can simply add classes to your elements.
Falko Schindler: And then they will use Bulma if you loaded Bulma.
Falko Schindler: So that's pretty easy. We can think about official support that you can switch between frameworks. Yeah, that could be a feature request we could be thinking about. The more difficult thing is replacing Quasar because the Python implementation of these elements is pretty tightly coupled to the framework.
Falko Schindler: a quasar button behaves a bit differently than maybe some other button.
Falko Schindler: So that's where we would probably have to implement new elements, maybe with a different name or we have to use some global switch.
Falko Schindler: It is not planned right now, but it's not completely off the table because sometimes we get asked if we could get a more modern feel for NiceGUI apps.
Falko Schindler: And Quasar is already a bit dated.
Falko Schindler: The material design is not the very newest.
Michael Kennedy: I do like it, though.
Michael Kennedy: It looks clean and friendly.
Falko Schindler: Especially if you deviate a little bit from the standards.
Falko Schindler: If you remove the shadow, make sharp edges or something, which is pretty easy and nice to do globally.
Michael Kennedy: You can say all my buttons should have these props.
Falko Schindler: Then you can build pretty nice apps, I guess, even with Quasar.
Falko Schindler: But last days, I spent so much time with Quasar Tailwind and their CSS layers, because Tailwind 4 introduced CSS layers.
Falko Schindler: Or they don't introduce it, but they are using them right now.
Falko Schindler: Quasar does not.
Falko Schindler: And Quasar does its own things to make some statements more important than others.
Falko Schindler: And it makes it pretty difficult to integrate with other frameworks.
Falko Schindler: and I started to think about maybe removing Quasar in MySky 4 or 5.
Falko Schindler: But we'll have to see.
Falko Schindler: Maybe Quasar comes out with a new version with a better CSS layering strategy and maybe a new look and feel or maybe a better theming support.
Falko Schindler: Then it's back.
Rodja Trappe: A few weeks ago, we had a pull request merged in where you could add very simply other frameworks on top of you to put them in and replace either the quasar part completely.
Rodja Trappe: Then you cannot write UI button, but you can do it with the underlying mechanics of NiceGUI nonetheless.
Rodja Trappe: But yeah, or you could use it as an addition.
Michael Kennedy: Yeah.
Michael Kennedy: Just to be clear, I'm not saying you should be doing this.
Michael Kennedy: Like you all want to stay focused, but I do think it's interesting.
Rodja Trappe: You know, these people, they're all like,
Michael Kennedy: hey, we're using this other thing.
Michael Kennedy: There's so many features you could do,
Rodja Trappe: and we need to decide, okay, what is going on?
Rodja Trappe: What do we like and what do we not like?
Rodja Trappe: But also what comes from the community as feedback and as feature requests.
Rodja Trappe: We cannot implement everything, but we really like to have a very feature-rich environment which doesn't constrain you so much, which allows you to deviate from the norm, find different aspects and evolve from that.
Falko Schindler: Yeah.
Falko Schindler: And our main guideline is, would it be nice?
Falko Schindler: If another framework would be nice to have a nice guide, then we should maybe do it.
Michael Kennedy: And we are always open to alternatives.
Michael Kennedy: Okay. Sounds great.
Michael Kennedy: All right.
Michael Kennedy: Well, we're pretty much over time.
Michael Kennedy: So that means out of time.
Michael Kennedy: Let's round this out with a quick question as sort of leading into the final call to action for people who are interested in the project.
Michael Kennedy: So first of all, 14,000 GitHub stars, 834, you'll must be super proud of that.
Michael Kennedy: The other one is, are you looking for contributors?
Michael Kennedy: What can people help with?
Michael Kennedy: That kind of thing, right?
Falko Schindler: Yeah, we are definitely always happy about any new contributors.
Falko Schindler: We are always encouraging new users, new members of the community.
Falko Schindler: If they have an idea how to improve it, we encourage them to, hey, do you want to make a pull request?
Falko Schindler: Yeah.
Falko Schindler: Maybe it's the first one ever, but it's a great experience.
Falko Schindler: And then you are an official NiceGUI contributor.
Michael Kennedy: What kind of contributions would you want?
Michael Kennedy: Like, what would be most helpful from the community for you all?
Falko Schindler: Versus maybe it's in certain areas, right?
Michael Kennedy: Yeah, it's so complicated.
Michael Kennedy: Let us handle this part.
Michael Kennedy: It has to be this way.
Falko Schindler: That's a good question.
Falko Schindler: And we don't have a really easy answer about it.
Falko Schindler: There are parts where we reach the edge of our knowledge, where if especially if users are scrolling through the open issues or pull requests and see some topic where they are maybe very experienced and there are we are we're trying to be very transparent about unsolved bugs or feature requests and where we don't know how to do it and yeah maybe even an open issue where we are still missing a reproduction something that that's weird, but we can't reproduce it.
Falko Schindler: Any step forward to solving these issues is helpful.
Falko Schindler: Yeah, especially in areas where we are out of knowledge.
Michael Kennedy: Yeah.
Michael Kennedy: All right.
Michael Kennedy: Sounds great.
Michael Kennedy: All right.
Michael Kennedy: Well, I guess we're going to leave it there with that.
Michael Kennedy: So final call to action.
Michael Kennedy: People want to get started with NiceGUI.
Michael Kennedy: What do you tell them?
Rodja Trappe: Yeah.
Rodja Trappe: Simply pip install NiceGUI or uv install NiceGUI and then launch it up, write some code in it And feel free to give us some notes and things, what you would like to see, but also just experiment with it.
Rodja Trappe: And maybe it doesn't click with everyone, and that's fine.
Rodja Trappe: And maybe there are people who really much more like another framework or even write HTML and simply FastAPI.
Rodja Trappe: But for those who don't want to leave the environment where they are very familiar with, I think NiceGUI is really a good starting point.
Michael Kennedy: Yeah. Awesome. Well, thank you so much.
Michael Kennedy: Congratulations on the great project.
Michael Kennedy: I know tons of people are getting lots of value.
Michael Kennedy: So thanks for being on the show.
Michael Kennedy: Thanks for creating it and sharing it.
Michael Kennedy: Yeah.
Falko Schindler: Thanks for having us.
Falko Schindler: Thank you very much.
Michael Kennedy: Yeah. See y'all.
Michael Kennedy: Bye.
Michael Kennedy: This has been another episode of Talk Python To Me.
Michael Kennedy: Thank you to our sponsors.
Michael Kennedy: Be sure to check out what they're offering.
Michael Kennedy: It really helps support the show.
Michael Kennedy: Posit Connect from the makers of Shiny.
Michael Kennedy: Publish, share, and deploy all of your data projects that you're creating using Python.
Michael Kennedy: Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs.
Michael Kennedy: Posit Connect supports all of them.
Michael Kennedy: Try Posit Connect for free by going to talkpython.fm/posit, P-O-S-I-T.
Michael Kennedy: Agency.
Michael Kennedy: Discover agentic AI with agency.
Michael Kennedy: Their layer lets agents find, connect, and work together, any stack, anywhere.
Michael Kennedy: Start building the internet of agents at talkpython.fm/agency, spelled A-G-N-T-C-Y.
Michael Kennedy: Want to level up your Python?
Michael Kennedy: We have one of the largest catalogs of Python video courses over at Talk Python.
Michael Kennedy: Our content ranges from true beginners to deeply advanced topics like memory and async.
Michael Kennedy: And best of all, there's not a subscription in sight.
Michael Kennedy: Check it out for yourself at training.talkpython.fm.
Michael Kennedy: Be sure to subscribe to the show.
Michael Kennedy: open your favorite podcast app and search for Python.
Michael Kennedy: We should be right at the top.
Michael Kennedy: You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
Michael Kennedy: We're live streaming most of our recordings these days.
Michael Kennedy: 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.
Michael Kennedy: This is your host, Michael Kennedy.
Michael Kennedy: Thanks so much for listening.
Michael Kennedy: I really appreciate it.
Michael Kennedy: Now get out there and write some Python code.
Michael Kennedy: Talk Python, the async is the norm.