stdnum.issn

ISSN (International Standard Serial Number).

The ISSN (International Standard Serial Number) is the standard code to identify periodical publications. It has a checksum similar to ISBN-10.

>>> validate('0024-9319')
'00249319'
>>> validate('0032147X')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> validate('003214712')
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> compact('0032-1478')
'00321478'
>>> format('00249319')
'0024-9319'
>>> to_ean('0264-3596')
'9770264359008'
Traceback (most recent call last):
    ...
InvalidLength: ...
stdnum.issn.calc_check_digit(number)

Calculate the ISSN check digit for 10-digit numbers. The number passed should not have the check bit included.

stdnum.issn.compact(number)

Convert the ISSN to the minimal representation. This strips the number of any valid ISSN separators and removes surrounding whitespace.

stdnum.issn.format(number)

Reformat the passed number to the standard format.

stdnum.issn.is_valid(number)

Checks to see if the number provided is a valid ISSN. This checks the length and whether the check digit is correct.

stdnum.issn.to_ean(number, issue_code='00')

Convert the number to EAN-13 format.

stdnum.issn.validate(number)

Checks to see if the number provided is a valid ISSN. This checks the length and whether the check digit is correct.

Previous topic

stdnum.iso9362

Next topic

stdnum.it.codicefiscale