I have a small web application done in HTML/JS. I wanted to use a Python Visualization inside in that application.
Executing Python component gives the HTML content, which I want to embedded inside the application.
How could I do this? How to call a Python Script inside JS?
-
Have you checked DJango?NPatel– NPatel2014年09月04日 06:45:22 +00:00Commented Sep 4, 2014 at 6:45
-
1@Lafada: No... It is entirely a Javascript application. Want to test out whether I could add a small python component in it. So I have not checked out.Manoj G– Manoj G2014年09月04日 06:50:06 +00:00Commented Sep 4, 2014 at 6:50
-
1If its already developed Javascript application, then Django cant help. Lets wait if any one has this type of problem solvedNPatel– NPatel2014年09月04日 06:51:41 +00:00Commented Sep 4, 2014 at 6:51
1 Answer 1
The easiest way to is to a have Python web microframework doing the data/HTML serving for you. Popular framework for just making tiny data-serving applications is Flask.
Here is an example which serves data from Flask and then uses Bokeh visualization framework to do plots out of it.
Bokeh itself has something called "plot server" designed for serving plot graph data, but as I can see this is vertically integrated with Bokeh visulazation library and might not suit for your use case.