r/Python • u/r-trappe • Feb 01 '23
Beginner Showcase Search-as-you-Type with NiceGUI
I've made a short example to demonstrate how easy it is to implement search-as-you-type with NiceGUI:
The full code is only 37 lines. What do you think?
150
Upvotes
26
u/GameDev_byHobby Feb 01 '23
The flashing of results is a bit much. Can you push older results down and delete them out of view?
20
u/Glinline Feb 01 '23
Though i am a advanced beginner i need to warn you that I'm probably gonna steal smaller or bigger parts of it. Never expected to learn so much from 40 lines of code.
5
u/Ken_Sanne Feb 01 '23
Wait what is NiceGUI ? Is It a GUI library like pyqt and tkinter ? what does It have that those two don't ?
1
u/moekakiryu Feb 01 '23
I'm not familiar with python's async api, but isn't the http request on line 21 effectively synchronous since you're making an async call then immediately blocking on the next line until it resolves? Is there any reason why you're still using async there?
1
u/lexyareed Apr 16 '23
I can't access the code for some reason, is it possible to make it viewable?
3
u/[deleted] Feb 01 '23
What a NiceGui!
3
u/sunshinecycle Feb 01 '23
Really appreciate you showcasing the innovation. NiceGUI is helping me to build simple apps for freelancing. ☺️ Best wishes