| """ | |
| Lightweight package init. | |
| Avoid importing heavy submodules at import-time to prevent partially | |
| initialized modules and mysterious ImportErrors on Spaces. | |
| PEP 562-style lazy export of symbols from video_processor. | |
| """ | |
| from typing import List | |
| __all__ = ["CoreVideoProcessor", "VideoProcessor", "ProcessorConfig", "ProcessingConfig"] | |
| def __getattr__(name): | |
| if name in __all__: | |
| # Lazy import to avoid circular/early import errors | |
| from .video_processor import ( | |
| CoreVideoProcessor, | |
| VideoProcessor, | |
| ProcessorConfig, | |
| ProcessingConfig, | |
| ) | |
| mapping = { | |
| "CoreVideoProcessor": CoreVideoProcessor, | |
| "VideoProcessor": VideoProcessor, | |
| "ProcessorConfig": ProcessorConfig, | |
| "ProcessingConfig": ProcessingConfig, | |
| } | |
| return mapping[name] | |
| raise AttributeError(f"module {__name__!r} has no attribute {name!r}") | |
| def __dir__() -> List[str]: | |
| return sorted(list(globals().keys()) + __all__) | |