API Reference¶
This page provides an overview of all public modules, classes, and functions in the panelini package.
Quick Imports¶
# Core framework
from panelini import Panelini
# Panels (standalone, no Panelini dependency)
from panelini.panels.jsoneditor import JsonEditor
from panelini.panels.visnetwork import VisNetwork, GraphDetailTool
# Utilities
from panelini.panels.visnetwork.utils import data_url_to_bytes
Core¶
The core module provides the main application framework class for building dashboards with pre-designed responsive layouts.
Class |
Description |
|---|---|
Main application class providing a responsive dashboard layout with header, sidebars, main content area, and footer. Built on |
|
Exception raised when a referenced image file cannot be found. |
Panelini – Layout Management¶
The Panelini class provides methods for managing layout regions:
Method |
Description |
|---|---|
|
Replace the main content area with the given list of Panel objects. |
|
Append Panel objects to the existing main content. |
|
Retrieve the current list of main content objects. |
|
Remove a main content object by index. |
|
Remove all objects from the main content area. |
|
Replace the left sidebar content. |
|
Retrieve the current left sidebar objects. |
|
Replace the right sidebar content. |
|
Retrieve the current right sidebar objects. |
|
Make the application servable for |
|
Panel integration hook returning the viewable layout. |
Panelini – Configuration Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
|
Dashboard title displayed in the header. |
|
|
Path to the logo image displayed in the header. |
|
|
URL the logo links to (default: |
|
|
Background image for the header area. |
|
|
Background image for the content area. |
|
|
Directory for static assets. |
|
|
List of Panel objects for the main content area. |
|
|
List of Panel objects for the left sidebar. |
|
|
List of Panel objects for the right sidebar. |
|
|
List of Panel objects for the footer. |
|
|
Enable or disable the left sidebar (default: |
|
|
Show or hide the left sidebar (default: |
|
|
Enable or disable the right sidebar (default: |
|
|
Show or hide the right sidebar (default: |
|
|
Enable or disable the footer (default: |
|
|
Maximum width of sidebars in pixels (default: |
Utility Functions¶
Function |
Description |
|---|---|
|
Convert an image file to a base64-encoded data URL string. |
Panels¶
Independent standalone components usable in any Panel application – with or without the Panelini framework. Each panel wraps a JavaScript library via the AnyWidgetComponent base class and Vue.js.
See the Panels section for usage guides and examples.
panelini.panels.jsoneditor – JSON Schema Form Editor¶
Class |
Description |
|---|---|
JSON Schema-based form editor component. Wraps the json-editor JavaScript library, providing dynamic form generation from JSON Schema definitions with bi-directional Python/JS synchronization. |
Parameters:
Parameter |
Type |
Description |
|---|---|---|
|
|
Current form data as a dictionary. |
|
|
JSON Editor configuration (schema, theme, iconlib, etc.). |
|
|
Whether the editor is initialized and ready. |
|
|
Custom JSON encoder class for serialization. |
Methods:
Method |
Description |
|---|---|
|
Return the current form data. |
|
Set the form data. |
|
Load a new JSON Schema, optionally preserving or replacing the current value. |
panelini.panels.visnetwork – Interactive Network Visualization¶
Class |
Description |
|---|---|
Interactive network/graph visualization component. Wraps vis-network with full support for node/edge manipulation, edit modes, event handling, and batch operations. |
|
|
High-level graph editing UI that composes VisNetwork with JsonEditor for node detail editing, visualization of node data (images, CSV, PDF), and tabular editing. |
VisNetwork – Node Operations¶
Method |
Description |
|---|---|
|
Add a single node to the graph. |
|
Remove a node by its ID. |
|
Retrieve a node dictionary by ID. |
|
Replace all nodes with the given list. |
|
Return all current nodes. |
|
Partially update a single node’s properties. |
|
Batch partial update of multiple nodes. |
|
Update the visual state of nodes (e.g., highlighting). |
VisNetwork – Edge Operations¶
Method |
Description |
|---|---|
|
Add a single edge to the graph. |
|
Remove an edge between two nodes. |
|
Retrieve an edge by ID or endpoint node IDs. |
|
Replace all edges with the given list. |
|
Return all current edges. |
|
Partially update a single edge’s properties. |
VisNetwork – Edit Modes & Actions¶
Method |
Description |
|---|---|
|
Exit edit mode (selection only). |
|
Enter add-node mode (click to place). |
|
Enter add-edge mode (drag to connect). |
|
Remove all nodes and edges. |
|
Merge two nodes, optionally combining their properties. |
|
Execute a list of graph actions atomically. |
|
Execute a single playbook step. |
|
Request current node positions from the frontend. |
GraphDetailTool¶
Method |
Description |
|---|---|
|
Build the complete UI layout with graph, detail pane, and controls. |
|
Display the detail view for a specific node. |
|
Display the multi-node batch editor. |
|
Handle network events (click, select, drag, etc.). |
|
Update a node in the graph and refresh the detail view. |
|
Return the Panel layout for embedding. |
panelini.panels.visnetwork.utils – Utilities¶
Function |
Description |
|---|---|
|
Convert a |
Components¶
Panelini-dependent building blocks that require the Panelini framework. See Components for details.
Status
The components module is currently in planning stage. No implementations exist yet. Contributions welcome.
Full Auto-Generated Reference¶
For complete class signatures, method arguments, and docstrings, see the auto-generated API documentation.