client
Attributes
Exceptions
Common base class for all non-exit exceptions. |
Classes
Module Contents
- exception client.LeafGraphException
Bases:
ExceptionCommon base class for all non-exit exceptions.
- class client.LeafGraphClient(host: str | None = None, port: int | None = 7687, username: str | None = None, password: str | None = None, **kwargs)
Bases:
gqlalchemy.Memgraph- Parameters:
- build_graph(drop_existing: bool = False) None
Pulls all network lanes from Postgres and updates the graph DB. Check the pgSQL analytics.get_company_network_lanes for details on which lanes are included.
- Parameters:
drop_existing (bool, optional) – Drop existing graph nodes. Defaults to False.
- Return type:
None
- check_lanes(lane_ids: List[str]) int
Given a list of lane IDs, returns the number of lane IDs that exist in the graph.
- delete_disconnected_locations() None
Delete origins and destinations that are not connected to any lanes.
- Return type:
None
- get_all_owners() List[int]
Returns a list of all owner IDs in the graph.
- Returns:
List of owner IDs.
- Return type:
List[int]
- update_from_df(lanes_df: pandas.DataFrame) None
- Parameters:
lanes_df (pandas.DataFrame) –
- Return type:
None
- client.S3_BASE_LANES_FILE = 'adapt_assets/graph_lanes.json'