in spectator/protocol_parser.py [0:0]
def parse_protocol_line(line: str) -> Tuple[str, MeterId, str]:
"""Parse a SpectatorD protocol line into component parts. Utility exposed for testing."""
symbol, id, value = line.split(":")
# remove optional parts, such as gauge ttls
symbol = symbol.split(",")[0]
id = id.split(",")
name = id[0]
tags = {}
for tag in id[1:]:
k, v = tag.split("=")
tags[k] = v
return symbol, MeterId(name, tags), value