nexusLIMS.exporters.registry#
Plugin registry for export destinations.
This module provides the ExporterRegistry singleton that auto-discovers and manages export destination plugins from the destinations/ directory.
Module Contents#
Classes#
Singleton registry for export destination plugins. |
Functions#
Get the global ExporterRegistry singleton. |
Data#
API#
- nexusLIMS.exporters.registry.ExportStrategy#
- class nexusLIMS.exporters.registry.ExporterRegistry[source]#
Singleton registry for export destination plugins.
Auto-discovers plugins from exporters/destinations/ directory by examining all modules for classes that match the ExportDestination protocol (duck typing).
- Variables:
_destinations (dict[str, ExportDestination]) – Registered destination plugins, keyed by name
_discovered (bool) – Whether plugin discovery has been performed
- discover_plugins() None[source]#
Auto-discover plugins from exporters/destinations/ directory.
Walks the destinations/ directory and examines all Python modules for classes matching the ExportDestination protocol. Discovered plugins are instantiated and registered by name.
- get_enabled_destinations() list[ExportDestination][source]#
Get enabled destinations sorted by priority (descending).
Returns only destinations where .enabled is True, sorted by priority (higher priority first).
- Returns:
Enabled destinations in priority order
- Return type:
- export_to_all(context: ExportContext, *, strategy: ExportStrategy = 'all') list[ExportResult][source]#
Export to destinations according to strategy.
- Parameters:
context – Export context with file path and session metadata
strategy – Export strategy to use (default: “all”)
- Returns:
Results from each destination that was attempted
- Return type:
- nexusLIMS.exporters.registry.get_registry() ExporterRegistry[source]#
Get the global ExporterRegistry singleton.
- Returns:
The singleton registry instance
- Return type: