Python has become very popular for data science applications. It is now possible to access your Stardog Knowledge Graph using Python and our wrapper library called pystardog. Keep reading to see how easy it can be.
1. Download and install Stardog 2. Create a Python virtualenv and install requirements 3. Download the notebook and tutorial dataset 4. Open the notebook 5. Follow the instructions in the notebook
1. Download and install Stardog
Follow the directions here to set up Stardog on your computer.
Test that Stardog is running with
$ stardog-admin server status
2. Create a Python virtualenv and install requirements
This tutorial assumes that you are running Python 3.3 or newer. If that is not the case, follow this page to get a virtualenv created instead of the following steps. I keep my
~/.virtualenvs. If you use a different directory plug it in instead.
Create a virtualenv
python3 -m venv ~/.virtualenvs/tutorial
Activate the virtualenv
pip install pystardog jupyterlab pandas seaborn
3. Download the notebook and tutorial dataset
4. Open the notebook
From within the directory that you saved the notebook and dataset:
5. Follow the instructions in the notebook.
Stardog and your favorite Python libraries make a strong team. I hope this gentle introduction will help you begin your next data masterpiece. Good luck!