Property Graph Exchange Format (PG)

The Property Graph Exchange Format (PG) provides the specification of a labeled property graph data model with serialization formats PG Format, PG-JSON, and PG JSONL. The formats come with applications for converting, visualization, testing, and syntax highlighting.

Example

Example 1: Property graph in PG format, with syntax highlighting and as diagram
# Nodes
alice :person name:"Alice" age:34
bob   :person name:"Bob"   age:32
luna  :dog    name:"Luna"  cute:true

# Edges
alice -- bob :friends since:2020  # undirected
alice -> luna :owns               # directed

flowchart LR
    alice["<b>alice</b><br/><u>person</u><br/><i>name: Alice</i><br/><i>age: 34</i>"]
    bob["<b>bob</b><br/><u>person</u><br/><i>name: Bob</i><br/><i>age: 32</i>"]
    luna["<b>luna</b><br/><u>dog</u><br/><i>name: Luna</i><br/><i>cute: true</i>"]
    alice -- "<u>friends</u><br/><i>since: 2020</i>" --- bob
    alice -- "<u>owns</u>" --> luna

Example 2: Same graph in condense PG-JSONL format
{"type":"node","id":"alice","labels":["person"],"properties":{"age":[34],"name":["Alice"]}}
{"type":"node","id":"bob","labels":["person"],"properties":{"age":[32],"name":["Bob"]}}
{"type":"node","id":"luna","labels":["dog"],"properties":{"cute":[true],"name":["Luna"]}}
{"type":"edge","from":"alice","to":"bob","labels":["friends"],"properties":{"since":[2020]},"undirected":true}
{"type":"edge","from":"alice","to":"luna","labels":["owns"],"properties":{}}

Applications

  • pgformat Python package and command line application to parse and serialize Property Graph Exchange Format

  • pg-formatter web application to try out, validate and vizualize property graphs in PG format

  • syntax highlighting definitions of PG format for multiple highlighting engines

  • pgraphs property graph converter command line application and programming library NPM Version

  • PG Test Suite for implementations

  • Blitzboard dashboard web application for graph data

Feedback and Sources

Feedback and questions are welcome. There is a discussion board!

The pg-format organization at GitHub contains relevant git repositories and corresponding issue trackers.

Publications