Reputation: 55
I have a requirement of building WebUI ( not GUI but WEB UI ). What I want to do is build multiple text editors in a single page with buttons and on the click action of these buttons, text written in each editor needs to be saved in a file and submitted to command line tool
I am new to Python and I want to use some low code WEB UI tool for above purpose, can any one please suggest the best approach for this ?
Upvotes: 2
Views: 492
Reputation: 17887
With NiceGUI you can write such UIs with only a few lines of Python code:
from nicegui import ui
editor = ui.input().props('type=textarea')
def save():
with open('text.txt', 'w') as f:
f.write(editor.value)
ui.button('Save', on_click=save)
ui.run()
That's it. No need for HTML, JavaScript, CSS or any web framework like Flask, FastAPI, Django etc.
(Disclaimer: I'm one of the developers of NiceGUI.)
Upvotes: 2