km3pipe.utils.streamds

Access the KM3NeT StreamDS DataBase service.

Usage:
streamds streamds list streamds upload [-q] CSV_FILE streamds info STREAM streamds get [-f FORMAT] STREAM [PARAMETERS…] streamds (-h | –help) streamds –version
Options:
STREAM Name of the stream. CSV_FILE Tab separated data for the runsummary tables. PARAMETERS List of parameters separated by space (e.g. detid=29). -f FORMAT Usually ‘txt’ for ASCII or ‘text’ for UTF-8 [default: txt]. -q Dryrun! This will upload the parameters with a TEST_ prefix. -h –help Show this screen.

Module Contents

Functions

print_streams() Print all available streams with their full description
print_info(stream) Print the information about a stream
get_data(stream, parameters, fmt) Retrieve data for given stream and parameters, or None if not found
available_streams() Show a short list of available streams.
upload_runsummary(csv_filename, dryrun=False) Reads the CSV file and uploads its contents to the runsummary table
convert_runsummary_to_json(df, comment=’Uploaded via km3pipe.StreamDS’, prefix=’TEST_’) Convert a Pandas DataFrame with runsummary to JSON for DB upload
main()
km3pipe.utils.streamds.log[source]
km3pipe.utils.streamds.RUNSUMMARY_URL = https://km3netdbweb.in2p3.fr/jsonds/runsummarynumbers/i[source]
km3pipe.utils.streamds.REQUIRED_COLUMNS[source]
km3pipe.utils.streamds.print_streams()[source]

Print all available streams with their full description

km3pipe.utils.streamds.print_info(stream)[source]

Print the information about a stream

km3pipe.utils.streamds.get_data(stream, parameters, fmt)[source]

Retrieve data for given stream and parameters, or None if not found

km3pipe.utils.streamds.available_streams()[source]

Show a short list of available streams.

km3pipe.utils.streamds.upload_runsummary(csv_filename, dryrun=False)[source]

Reads the CSV file and uploads its contents to the runsummary table

km3pipe.utils.streamds.convert_runsummary_to_json(df, comment='Uploaded via km3pipe.StreamDS', prefix='TEST_')[source]

Convert a Pandas DataFrame with runsummary to JSON for DB upload

km3pipe.utils.streamds.main()[source]