Coverage for openhcs/io/streaming.py: 80.0%
5 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-01 18:33 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-01 18:33 +0000
1"""
2Streaming backend interfaces for OpenHCS.
4This module provides abstract base classes for streaming data destinations
5that send data to external systems without persistent storage capabilities.
6"""
8from abc import ABC
9from openhcs.io.base import DataSink
12class StreamingBackend(DataSink):
13 """
14 Abstract base class for streaming data destinations.
16 Provides interface for backends that stream data to external systems
17 (visualizers, networks, etc.) without persistent storage capabilities.
19 Inherits only save operations from DataSink - no file system operations.
20 Concrete implementations should use StorageBackendMeta for automatic registration.
21 """
23 # Only implements save() and save_batch() from DataSink
24 # No additional abstract methods - streaming backends are minimal
26 def cleanup(self) -> None:
27 """
28 Optional cleanup method for streaming backends.
30 Override if backend needs resource cleanup (connections, shared memory, etc.).
31 Default implementation is no-op.
32 """
33 pass