pyphi.provenance.read_metadata#

pyphi.provenance.read_metadata(path)[source]#

Read the provenance and params embedded in a writer’s output file.

Dispatches on the file suffix (.json, .npz, or .parquet) and returns {"provenance": dict, "params": dict}. A file without the expected metadata (not produced by save_json(), save_npz(), or save_dataframe()) raises ValueError, as does an unrecognized suffix.

Parameters:

path (Path | str)

Return type:

dict[str, Any]