Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Python on the clients machine. #623

Open
SuperPauly opened this issue Apr 29, 2024 · 4 comments
Open

Run Python on the clients machine. #623

SuperPauly opened this issue Apr 29, 2024 · 4 comments

Comments

@SuperPauly
Copy link

I want to make a Jupyter style notebook where Python runs on the clients machine.

But looking over the documentation I can not see any premade components or details weather this is possible. I've done it before in Streamlit but I want to move away from it.

I have seen Pyodide and other Jupyter Kernels and was wondering is it possible to run Python code on the client?

@iisakkirotko
Copy link
Collaborator

Hi @SuperPauly!

To clarify - you'd like to have a hosted solara app, where some computation (within a component?) is done on the client's machine? There isn't such a feature built into Solara currently, although Solara should be compatible with Pyodide.

@SuperPauly
Copy link
Author

Hi @SuperPauly!

To clarify - you'd like to have a hosted solara app, where some computation (within a component?) is done on the client's machine? There isn't such a feature built into Solara currently, although Solara should be compatible with Pyodide.

Yeah so I want to make a dashboard that displays data, let's say inside a Dataframe. I then want a section below the Dataframe that is like a Python/Jupyter code cell that I can import sklearn, tensorflow, pytorch or any other data modules. Then import the modules write some code, then run the cell, the output/results will be shown on the Dataframe above.

So the only way is to write the code on the front end and then send it to the backend to be run?

@iisakkirotko
Copy link
Collaborator

Running python code within a Solara app in a context aware way is tricky.

Depending on how much integration you would need between the surrounding app (if you would need one at all) and the code block, pycafe might be a solution. It's still in it's early stages, so there might be missing/incomplete features, but if there are any features you need / want to know if they'll be available in the future, you can get in touch with me via [email protected].

@SuperPauly
Copy link
Author

Running python code within a Solara app in a context aware way is tricky.

Depending on how much integration you would need between the surrounding app (if you would need one at all) and the code block, pycafe might be a solution. It's still in it's early stages, so there might be missing/incomplete features, but if there are any features you need / want to know if they'll be available in the future, you can get in touch with me via [email protected].

Yeah context and security could be an issue unless I hook it up to a Docker container. I might try Pyodide, the Pycafe library looks interesting so I've booked marked it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants