A FastAPI-based service that enables GraphXR to connect and visualize graph data stored in PuppyGraph Database. This API service acts as a bridge between GraphXR and PuppyGraph, allowing interactive graph data exploration and visualization.
- Python 3.11+
- Docker and Docker Compose
- PuppyGraph Database instance
-
Clone the repository
-
Start PuppyGraph and PostgreSQL using Docker Compose:
cd puppygraph && docker compose up -d
-
Configure PuppyGraph:
- Visit http://localhost:8081/#/login
- Login with credentials:
- Username: puppygraph
- Password: puppyheap3
- Upload the schema.json file to configure the graph schema
For more details about the supply-chain dataset, visit: https://gdotv.com/2024/07/10/puppygraph-introduction/
- Clone the repository
- Find the docker-compose.yml file and edit the environment variables:
PUPPYGRAPH_USERNAME=puppygraph PUPPYGRAPH_PASSWORD=puppyheap3
- Start the service using Docker Compose:
docker-compose up -d
-
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # Linux/Mac # or .\venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Copy and configure environment variables:
cp env-example .env
-
Start the service:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
Variable | Description | Default |
---|---|---|
PUPPYGRAPH_HOST | PuppyGraph database host | localhost:8182 |
PUPPYGRAPH_USERNAME | Database username | puppygraph |
PUPPYGRAPH_PASSWORD | Database password | puppyheap3 |
SAMPLES_PATH | Path to samples configuration file | samples.yaml |
GET /api/v1/puppygraph/schema
- Retrieve graph schemaPOST /api/v1/puppygraph/execute
- Execute graph queriesGET /api/v1/puppygraph/samples
- Get sample queries
After starting the service, you can use Grove to visualize and interact with your graph data:
-
Open the Grove interface at GraphXR Grove
-
In the server input field at the top, enter your API server URL:
- For local development:
http://localhost:8000
- For remote server: Enter your server's URL
- For local development:
-
Select a graph from the dropdown menu
-
You can now:
- View and select node categories
- Explore relationships
- Execute custom queries
- Visualize query results in an interactive graph
The Grove interface provides an intuitive way to explore your graph data through a visual interface while using the API endpoints described above.
-
create a new project https://graphxr.kineviz.com/ with a grove template
-
download the grove file puppy-graph.grove
-
open the grove tab and drag the code into the panel,you will see the grove's ui in the panel