from_stream method

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream, password):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
password str The password to open the file.

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream, logger):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
logger ILogger The logger.

Returns: FileType: The detected file type, or FileType.unknown if detection fails.

from_stream

Detects the file type by reading the file signature.

def from_stream(cls, stream, password, logger):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
password str The password to open the file.
logger ILogger The logger.

Returns: FileType: The detected file type, or FileType.unknown if detection fails.

Aliases

These names call from_stream too, limited to the overloads listed.

Alias Accepts
from_stream_stream from_stream_stream(stream, password, logger)
from_stream_stream(stream, password)
from_stream_stream(stream, logger)
from_stream_stream(stream)
from_stream_streams from_stream_streams(stream, password, logger)
from_stream_streams(stream, password)
from_stream_streams(stream, logger)
from_stream_streams(stream)
from_stream_file from_stream_file(stream, password, logger)
from_stream_file(stream, password)
from_stream_string from_stream_string(stream, password, logger)
from_stream_string(stream, password)

See Also