calamari.io.sniff_format#

calamari.io.sniff_format(path)#

Return the detected dialect name for path, or None.

Reads only the file’s signature region (not the data), returning the matching loader’s format_name (e.g. 'MPMS3') or None if no loader claims it. Never raises – an unreadable file is reported as None, same as an unrecognised one; call load() when you need those two cases distinguished.

Return type:

str | None