Skip to content

bpsagar/pygraphdb-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

pygraphdb-prototype

A Distributed Graph Database

Requirements

  • Python 3
  • Pyparsing

Getting Started

  1. Start a master process:

$ python master.py config/master.ini

Edit master.ini to configure the ports for communication

  1. Start a worker process:

$ python worker.py config/worker.ini

Edit worker.ini to configure the database location

  1. Executing Queries:
  2. Command line:
`$ python query.py {query}`
  1. Using the library:
```
from pygraphdb.services.client.clientapi import ClientAPI`
client = ClientAPI()
client.connect()
msg = client.execute(query)
```

Example Queries:

  • INSERT NODE Actor { Name: 'Leonardo Dicaprio', Height: '6.0' }
  • INSERT NODE Actor { Name: 'Tom Hardy', Height: '6.1' }
  • FIND actor:Actor where actor.Height > '5.0' return actor.Name
  • INSERT NODE Movie { Title: 'Inception', RunTime: '90min' }
  • INSERT EDGE ActsIn actor:Actor, movie:Movie where movie.Title == 'Inception' && actor.Name == 'Leonardo Dicaprio'
  • INSERT EDGE ActsIn actor:Actor, movie:Movie where movie.Title == 'Inception' && actor.Name == 'Tom Hardy'
  • FIND actor:Actor -:ActsIn> movie:Movie where movie.Title == 'Inception' return movie.Title, actor.Name

About

A Distributed Graph Database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published