You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pydantic_extra_types/isbn.py
+35-14Lines changed: 35 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
"""
2
-
The `pydantic_extra_types.isbn` module provides functionality to recieve and validate ISBN
3
-
(International Standard Book Number) in 10-digit and 13-digit formats. The output is always ISBN-13.
2
+
The `pydantic_extra_types.isbn` module provides functionality to recieve and validate ISBN.
3
+
4
+
ISBN (International Standard Book Number) is a numeric commercial book identifier which is intended to be unique. This module provides a ISBN type for Pydantic models.
4
5
"""
5
6
6
7
from __future__ importannotations
@@ -12,14 +13,13 @@
12
13
13
14
14
15
defisbn10_digit_calc(isbn: str) ->str:
15
-
"""
16
-
Calc a ISBN-10 last digit from the provided str value. More information of validation algorithm on [Wikipedia](https://en.wikipedia.org/wiki/ISBN#Check_digits)
16
+
"""Calc a ISBN-10 last digit from the provided str value. More information of validation algorithm on [Wikipedia](https://en.wikipedia.org/wiki/ISBN#Check_digits)
17
17
18
18
Args:
19
19
isbn: The str value representing the ISBN in 10 digits.
Calc a ISBN-13 last digit from the provided str value. More information of validation algorithm on [Wikipedia](https://en.wikipedia.org/wiki/ISBN#Check_digits)
34
+
"""Calc a ISBN-13 last digit from the provided str value. More information of validation algorithm on [Wikipedia](https://en.wikipedia.org/wiki/ISBN#Check_digits)
36
35
37
36
Args:
38
37
isbn: The str value representing the ISBN in 13 digits.
0 commit comments