jankatins / knitpy

knitpy: Elegant, flexible and fast dynamic report generation with python
https://github.com/jankatins/knitpy
Other
368 stars 29 forks source link

integration with flexx #28

Closed datnamer closed 3 years ago

datnamer commented 9 years ago

It would be cool to see flexx + bokeh become the shiny of pydata.

Maybe interactive knitpy documents can one day be served up with flexx.

https://github.com/zoofIO/flexx

jankatins commented 9 years ago

Unfortunately there isn't yet a "shiny" version in python :-( I think the most promosing approach would be a notebook server with only one cell (see here: https://lambdaops.com/share-cell/)

datnamer commented 9 years ago

You don't think Flexx can be a candidate? What about bokeh+blaze server?

jankatins commented 9 years ago

Re fexx: I don't know, this is actually the first time heard about it :-)

The above share-cell solution has one nice big advantage: it works with a plain ipython notebook server and supports the ipython widgets (the @interact part in the default cell). So the only thing missing is removing the possibility to change the code via the frontend (which probably means that one has to change the backend or add a layer, though :-( ).

datnamer commented 9 years ago

That sounds cool...But shiny has lots of interesting UI components, dashboarding, reactive programming etc and interopt with JS packages through HTML widgets that I don't think ipython can replicate.

Flexx can make real apps, has a cool dsl for UI creation, desktop fallback and python->JS translation among other things. I think if we get pydata and maybe continuum behind it, it could be awesome. Also great synergy with bokeh.

There is a beautiful and similar effort from julia land: https://shashi.github.io/Escher.jl/

CC: @pzwang

jankatins commented 9 years ago

@datnamer There are a few widgets for ipython (the easy ones at least: ranges of input values, etc...).

Anyway: I'm sorry to say this, but "shiny" functionality is currently low priority for me, as long as the other knitr options (chunk/ YAML header) are not yet done. IMO we need first a shiny-alike server and then can think about how to integrate knitpy/rmarkdown syntax with that system.

pzwang commented 9 years ago

FWIW, Bokeh has most of the core things that are needed for "Shiny for Python". Additionally, for the things that are missing, we are actively planning them out and starting work on them.

A "single-cell notebook" coupled with the Interactor/widget system for IPython is an easy way to start, but I think its capability is quickly limited by the fact that ultimately, IPython is about just remotely executing Python code, whereas a huge amount of the infrastructure for something like Shiny involves building a client-server React.js-like system, primarily for brokering DOM/JS events. This is not provided by the IPython system, and is really orthogonal to its needs. This also happens to be what we have already built in Bokeh. :-)

datnamer commented 9 years ago

@pzwang sounds great, looking forward!