Skip to content

Converters

Media is converted into device-ready formats before upload. Unknown extensions pass through untouched; known ones must convert successfully or a BusyBarConversionError is raised.

busylib.converter

logger module-attribute

logger = logging.getLogger(__name__)

ConverterFn module-attribute

ConverterFn = Callable[[str, bytes], tuple[str, bytes] | None]

convert_for_storage

convert_for_storage(path: str, data: bytes) -> tuple[str, bytes]

Convert a file payload to a device-ready format when supported.

Unknown extensions are passed through unchanged. Known extensions must convert successfully, otherwise a domain-level conversion error is raised.