from_extension method

On this page

from_extension

Maps file extension to file type.

def from_extension(cls, extension):
    ...
Parameter Type Description
extension str File extension with or without the period ‘.’.

Returns: FileType: The corresponding file type if supported; otherwise FileType.unknown.

See Also

On this page