grapheen 0.5.0

  • Installing
  • Versions
  • 1

GRAPH Embeddable ENgine with Gremlin API, with no additional dependencies.

See test folder for a lot of examples of usage.

import 'package:grapheen/grapheen.dart';
Grapheen g = new Grapheen();
Pipe vIM = g.addVertex({"name":"Iron Maiden"}); // id=1
Pipe vHM = g.addVertex({"name":"Heavy Metal"}); // id=2
Pipe e1 = g.addEdge(vIM,vHM,"PLAYS"); // id=3
List<int> ids;
ids = g.V(1).outE().inV().ids(); // [2]
ids = g.V("name","Iron Maiden").outE("PLAYS").inV().ids(); // [2]
g.V(1).setProperty("name","Iron 'The best' Maiden");


I am implementing the Gremlin API as needed for my projects, so far I have:

Adding to graph: addVertex , addEdge

Changing the graph: setProperty, remove

Traversing the graph: V, E, inE, outE, bothE, inV, outV, bothV

Filtering pipeline: has, hasNot, IN, CONTAINS

Transforming pipeline: dedup, order (just the property based)


Since the most expected usage is inside the web browser, compiled to javascript. All measurements are in compiled mode in Opera on my MacBook.

  • Sample data is snippet of my dogs database, it has 4.300 vertexes and about 12.000 edges.
  • number is OPERATIONS PER SECONDS, so 500 means, that such workflow, will run 500 times in one second
-----WORKFLOW------------ MEMORY--------WORKFLOW------------- MEMORY---
createVertex          |    87.896 |                       |           |     
load data set         |         5 |                       |           |
query by ID           |   362.894 |                       |           |
query by property     | 1.103.439 |                       |           |
query by two props    |    30.687 |                       |           |
query by edge         |   141.486 |                       |           |
query by named edge   |    76.670 |                       |           |



  • sorting method: first numbers then strings
  • has operators: <, >, <=, >=
  • has operators and order based on sorting method


  • graph visualisation into HTML5 SVG
  • has operators: =, !=, IN, CONTAINS


  • synchronous version
  • in memory index
  • replication


  • graph text loader
  • CSV loader
  • benchmark testing


  • basic functionality of Gremlin

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  grapheen: ^0.5.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:grapheen/grapheen.dart';
Version Uploaded Documentation Archive
0.5.0 Mar 10, 2016 Go to the documentation of grapheen 0.5.0 Download grapheen 0.5.0 archive
0.4.0 Jan 9, 2016 Go to the documentation of grapheen 0.4.0 Download grapheen 0.4.0 archive
0.3.0 Sep 15, 2015 Go to the documentation of grapheen 0.3.0 Download grapheen 0.3.0 archive
0.2.0 Aug 16, 2015 Go to the documentation of grapheen 0.2.0 Download grapheen 0.2.0 archive
0.1.0 Aug 8, 2015 Go to the documentation of grapheen 0.1.0 Download grapheen 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:grapheen/grapheen.dart.

Issues and suggestions

Fix lib/grapheen.dart.

Analysis of lib/grapheen.dart failed with 6 errors, 2 hints, including:

line 75 col 23: The argument type '(String, dynamic) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

line 85 col 19: The argument type '(int) → Null' can't be assigned to the parameter type '(dynamic) → void'.

line 86 col 18: The argument type '(int) → Null' can't be assigned to the parameter type '(dynamic) → void'.

line 92 col 25: The argument type '(String, dynamic) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

line 170 col 16: The argument type '(String, Object) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

Fix lib/src/vis/vertex.dart.

Analysis of lib/src/vis/vertex.dart failed with 1 error:

line 55 col 17: The argument type '(String, Object) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see

Package is too old.

The package was released more than two years ago.

Fix additional 15 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/visualiser.dart (1 error)
  • lib/src/pipe.dart (1 error, 2 hints)
  • lib/src/vis/edge.dart (1 error, 2 hints)
  • lib/replication.dart (1 error)
  • lib/replication_with_reserve_ids.dart (1 error)
  • lib/src/indexer.dart (1 error)
  • lib/element_wrapper.dart (Run dartfmt to format lib/element_wrapper.dart.)
  • lib/loader_csv.dart (Run dartfmt to format lib/loader_csv.dart.)
  • lib/src/pipe_dedup.dart (Run dartfmt to format lib/src/pipe_dedup.dart.)
  • lib/src/pipe_ids.dart (Run dartfmt to format lib/src/pipe_ids.dart.)
  • lib/src/pipe_in_out_e.dart (Run dartfmt to format lib/src/pipe_in_out_e.dart.)
  • lib/src/pipe_in_out_v.dart (Run dartfmt to format lib/src/pipe_in_out_v.dart.)
  • lib/src/pipe_order.dart (Run dartfmt to format lib/src/pipe_order.dart.)
  • lib/src/pipe_q.dart (Run dartfmt to format lib/src/pipe_q.dart.)
  • lib/src/utils.dart (Run dartfmt to format lib/src/utils.dart.)

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use grapheen.dart.


Package Constraint Resolved Available
Dev dependencies
test any