# stdnum.no.orgnr

Orgnr (Organisasjonsnummer, Norwegian organisation number).

The Organisasjonsnummer is a 9-digit number with a straightforward check mechanism.

More information:

- https://nn.wikipedia.org/wiki/Organisasjonsnummer

- https://no.wikipedia.org/wiki/Organisasjonsnummer

    >>> validate('988 077 917')
    '988077917'
    >>> validate('988 077 918')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> format('988077917')
    '988 077 917'

stdnum.no.orgnr.checksum(number)

  Calculate the checksum.

stdnum.no.orgnr.compact(number)

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

stdnum.no.orgnr.format(number)

  Reformat the number to the standard presentation format.

stdnum.no.orgnr.is_valid(number)

  Check if the number is a valid organisation number.

stdnum.no.orgnr.validate(number)

  Check if the number is a valid organisation number. This checks the length, formatting and check digit.