muspy.schemas

JSON, YAML and MusicXML schemas.

This module provide functions for working with MusPy’s JSON and YAML schemas and the MusicXML schema.

Functions

  • get_json_schema_path
  • get_musicxml_schema_path
  • get_yaml_schema_path

Variables

  • DEFAULT_SCHEMA_VERSION
muspy.schemas.get_json_schema_path() → str[source]

Return the path to the JSON schema.

muspy.schemas.get_musicxml_schema_path() → str[source]

Return the path to the MusicXML schema.

muspy.schemas.get_yaml_schema_path() → str[source]

Return the path to the YAML schema.

muspy.schemas.validate_json(path: Union[str, pathlib.Path])[source]

Validate a file against the JSON schema.

Parameters:path (str or Path) – Path to the file to validate.
muspy.schemas.validate_musicxml(path: Union[str, pathlib.Path])[source]

Validate a file against the MusicXML schema.

Parameters:path (str or Path) – Path to the file to validate.
muspy.schemas.validate_yaml(path: Union[str, pathlib.Path])[source]

Validate a file against the YAML schema.

Parameters:path (str or Path) – Path to the file to validate.