speasy.core.codecs.codecs_registry module

speasy.core.codecs.codecs_registry.get_codec(codec: str) CodecInterface | None[source]

Get a codec by name, extension or mimetype

Parameters:
codecstr

Codec name, extension or mimetype

Returns:
Optional[CodecInterface]

The codec that matches the given name, extension or mimetype, or None if no codec is found

speasy.core.codecs.codecs_registry.load_extra_codecs()[source]
speasy.core.codecs.codecs_registry.register_codec(cls)[source]

Decorator to register a codec in the codecs registry

Parameters:
clsCodecInterface

The codec class to register

Returns:
CodecInterface

The codec class that was registered

speasy.core.codecs.codecs_registry.user_codecs_dir()[source]

Get the user codecs directory, any codec placed in this directory will be automatically registered

Returns:
str

The user codecs directory