Plugin Overview
A Nessie plugin is a Python function decorated with @plugin("Name") that returns a dictionary describing which actions it handles, which actions it requires from other plugins, and what setup data it needs from the user.
Plugin Anatomy
from nessie_api.models import Action, Graph, plugin, SetupRequirementType
from nessie_api.protocols import Context
# 1. Define handler functions
def my_handler(action: Action, context: Context) -> Graph:
path = action.payload["File Path"]
# ... load data, build Graph, return it
return graph
# 2. Register the plugin using the @plugin decorator
@plugin("My Plugin Name")
def my_plugin():
return {
"handlers": {
"load_graph": my_handler, # action → function
},
"requires": [ # other actions this plugin needs
"filter_graph",
],
"setup_requires": { # user-facing setup fields
"File Path": SetupRequirementType.STRING,
"Is Directed": SetupRequirementType.BOOLEAN,
},
}
Plugin Registration (pyproject.toml)
For the platform to auto-discover your plugin, declare it as an entry point in pyproject.toml:
[project.entry-points."nessie_plugins"]
my_plugin = "my_package.module:my_plugin"
After pip-installing your package (even with pip install -e .), the platform will discover and load it automatically.
SetupRequirementType Values
| Value | UI Input | Python type |
|---|---|---|
SetupRequirementType.STRING | Text input | str |
SetupRequirementType.BOOLEAN | Checkbox | bool |
SetupRequirementType.NUMBER | Number input | float |
SetupRequirementType.FILE | File picker | str (path) |
Official Plugins
Datasource Plugins
Datasource plugins handle the load_graph action and convert an external data source into a Nessie Graph.
SQLite Relational DB stable
Converts a SQLite database into a graph: one node per row, one edge per foreign-key reference. Supports both directed and undirected graphs. Handles composite primary keys.
NPM Package Dependencies stable
Crawls the npm registry concurrently (up to 500 packages, 30 parallel workers) and builds a directed dependency graph with version, description, and license attributes on each node.
Python AST Sourcing alpha
Parses a Python source file using the AST and builds a graph of modules, classes, functions, and call relationships.
Visualizer Plugins
Visualizer plugins handle the visualise_graph action. They receive a Graph and return an HTML string containing SVG nodes and edges. The web UI injects this HTML and then runs a D3 physics simulation on top.
Visualiser Simple stable
Renders each node as a labeled circle. Minimal and fast. Good for large graphs. Edges are lines with optional arrowheads for directed graphs.
Visualiser Block stable
Renders each node as a card (block) showing the node ID in a header row and all attribute key-value pairs below. Best for attribute-rich graphs like database schemas.
Manipulation Plugins
GraphManipulationPlugin stable
Handles
filter_graph. Applies a list of FilterExpression objects against node attributes, then optionally applies a free-text search. Returns a subgraph of matching nodes and their connecting edges.UI Plugin
Nessie Web stable
Handles the
render action. Reads all workspace state from Context, inlines CSS and JS assets, calls the active visualizer for each workspace, and renders the full Jinja2 HTML template. No asset server needed — everything is inlined.