Graph Notebook

raw JSON →
5.2.0 verified Sat May 09 auth: no python

A Jupyter notebook extension for connecting to graph databases such as Amazon Neptune and JanusGraph. Version 5.2.0 provides magic commands and visualizations for SPARQL and Gremlin queries. Released monthly.

pip install graph-notebook
error ModuleNotFoundError: No module named 'graph_notebook'
cause Environment not activated or package not installed.
fix
Run pip install graph-notebook in the correct Python environment.
error PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions'
cause Installing as root without write permissions.
fix
Install with --user flag: pip install --user graph-notebook or use a virtual environment.
breaking JupyterLab 4 migration: graph-notebook 5.x only supports JupyterLab 4; upgrade if using Lab 3.
fix Use graph-notebook 4.x for JupyterLab 3 or upgrade to JupyterLab 4.
gotcha Magic commands (%gremlin, %sparql) only work in notebook cells, not in scripts. Using them in plain Python files will cause SyntaxError.
fix Use the Python API (GraphNotebookClient) instead of magic commands in scripts.
deprecated Deprecated: `from graph_notebook import GraphNotebookConfig` removed in v4.0. Use `from graph_notebook.configuration.generate_config import generate_config`.
fix Use generate_config function and GraphNotebookConfig class.
pip install graph-notebook[neptune]

Initialize a Neptune client and fetch status.

from graph_notebook.configuration.generate_config import generate_config
from graph_notebook.neptune.client import NeptuneClient
config = generate_config('neptune', host=os.environ.get('NEPTUNE_HOST', ''), port=8182, use_iam=False)
client = NeptuneClient(config)
print(client.status())