swh.deposit.api.checks module

Functional Metadata checks:

Mandatory fields: - ‘author’ - ‘name’ or ‘title’

swh.deposit.api.checks.check_metadata(metadata: Dict) → Tuple[bool, Optional[Dict]][source]

Check metadata for mandatory field presence.

Parameters

metadata – Metadata dictionary to check for mandatory fields

Returns

True, None if metadata are

ok (False, <detailed-error>) otherwise.

Return type

tuple (status, error_detail)