-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for Jupyter notebooks #86
Comments
Thanks @ahuang11 for this suggestion. We heard the same feature request from many others at PyCon US 2024. What's your suggestion on how a user can trigger the code-to-app conversion? |
A decorator probably?
Or magic command works too I guess, but I like decorator
|
Thanks. I am sitting on the fence between the two options. I feel the magic command is more a Juypte-way of doing things. The downside is that if you want to save the code from Jupyter cells to regular Python scripts, you need to comment out the magic commands. |
Perhaps the most Jupyter way of doing things is if the function is on the last line. If it is, display it. i.e. def hello(your_name: str) -> str:
return f"Hello, {your_name}."
hello |
Thanks. We will support at least one way to do it first. Then we can support more. |
Cool, quick update! I'm wondering if it's possible to, separately, import funix.notebook once at an upper cell, and all subsequent cells will automatically show iframe if there's the function variable at the end? Cell 1 import funix.notebook Cell 2 def hello(a: str) -> str:
return f"Hello {a}!"
hello |
I'll try to work on this idea 👀 |
I am not sure about this idea below because it conflicts with expectations per Jupyter convention. What do you guys think?
|
The expected behavior is as follows:
|
Wondering if it's possible to run in notebook, or at least indirectly.
In Panel, there's
panel_obj.show()
which opens a new browser.The text was updated successfully, but these errors were encountered: