# stdnum.isrc

ISRC (International Standard Recording Code).

The ISRC is an international standard code (ISO 3901) for uniquely identifying sound recordings and music video recordings.

More information:

- https://en.wikipedia.org/wiki/International_Standard_Recording_Code

    >>> validate('US-SKG-19-12345')
    'USSKG1912345'
    >>> validate('XX-SKG-19-12345')
    Traceback (most recent call last):
        ...
    InvalidComponent: ...

stdnum.isrc.compact(number: str) → str

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

stdnum.isrc.format(number: str, separator: str = '-') → str

  Reformat the number to the standard presentation format.

stdnum.isrc.is_valid(number: str) → bool

  Check if the number provided is a valid ISRC.

stdnum.isrc.validate(number: str) → str

  Check if the number provided is a valid ISRC. This checks the length, the alphabet, and the country code but does not check if the registrant code is known.