write_document

function of dascore.utils.documents source

write_document(
    document: Mapping ,
    path: Path ,
    file_format: Literal[‘json’, ‘yaml’] ,
)-> ‘Path’

Write a mapping to a file, in the format named, and return the path.

Parent directories are made as needed, so saving into a directory which is not there yet works.