Intro
We offer a Jupyter notebook which provides an interative introduction to the AllegroGraph Python client.
Setup and Installation
The following instructions assume that you have access to an x86-64 Linux system.
Download and install miniconda:
Miniconda is a Python distribution. Download and install it using the following commands:
curl -O -f https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
rm -f Miniconda3-latest-Linux-x86_64.sh
Download and AllegroGraph
Use the following commands to download AllegroGraph and to install into the /tmp/ag704 directory.
curl -O -f http://franz.com/ftp/pri/acl/ag/ag7.0.4/linuxamd64.64/agraph-7.0.4-linuxamd64.64.tar.gz
tar xf agraph-7.0.4-linuxamd64.64.tar.gz
rm -fr /tmp/ag704
agraph-7.0.4/install-agraph /tmp/ag704 -- --non-interactive --super-user test --super-password xyzzy
rm -fr agraph-7.0.4 agraph-7.0.4-linuxamd64.64.tar.gz
Start AG server
/tmp/ag704/bin/agraph-control --config /tmp/ag704/lib/agraph.cfg start
Download the notebook
curl -O -f https://franz.com/ftp/pub/agraph/python-client/ag-jupyter.tar.gz
tar xf ag-jupyter.tar.gz
rm -f ag-jupyter.tar.gz
Set up environment for notebook
The following commands assume you are in a bash shell.
Use the following command to prepare an Python environment for the Jupyter notebook software. Note that this command takes a while to operate.
~/miniconda3/bin/conda create -n ag-notebook -y -c franzinc -c conda-forge jupyter agraph-python ipyleaflet
Activate the environment
source ~/miniconda3/bin/activate ag-notebook
Start Jupyter Notebook
cd ag-jupyter && jupyter notebook
A browser window will automatically be launched. If that does not work, visit the URL presented on the terminal.
In the browser, click on tutorial.ipynb
When done, terminate the notebook server by hitting control-C.