polaris.network.checker.checks.busy_nodes#
Functions
|
Searches the network for links that have too many connections |
- polaris.network.checker.checks.busy_nodes.busy_nodes(number_connections: int, path_to_file: PathLike) OrderedDict #
Searches the network for links that have too many connections
- Args:
number_connections (
int
): The maximum “normal” number of links connected to a node- Returns:
occurences (
OrderedDict
): Order dictionary with keys for links and values for number of connections
from polaris.network.network import Network from polaris.network.checker.checks.busy_nodes import busy_nodes net = Network() net.open('path/to/my/network/file.sqlite') # Let's search for nodes with MORE THAN 6 links connected to it results = busy_nodes(number_connections=6) for link, connections in results.items(): print(f'Link {link} has {connections} connections') net.close()