Notebooks
It's pretty easy to access ApertureDB via notebooks after installing and setting up Python SDK as explained here.
Specific Flavors of Notebooks
- Google Colab
- Jupyter Notebooks
- Workflow
Instead of entering your connection details every time you restart your kernel,
you can setup colab secrets corresponding to ApertureDB as a one time activity.
The easiest way to do that in Google Colab is to set the APERTUREDB_KEY secret.
After you have done this once, any calls to CommonLibrary.create_connector() should work seamlessly.
The aperturedata/aperturedb-notebook image includes the Python SDK and JupyterLab.
Set PASSWORD in your environment to a notebook login password and
APERTUREDB_KEY to your database connection key,
then start the notebook container:
docker run --interactive --tty \
--publish 127.0.0.1:8888:8888 \
--env PASSWORD --env APERTUREDB_KEY \
aperturedata/aperturedb-notebook
Open http://localhost:8888 and sign in with the notebook password.
CommonLibrary.create_connector() reads the database connection key supplied
to the container. Its database hostname must be reachable from the container;
localhost within a container refers to that container's own loopback interface.
For a local database, the Docker Compose deployment guide defines the database services, published ports, credentials, and TLS settings. The notebook connects to that database as a separate client.
If you are using the ApertureDB Cloud, then you can also launch a Jupyter Notebook as a Workflow. See the Jupyter Notebooks Workflow for more details.