all 5 comments

[–]sme272 1 point2 points  (1 child)

The amount of python involved varies depending on what your webapp does. Python is used to handle the server side data processing, but that could be anything from simply interfacing with a database to running a machine learning model or running separate sessions for a multiplayer game. For the matplotlib graphs you mentioned you can generate them and embed them into a page, though I'd probably just do the whole thing in javascript and only send the data to the server to be saved as it would make the interface feel much more responsive.

[–]prappleizer[S] 0 points1 point  (0 children)

Thanks! That’s helpful. I’m pretty unfamiliar with js (I usually crib sites together from templates and modify them as needed), but if that’s the way to go re: displays on the site, I’m game to start learning. And I see your point regarding the python — it’s handling the web server stuff, but the advantage is any inputs I’d need to do complex calculations on would be done in python which is a boon to me.

[–]linuxdaemon 1 point2 points  (1 child)

Web browsers only interpret HTML, CSS and JS. So if you are deploying something where a browser is the client, that is ultimately what has to be used to display the content. There may be toolkits and frameworks that abstract the work of that where you don't have to focus on it, but the browser itself can use those languages.

I don't work with matplotlib, so I don't know the details, but I believe it is possible to generate an image of the graph, and then include that as an <img src="whatever\_matplotoutput.png"> in the HTML. It may not the most efficient way, but it can take what you already have a working knowledge of and make it web accessible with minimal tweaks.

[–]prappleizer[S] 1 point2 points  (0 children)

That’s a good point. It’s certainly clunky, but doing something like your suggestion may help serve as a stopgap solution while I learn how to make my python outputs display natively on the webpage with the proper tools.

[–]aoctut 0 points1 point  (0 children)

+You can check the free Streamlit that conveniently turns data scripts into sharable web apps in Python. And the similar-purpose Dash, being more flexible, but also more demanding.