Edge()

class Edge(parent=None)

This class describes an Edge object child of Aquarium class.

create(type='', from_key='', to_key='', data={})

Create an edge

Tip

The type of the edge is case sensitive ! By convention, all edges’ type start with a capital letter

Parameters:
  • type (string) – The edge type

  • from_key (string) – The source key

  • to_key (string) – The destination key

  • data (dictionary, optional) – The edge data

Returns:

Edge object

Return type:

Edge

delete()

Delete the edge

Danger

The edge will be completely deleted

Returns:

Deleted edge object from API

Return type:

dictionary

get(populate=False)

Get the edge by its _key

Parameters:

populate (boolean, optional) – Populate edge.createdBy and edge.updatedBy with User object

Returns:

Edge object

Return type:

Edge

replace_data(data={})

Replace the edge data with new ones

Danger

This is replacing all existing edge data. Meaning that you can loose data.

Parameters:

data (dictionary) – The new edge data

Returns:

Edge object

Return type:

Edge

to_dict()

Convert the edge to a dictionary

Returns:

The edge as a dictionary

Return type:

dictionary

update_data(data={}, deep_merge=True)

Update the edge data by merging the existing ones with the new ones

Parameters:
  • data (dictionary) – The new edge data

  • deep_merge (boolean, optional) – Merge nested objects

Returns:

Edge object

Return type:

Edge