Skip to content

Installation

Introduction â„šī¸

The Euler Graph Database is a knowledge graph viewer that allows users to create, visualize, and manage knowledge graphs. It provides an interactive graphical user interface (GUI) for performing various operations on the knowledge graph such as adding nodes and edges, executing queries, and visualizing the graph.

Installation đŸ’ģ

  1. Install the Package:
        pip install euler-database
    

Running the Application 🚀

To run the application, use the following command:

eulerdb

User Guide

Main Interface

The main interface of the application consists of the following components: - Header: Displays the application name and logo. - Navbar: Provides options to load, visualize, add nodes, add edges, save the graph, and display help/about information. - Query Entry: A text area to enter queries. - Buttons: - Execute Query: Executes the entered query. - Save Query: Saves the entered queries to a file. - Load Query: Loads queries from a file. - Output Areas: - Query Output: Displays the results of executed queries. - JSON Output: Displays the JSON representation of the current graph.

Loading a Graph 📂

  1. Click on the Load Graph button in the navbar.
  2. Select the file containing the graph you want to load.

Visualizing a Graph

  1. After loading a graph, click on the Visualize Graph button in the navbar.
  2. The graph will be displayed in the visualization area.

Adding Nodes

Adding Edges

Saving a Graph

  1. Click on the Save Graph button in the navbar.
  2. Choose the location to save the graph file.

Executing Queries

  1. Enter your query in the Query Entry area.
  2. Click the Execute Query button.
  3. The result of the query will be displayed in the Query Output area.

Saving Queries

  1. Enter your queries in the Query Entry area.
  2. Click the Save Query button.
  3. Choose the location to save the queries file (with .euler extension).

Loading Queries

  1. Click the Load Query button.
  2. Select the file containing the queries.
  3. The queries will be loaded into the Query Entry area.

Example:

from euler.graph_api import KnowledgeGraphAPI
from euler.query_parser import QueryParser
from euler.query_executor import QueryExecutor

# Initialize API and related components
api = KnowledgeGraphAPI()
parser = QueryParser(api.graph)
executor = QueryExecutor(api.graph)

# Add nodes and edges
api.create_node('1', 'Person', {'name': 'Alice'})
api.create_node('2', 'Person', {'name': 'Bob'})
api.create_edge('1', '1', '2', 'knows')

# Query the graph
result = executor.execute_query('FIND (n)-[r]->(m)')
print(result)