DBPlayer
DBPlayer

Reputation: 55

What are the Python Web GUI tool

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

Answers (1)

Falko
Falko

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()

enter image description here

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

Related Questions