Skip to content

fontlab_glyport.receipt · declarations 001

Back to fontlab_glyport.receipt

validate_receipt

validate_receipt(data: dict, *, public: bool = True) -> list[str]

Return structural errors, rejecting private paths by default.

Public producers must supply pseudonymous identifiers and source-relative paths. Arbitrary private names cannot be inferred from their spelling. No artifacts, source maps or native outcomes are inspected by validation.

write_receipt

write_receipt(receipt: Receipt | dict, path: str | PathLike[str], *, public: bool = True) -> None

Publish validated UTF-8 JSON atomically, refusing every existing path.

Replace finalizes a file in a sibling staging directory; an exclusive hard link publishes the complete file without a check/replace overwrite race. Filesystems without hard links fail explicitly. Cleanup never wraps errors or intercepts SystemExit/KeyboardInterrupt.