locan.data.metadata_utils.load_metadata_from_toml#

locan.data.metadata_utils.load_metadata_from_toml(path_or_file_like)[source]#

Turn toml file into protobuf message instances.

Note

Parses Timestamp elements from string ā€˜2022-05-14T06:58:00Zā€™. Parses Duration elements from int in nanoseconds.

Parameters:

path_or_file_like (UnionType[str, bytes, PathLike[Any], BinaryIO, None]) ā€“ File path or file-like for a TOML file.

Returns:

Message instances with name as declared in toml file.

Return type:

dict[str, google.protobuf.message.Message] | None