Skip to content

A Sphinx extension to generate and include a screenshot of a holoviz's panel application into a documentation

License

Notifications You must be signed in to change notification settings

Davide-sd/sphinx_panel_screenshot

Repository files navigation

sphinx_panel_screenshot

PyPI version Conda (channel only) Documentation Status

A Sphinx directive for including the screenshot of an holoviz's panel widget in a Sphinx document.

This package is based on matplotlib's plot directive.

Install

pip install sphinx_panel_screenshot

or:

conda install -c davide_sd sphinx_panel_screenshot 

Take a look at the Installation page to understand how to configure the extension to run on readthedocs.org server.

Usage

.. panel-screenshot::

   floatslider = pn.widgets.FloatSlider(start=0, end=2, value=0.5,
   name="Float Slider")
   radiobutton_group = pn.widgets.RadioButtonGroup(
      name='Radio Button Group', options=['Biology', 'Chemistry', 'Physics'],
      button_type='success')
   radiobox_group = radio_group = pn.widgets.RadioBoxGroup(
      name='RadioBoxGroup', options=['Biology', 'Chemistry', 'Physics'], inline=True)
   select = pn.widgets.Select(name='Select',
      options=['Biology', 'Chemistry', 'Physics'])
   checkbutton_group = pn.widgets.CheckButtonGroup(name='Check Button Group',
      value=['Apple', 'Pear'],
      options=['Apple', 'Banana', 'Pear', 'Strawberry'])
   checkbox = pn.widgets.Checkbox(name='Checkbox')
   col = pn.Column(floatslider, radiobutton_group, radiobox_group, select, checkbutton_group, checkbox)
   col

Take a look at the Examples page to visualize the available customization options.

About

A Sphinx extension to generate and include a screenshot of a holoviz's panel application into a documentation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages