Skip to content

Examples

Runnable examples are in the examples/ directory.

Scripts

Example Description
pywry_demo_chat.py Minimal ChatManager usage — a single handler function gets event wiring, threading, and state management for free.
pywry_demo_chat_artifacts.py All 7 artifact types (code, markdown, HTML, table, Plotly, image, JSON) yielded from a chat handler.
pywry_demo_chat_magentic.py Gemini-powered data analysis with a Plotly chart and AG Grid as @-mentionable context sources.
pywry_demo_deploy.py Deploy mode with scalable state (memory or Redis), toolbar components, Plotly charts, AG Grid, and URL routing.
pywry_demo_freeze.py Minimal app buildable as a standalone executable via PyInstaller or Nuitka.
pywry_demo_modal.py Modal dialog overlaid on a Plotly chart with settings controls that update the chart in place.
pywry_demo_multi_widget.py Multi-widget dashboard (chart, grid, KPI cards, detail panel) with cross-widget interactions.
pywry_demo_oauth2.py Google OAuth2 sign-in flow with provider configuration and session management.

Notebooks

Example Description
pywry_demo_aggrid.ipynb AG Grid integration — automatic type detection, MultiIndex support, computed columns, row selection, and theming.
pywry_demo_plotly.ipynb Plotly integration with custom modebar buttons, toolbar controls, and bidirectional Python callbacks.
pywry_demo_rendering.ipynb Rendering modes (notebook vs native window), callbacks, Plotly, AG Grid, theme toggling, and alerts.
pywry_demo_toolbar.ipynb Toolbar system — built-in events, input components, multiple positions, collapsible sidebars, and a product dashboard.