normalize_doi#

technote.metadata.doi.normalize_doi(value)#

Normalize a DOI into its bare form, 10.NNNN/suffix.

Parameters:

value (str) – A DOI, either in its bare form or expressed as a doi.org URL or with a doi: prefix. Whitespace around the DOI, and between a prefix and the DOI, is ignored.

Returns:

The bare DOI.

Return type:

str

Raises:

ValueError – Raised if the value is not a syntactically-valid DOI.