Internal constants
Internal constants.
- pyisbn._constants.BOOKLAND_PREFIXES = ('978', '979')
ISBN-13 ‘Bookland’ prefixes.
- pyisbn._constants.BOOKLAND_PREFIX_LENGTH = 3
ISBN-13 ‘Bookland’ prefix length.
- pyisbn._constants.DASHES: list[str] = ['-', '–', '—', '―']
Dash types to accept, and scrub, in ISBN inputs
- pyisbn._constants.ISBN10_CHECKSUM_MODULUS = 11
ISBN-10 checksum modulus.
- pyisbn._constants.ISBN10_CHECKSUM_X = 10
ISBN-10 checksum value for ‘X’.
- pyisbn._constants.ISBN10_LENGTH = 10
ISBN-10 length.
- pyisbn._constants.ISBN10_LENGTH_NO_CHECKSUM = 9
ISBN-10 length without checksum.
- pyisbn._constants.ISBN13_CHECKSUM_MODULUS = 10
ISBN-13 checksum modulus.
- pyisbn._constants.ISBN13_CHECKSUM_SUBTRACT = 10
ISBN-13 checksum subtraction value.
- pyisbn._constants.ISBN13_CHECKSUM_TEN_REPLACEMENT = 0
ISBN-13 checksum replacement for a value of ten.
- pyisbn._constants.ISBN13_LENGTH = 13
ISBN-13 length.
- pyisbn._constants.ISBN13_LENGTH_NO_CHECKSUM = 12
ISBN-13 length without checksum.
- pyisbn._constants.ISBN13_ODD_MULTIPLIER = 3
ISBN-13 checksum multiplier for odd-positioned digits.
- pyisbn._constants.SBN_LENGTH = 9
SBN length.
- pyisbn._constants.SBN_LENGTH_NO_CHECKSUM = 8
SBN length without checksum.
- pyisbn._constants.URL_MAP: dict[str, str | tuple[str, dict[str, str | None]]] = {'amazon': ('https://www.amazon.{tld}/s?search-alias=stripbooks&field-isbn={isbn}', {'de': None, 'fr': None, 'jp': None, 'uk': 'co.uk', 'us': 'com'}), 'copac': 'http://copac.jisc.ac.uk/search?isn={isbn}', 'google': 'https://books.google.com/books?vid=isbn:{isbn}', 'isbndb': 'https://isbndb.com/search/all?query={isbn}', 'waterstones': 'https://www.waterstones.com/books/search/term/{isbn}', 'whsmith': 'https://www.whsmith.co.uk/search/go?w={isbn}&af=cat1:books', 'worldcat': 'http://worldcat.org/isbn/{isbn}'}
Site to URL mappings, broken out for easier extending at runtime