snews_pt.snews_pt_utils

Utility tools for snews_pt

Attributes

log

default_detector_file

Functions

set_env([env_path])

Set environment parameters

retrieve_detectors([detectors_path])

Retrieve the name-ID-location of the participating detectors.

isnotebook()

Tell if the script is running on a notebook

display_gif()

Some fun method to display an alert gif

set_name([detector_name, _return])

set your detector's name.

Module Contents

snews_pt.snews_pt_utils.log[source]
snews_pt.snews_pt_utils.default_detector_file[source]
snews_pt.snews_pt_utils.set_env(env_path=None)[source]

Set environment parameters

Parameters:

env_path (str, (optional)) – path for the environment file. Use default settings if not given

snews_pt.snews_pt_utils.retrieve_detectors(detectors_path=default_detector_file)[source]

Retrieve the name-ID-location of the participating detectors.

Parameters:

detectors_path (str, optional) – path to detector properties. File needs to be in JSON format

Return type:

None

snews_pt.snews_pt_utils.isnotebook()[source]

Tell if the script is running on a notebook

snews_pt.snews_pt_utils.display_gif()[source]

Some fun method to display an alert gif If running on notebook.

snews_pt.snews_pt_utils.set_name(detector_name='TEST', _return=False)[source]

set your detector’s name. Messages sent with detector_name=”TEST” will be ignored at the server Alerts can still be subscribed and listened as “TEST”