Morelia.Stream.sink packageο
Submodulesο
Morelia.Stream.sink.csv_sink moduleο
Send data to CSV file.
- class Morelia.Stream.sink.csv_sink.CSVSink(file_path, pod)ο
Bases:
SinkInterface
Stream data to a CSV file, truncates the destination file each time.
- Parameters:
file_path (
str
) β Path to CSV file to write to.pod (
AquisitionDevice
) β POD device data is being streamed from.
Morelia.Stream.sink.edf_sink moduleο
Send data to EDF file.
- class Morelia.Stream.sink.edf_sink.EDFSink(file_path, pod)ο
Bases:
SinkInterface
Stream data to an EDF file.
- Parameters:
sample_rate β Sample rate of device being streamed from. Used in setting up EDF file.
file_path (
str
) β Path to CSV file to write to.pod (
AquisitionDevice
) β POD device data is being streamed from.
Morelia.Stream.sink.influx_sink moduleο
Send data to InfluxDB.
- class Morelia.Stream.sink.influx_sink.InfluxSink(url, api_token, org, bucket, measurement, pod)ο
Bases:
SinkInterface
Stream data to InfluxDB for real-time monitoring.
- Parameters:
url (
str
) β URL that points to an InfluxDB server.api_token (
str
) β API token to authenticate to InfluxDB. Needs write permissions.org (
str
) β Organization within InfluxDB to write data to.bucket (
str
) β Bucket within InfluxDB to write data to.measurement (
str
) β Measurement within InfluxDB to write data to.pod (
AquisitionDevice
) β 8206-HR/8401-HR/8274D POD device you are streaming data from.
- close()ο
Wrapper around
self.__exit__
for use outside of a context manager.- Return type:
None
- flush(timestamp, packet)ο
Write data to InfluxDB. :meta private:
- Return type:
None
- open()ο
Wrapper around
self.__enter__
for use outside of a context manager.- Return type:
None
Morelia.Stream.sink.sink_interface moduleο
Interface for dataflow sink.