nexusLIMS.extractors.plugins#
Plugin package for NexusLIMS extractors.
This package contains extractor plugins that are auto-discovered by the ExtractorRegistry. Any module in this package (or subpackages) that defines a class implementing the BaseExtractor protocol will be automatically registered.
To create a new extractor plugin:
Create a new .py file in this directory
Define a class with these attributes/methods:
name: str (unique identifier)
priority: int (0-1000, higher = preferred)
supports(context: ExtractionContext) -> bool
extract(context: ExtractionContext) -> dict[str, Any]
The registry will automatically discover and register it
No manual registration required!
Examples:
Creating a new extractor plugin::
# plugins/my_extractor.py
from nexusLIMS.extractors.base import ExtractionContext
class MyFormatExtractor:
name = "my_format_extractor"
priority = 100
def supports(self, context: ExtractionContext) -> bool:
return context.file_path.suffix.lower() == '.myformat'
def extract(self, context: ExtractionContext) -> dict:
# Extract metadata
return {"nx_meta": {...}}
Subpackages#
Submodules#
nexusLIMS.extractors.plugins.digital_micrographnexusLIMS.extractors.plugins.orion_HIM_tifnexusLIMS.extractors.plugins.tofwerk_pfibnexusLIMS.extractors.plugins.basic_metadatanexusLIMS.extractors.plugins.tescan_tifnexusLIMS.extractors.plugins.fei_eminexusLIMS.extractors.plugins.edaxnexusLIMS.extractors.plugins.quanta_tif