src.utils.helperFunctions module

helperFunctions.py contains utility functions that could be used anywhere in the project.

src.utils.helperFunctions.distance(p0, p1)
src.utils.helperFunctions.lineToVector(line)

Parses a line to an object with a vector.

Parameters

line (str) – The line that needs to be parsed, must contain a object followed by a numbers

Returns

The object and its vector

Return type

(str, [float])

src.utils.helperFunctions.printColoured(message, service, color)

Print the message in the given color (should be different for each microservice)

Parameters
  • message (string) – The actual message

  • service (string) – The name of the microservice

  • color (string) – The name of the color used