YAML Interface¶
-
muspy.
load_json
(path: Union[str, pathlib.Path]) → muspy.music.Music[source] Return a Music object loaded from a JSON file.
Parameters: path (str or Path) – Path to the file to load. Returns: Loaded Music object. Return type: muspy.Music
object
-
muspy.
save_json
(path: Union[str, pathlib.Path], music: Music)[source] Save a Music object to a JSON file.
Parameters: - path (str or Path) – Path to save the JSON file.
- music (
muspy.Music
object) – Music object to save.
Note
A YAML schema is available for validating a YAML file against MusPy’s format.