API reference¶
A handwritten overview of the public API, organised by what you’re most likely to import. For exhaustive signatures and docstrings jump straight to the auto-generated reference.
Quick imports¶
# Core framework
from panelini import Panelini
# Core with the AI chat enabled
app = Panelini(title="My app", use_ai=True)
# Panels — standalone, no panelini dependency
from panelini.panels.jsoneditor import JsonEditor
from panelini.panels.visnetwork import VisNetwork, GraphDetailTool
from panelini.panels.ai import AiChat
# Utilities
from panelini.panels.visnetwork.utils import data_url_to_bytes
Core¶
panelini.main.Panelini¶
The dashboard shell. Built on param.Parameterized, so every constructor argument below is also a reactive attribute you can set at runtime.
Layout methods¶
Method |
What it does |
|---|---|
|
Replace the main-area content. |
|
Append to the main area. |
|
Return the current main-area objects. |
|
Remove one object by index. |
|
Remove everything from the main area. |
|
Same as above for the left sidebar. |
|
Same as above for the right sidebar. |
|
Same as above for the footer. |
|
Make the app servable via |
|
Return the composed Panel layout. |
Parameters¶
Parameter |
Type |
Default / notes |
|---|---|---|
|
|
Dashboard title shown in the header. |
|
|
Header logo. Defaults to the bundled Panelini mark. |
|
|
URL the logo links to (default: |
|
|
Header background. |
|
|
Content background. Same |
|
|
Directory served as static assets. |
|
|
Initial main-area objects. |
|
|
Initial objects for each region. |
|
|
Show the left sidebar (default: |
|
|
Expand state of the left sidebar (default: |
|
|
Show the right sidebar (default: |
|
|
Expand state of the right sidebar (default: |
|
|
Show the footer (default: |
|
|
Max sidebar width in px (default: |
|
|
Inject the AI chat panel (default: |
|
|
System prompt for the AI backend. |
|
|
Greeting shown in the chat pane. |
|
|
Custom |
Helpers¶
Symbol |
Description |
|---|---|
|
Read an image from disk and return a |
|
Raised when a referenced image path doesn’t exist. |
Panels¶
panelini.panels.jsoneditor.JsonEditor¶
JSON-Schema form editor wrapping json-editor.
Parameters: value (dict), options (dict), ready (bool), encoder (JSON encoder class).
Methods:
Method |
Description |
|---|---|
|
Current form data. |
|
Set form data. |
|
Swap schemas, optionally preserving or seeding values. |
See JsonEditor for usage, or the full API: panelini.panels.jsoneditor.jsoneditor.JsonEditor.
panelini.panels.visnetwork.VisNetwork¶
Interactive network graph wrapping vis-network. Full node/edge manipulation, edit modes, file-drop handling, and event callbacks.
Node operations¶
Method |
Description |
|---|---|
|
Add a single node. |
|
Remove a node by ID. |
|
Retrieve a node dict. |
|
Replace all nodes. |
|
All current nodes. |
|
Partial update of one node. |
|
Partial update of many nodes. |
|
Update visual state (e.g. highlighting). |
Edge operations¶
Method |
Description |
|---|---|
|
Add a single edge. |
|
Remove an edge between two nodes. |
|
Retrieve an edge. |
|
Replace all edges. |
|
All current edges. |
|
Partial update. |
Modes & actions¶
Method |
Description |
|---|---|
|
Exit edit mode. |
|
Click to place new nodes. |
|
Drag to connect nodes. |
|
Remove all nodes and edges. |
|
Merge two nodes. |
|
Execute a list of actions atomically. |
|
Run a single playbook step. |
|
Ask the frontend for current positions. |
panelini.panels.visnetwork.GraphDetailTool¶
High-level graph workspace composing VisNetwork and JsonEditor. See GraphDetailTool.
panelini.panels.visnetwork.utils.data_url_to_bytes¶
Convert a data: URL to raw bytes. Useful when unpacking dropped files from the graph.
panelini.panels.ai.AiChat¶
LangChain-backed chat panel with a markdown preview pane, tool toggles, and export/import. See AI Chat Panel.
Required extra: panelini[ai].
Key attributes:
Attribute / method |
Description |
|---|---|
|
Constructor. All args optional. |
|
Panel objects for the main area. |
|
Panel objects for the sidebar. |
Underlying machinery:
Class / function |
Role |
|---|---|
|
Provider/model/tool management, tool-call loop, export/restore. |
|
Provider-agnostic LangChain wrapper with streaming + tool binding. |
|
Factory that builds an |
|
Load and validate a YAML config. Auto-discovery rules live here. |
|
Frozen dataclasses describing the loaded config. |
|
Returns the current time, tz-aware. |
|
Renders markdown in the preview pane. |
Full auto-generated reference¶
Every public module, class, and function — generated from source docstrings — lives in the auto-generated reference:
All modules, every signature, every docstring.
High-level picture of how the pieces fit together.