Documentation Utils

motey.utils.heartbeat.check_heartbeat()[source]

The endpoint himself. Will be executed if the url is requested.

Returns:204 - No Content, if the node is up and running and all the registered callbacks requirements are fulfilled, otherwise 400 - Bad Request.
motey.utils.heartbeat.register_callback(callback)[source]

Helper method to register a new callback.

Parameters:callback – callback to be added to the queue
motey.utils.heartbeat.register_heartbeat(flask_app)[source]

Helper method to register the heartbeat to the Flask webserver. Does not works with other webservers.

Parameters:flask_app – the Flask instance.
class motey.utils.logger.Logger[source]

Wrapper to configure the LogbookLogger.

motey.utils.network_utils.get_own_ip()[source]

Reads out the ip of the device and return them.

Returns:the ip of the device