reactivity in pidgy¤
pidgy
allows authors to include python objects in their markdown using jinja
templates.
%reload_ext pidgy
%reload_ext pidgy
## reactive templates
`jinja2` is `pidgy`s preferred template language that allows python objects to be displayed in markdown displays. when templates are used, `pidgy` watches for changes to template variables and will update displays when the values change.
reactive templates¤
jinja2
is pidgy
s preferred template language that allows python objects to be displayed in markdown displays. when templates are used, pidgy
watches for changes to template variables and will update displays when the values change.
### modified `IPython` templates
`pidgy` features modified `jinja2` templates that can access all the variables in the interactive shell. templates are rendered by the `IPython` display system and converted to their web representation.
modified IPython
templates¤
pidgy
features modified jinja2
templates that can access all the variables in the interactive shell. templates are rendered by the IPython
display system and converted to their web representation.
working with interactive widgets¤
### ipywidgets interop
ipywidgets interop¤
if you eat {{cookies.value}} then you consume {{cookies.value * 50}} calories.
(cookies := IntSlider(3, description="🍪"))
if you eat 3 then you consume 150 calories.
(cookies := IntSlider(3, description="🍪"))
#### deploy applications with voila
deploy applications with voila¤
### todo panel interop
todo panel interop¤
## forcing display updates
sometimes you may want to execute a loop that forces updates to the ui. the `shell.weave` holds these abilities.
shell.weave.update()
forcing display updates¤
sometimes you may want to execute a loop that forces updates to the ui. the shell.weave
holds these abilities.
shell.weave.update()
## turn of reactivity
reactivity is a feature of the wo ven display and we can turn that feature off.
shell.weave.reactive = False
turn of reactivity¤
reactivity is a feature of the wo ven display and we can turn that feature off.
shell.weave.reactive = False