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

Instead of serve_webpage, just output some html? #3

Open
ivirshup opened this issue Dec 8, 2021 · 1 comment
Open

Instead of serve_webpage, just output some html? #3

ivirshup opened this issue Dec 8, 2021 · 1 comment

Comments

@ivirshup
Copy link

ivirshup commented Dec 8, 2021

Instead of starting a server (which blocks the process), could some static html be used instead?

I'm thinking this could even be done with the ipython _repr_*_ methods?

@gtca
Copy link
Collaborator

gtca commented Dec 8, 2021

A served webpage seems to be very useful when launched from terminal, for instance. One can also see how this can be used to have non-public datasets listed on this webpage available in the local network.
So at least I'd be inclined to keep it.

We can add this Jupyter-specific solution as well but I am not sure about its implementation yet.
It can be implemented as a _repr_html_ method for the MuDataSet class but this is not exposed to the user now so there's hardly any gain. And apart from making this interface public, we'll then probably need to implement a switch for text/html repr... That will go a bit beyond the initial mudatasets scope but if that's useful for anything, that's doable.
Do you have any suggestions?

There is also this of course, not that it's very practical, and it does require a separate session running as well:

from IPython.display import IFrame
IFrame('http://localhost:8000', width=1000, height=300)

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