isbn_from_doi#
- isbn_from_doi(value, *, hyphenate=True, strict=False)#
Parses an ISBN from a DOI (ISBN-A).
The syntax of an ISBN-A is specified in DOI® System and the ISBN System. The parsed value is additionally validated (check-digit verification).
Added in version 0.3.0.
Warning
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
- Parameters:
- valuestr
The value to be parsed.
- hyphenatebool, default=True
Whether hyphens should be used to separate the elements or not.
- strictbool, default=False
If set, a
ValueErroris raised if an invalid ISBN is passed, otherwiseNoneis returned.
- Returns:
- str
The parsed ISBN.
Examples
>>> from marc21_learn.pid import isbn_from_doi >>> >>> isbn_from_doi("10.978.310/0318152") '978-3-10-031815-2'