API Reference¶
- class serato_crate.SeratoCrate(crate_data: list[tuple[str, Any]] | None = None)¶
Class representing a Serato Scratch Live (a.k.a. Serato DJ) crate file.
Tracks in the crate are exposed with the tracks attribute as a list of relative Paths.
Note, track paths must be specified relative to the root of the drive the crate is located on. For crates with tracks on multiple drives, multiple crate files should be used. Crates on different drives with the same name are merged by Serato DJ.
- property crate_data: list[tuple[str, Any]]¶
Return this crate in the Serato database format, ready to be encoded into a .crate file.
Called internally by write() when saving the crate to disk.
- Returns:
Crate data in the Serato database format.
- classmethod load(path: Path) SeratoCrate ¶
Load a SeratoCrate from a .crate file.
- Parameters:
path – Path to the .crate file to load.
- Returns:
SeratoCrate instance loaded from the .crate file.
- write(path: Path) None ¶
Write this crate to a .crate file.
- Parameters:
path – Path to the .crate file to write.