jupyter notebook extension to connect to graph databases
Project description
graph-notebook
Python package integrating jupyter notebooks with various graph-stores including Apache Tinkerpop and RDF SPARQL.
Requirements
- Python3.6
- Jupyter Notebooks
Installation
# install the package
pip install graph-notebook
# install and enable the visualization widget
jupyter nbextension install --py --sys-prefix graph_notebook.widgets
jupyter nbextension enable --py --sys-prefix graph_notebook.widgets
# copy static html resources
python -m graph_notebook.static_resources.install
python -m graph_notebook.nbextensions.install
# copy premade starter notebooks
python -m graph_notebook.notebooks.install --destination /notebook/destination/dir
Configuration
In order to connect to your graph database, you have three configuration options.
- Change the host setting in your opened jupyter notebook by running the following in a notebook cell:
%graph_notebook_host you-endpoint-here
- Change your configuration entirely grabbing the current configuration, making edits, and saving it to your notebook by running the following cells:
# 1. print your configuration
%graph_notebook_config
# default config will be printed if nothing else is set:
{
"host": "change-me",
"port": 8182,
"auth_mode": "DEFAULT",
"iam_credentials_provider_type": "ROLE",
"load_from_s3_arn": "",
"ssl": true,
"aws_region": "us-east-1"
}
# 2. in a new cell, change the configuration by using %%graph_notebook_config (note the two leading %% instead of one)
%%graph_notebook_config
{
"host": "changed-my-endpoint",
"port": 8182,
"auth_mode": "DEFAULT",
"iam_credentials_provider_type": "ENV",
"load_from_s3_arn": "",
"ssl": true,
"aws_region": "us-east-1"
}
- Store a configuration under ~/graph_notebook_config.json
echo "{
"host": "changed-my-endpoint",
"port": 8182,
"auth_mode": "DEFAULT",
"iam_credentials_provider_type": "ENV",
"load_from_s3_arn": "",
"ssl": true,
"aws_region": "us-east-1"
}" >> ~/graph_notebook_config.json
Authentication
If you are running a SigV4 authenticated endpoint, ensure that the config field iam_credentials_provider_type
is set
to ENV
and that you have set the following environment variables:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- AWS_SESSION_TOKEN (OPTIONAL. Use if you are using temporary credentials)
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for graph-notebook-1.31.8.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a20901fd68b4b2d0318e0636afc821af5f1f78b506ac0bdf770be45023df3216 |
|
MD5 | 40843f69d8af5ddaafe3e0e272b40b48 |
|
BLAKE2b-256 | 49c3b29c21d891d9742982d84cb1c2e5b819d58f3d8bc25a1dbbf10218ada27f |
Close
Hashes for graph_notebook-1.31.8.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91fef5052b11e790a03664fcc409ebb7b2ed95501156f20befd3e9a845183b7b |
|
MD5 | 2f794b50f6a405985983b7d201690337 |
|
BLAKE2b-256 | b66700422c9e369997411b6c499d2724c6e728b37bcae247b29d5dcf41485d81 |