r/nicegui • u/falko-s • 18d ago
NiceGUI 4.0 with Python 3.15 support, a lower memory footprint and up-to-date JavaScript libraries
NiceGUI lets you build web UIs in pure Python, and version 4.0 is here! This major release is all about cleaning up: it removes the APIs deprecated during 3.x, corrects a few defaults and catches up on the bundled JavaScript libraries. Nothing changes as fundamentally as the auto-index page did in 3.0, so most apps should only need small adjustments.
New features and enhancements
- Support Python 3.15
- Use about 14% less memory per connected client, and another 13% on a measured page
- Give text inputs a single empty state, so that the value of
ui.inputand related elements is always astr - Control the pagination bar of
ui.tableindependently ofpagination - Use the safer "spawn" start method for
run.cpu_boundby default - Let
run.io_boundandrun.cpu_boundkeep working inapp.on_shutdownhandlers and respecttask.cancel() - Allow plotly.py 7 for
ui.plotly - Bring the bundled libraries up to date: Quasar 2.35, AG Grid 36, plotly.js 4.2, three.js r187, xterm.js 6 and nipplejs 1.0
Bugfixes
- Prevent custom scene objects and map layers created after an
awaitfrom landing in another client's scene or map - Fix router pages in
app.remove_route()andendpoint_documentationwith current FastAPI versions - Make objects with bindable properties picklable, e.g. as arguments to
run.cpu_bound - Let
ui.leafletadd its layers beforeawait map.initialized()returns
...and lots under the hood
We also updated the remaining Python and JavaScript dependencies, fixed the rendering of our docstrings, sped up the test suite and modernized the development tooling.
⚠️ Upgrading from 3.x?
Please read the full release notes and migration guide on GitHub before upgrading. Python 3.11 is the new minimum, and some changes don't raise any error, so your code won't tell you about them.
Special thanks to our top sponsors DiscoLike Inc., TestMu AI and Lechler GmbH ✨
and all our other sponsors and contributors for supporting this project!
🙏 Want to support this project? Check out our GitHub Sponsors page to help us keep building amazing features!









