I have a flask web application with many pages where users can insert some data stored in mysql using sqlalchemy. I would create another page with an interactive dashboard. I googled and I found superset that it seems perfect for my app. It's possible embed apache superset (or similar) into my web app? There are some tutorial?
Since superset_config.py acts as a Flask configuration module, it can be used to alter the settings Flask itself, as well as Flask extensions like flask-wtf, flask-caching, flask-migrate , and flask-appbuilder. Flask App Builder, the web framework used by Superset, offers many configuration settings.
It is possible to embed Apache Superset in any web application using iframe. Copy the URL of the dashboard that you want to embed and add ?standalone=true at the end. This URL can be used in the iframe to render the application. In the above mentioned method you will be seeing login page inside the iframe when you access the dashboard.
Flask App Builder, the web framework used by Superset, offers many configuration settings. Please consult the Flask App Builder Documentation for more information on how to configure it. SQLALCHEMY_DATABASE_URI: by default it is stored at ~/.superset/superset.db SECRET_KEY: to a long random string
In the production environment, you can not use Flask to host your API and you definitely need a production web server like Apache or Gunicorn. Flask is good for development purposes but when you move to production you need to host it on the Web server. Here is an example of Architecture where it can be helpful. Step 1.
It is possible to embed Apache Superset in any web application using iframe. Copy the URL of the dashboard that you want to embed and add ?standalone=true
at the end. This URL can be used in the iframe to render the application.
Problem with the solution:
In the above mentioned method you will be seeing login page inside the iframe when you access the dashboard. You will have to login to the web application and then login to Superset.
Possible solutions
I would recommend the second approach as it would give protection to your data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With