Network3gs.edges_attributes

Network3gs.edges_attributes(names=None, values=None, keys=None)

Get or set multiple attributes of multiple edges.

Parameters
  • names (list[str], optional) – The names of the attribute.

  • values (list[Any], optional) – The values of the attributes.

  • keys (list[tuple[hashable, hashable]], optional) – A list of edge identifiers.

Returns

list[dict[str, Any]] | list[list[Any]] | None – If names is empty, a list containing per edge an attribute dict with all attributes of the edge. If names is not empty, a list containing per edge a list of attribute values corresponding to the requested names. None if the function is used as a “setter”.

Raises

KeyError – If any of the edges does not exist.