0

I would like to create a simple in-browser GUI for a Python app. One reason I would like to use Pyforms Web for this is that it seems to require little to no HTML/CSS/JS experience.

I would like it to be able to include an embedded local webpage, namely an interactive Plotly dash app, in the local Pyforms webpage. Is this possible using Pyforms?

There is no mention of embedding in the Pyforms documentation, and I have tried searching for the same thing elsewhere.

1 Answers1

0
**1. create a Plotly Dash app**

    import dash
    import dash_core_components as dcc
    import dash_html_components as html
    import plotly.express as px
    import pandas as pd

    app = dash.Dash(__name__)

# -make a dataframe
# -make a bar chart with plotly express
--------------------------------------------

**2. create a main Pyforms web app**

    from pyforms_web.web import WebApplication
from pyforms_web.web.middleware import WebMiddleware
import web

    render = web.template.render('templates/')

    #-class app(webapp)
# -def init()
# -def home()
# -def routes()

    if whatever == '__main__':
from Pyforms_web.web import run_app
run_app(app, host='0.0.0.0',port=8080)

------------------------------------------
**3. make some HTML**

    #<!DOCTYPE html>
    <head></head>
    <body>
    <iframe src="http://localhost:8050" width="100%" height="500px"
    frameborder="0"></iframe>
    </body>
-------------------- **4. run 1 and 2 at the same time --> 2 terminals or import multiprocessing**
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 13 '23 at 05:31