Skip to content
Jordan Matelsky edited this page Oct 11, 2020 · 1 revision

Grand aims to reduce the difficulty of running graph algorithms at scale, while still preserving a familiar API. You can think of Grand as the Dask.DataFrame of graph technologies: Write using a familiar syntax, but let Grand handle running at scale behind the scenes.

The most obvious way to illustrate this is with an example. Here, we create a new graph using NetworkX syntax, but rather than cramming everything in RAM, data are stored in a SQL database:

import grand
from grand.backends import SQLBackend

G = grand.Graph(backend=SQLBackend("sqlite:///demo.db"))

G.nx.add_edge("foo", "bar")

Most networkx functions will work on a Grand graph: Just call them on G.nx:

print(G.nx.degree())

Now let's talk about Grand magic: Even though we created this graph using networkx function calls, we can interact with it using other "dialects" — such as iGraph:

print(len(G.igraph.vs)) # `2`

The intention of these dialects is for any graph library that is compatible with igraph or networkx to also be compatible with Grand. In other words, Grand automatically re-interprets slow, Python based algorithms as fast operations that run in Grand backends such as SQL or DynamoDB.

Learn more about Dialects here.

Learn more about Backends here.

Clone this wiki locally