stdnum.at.uid

UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number).

The Austrian UID is a 9-digit number that starts with a U (optionally preceded with AT). The last digit is a check digit.

>>> validate('AT U13585627')
'U13585627'
>>> calc_check_digit('U1358562')
'7'
>>> validate('U13585626')  # incorrect check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.at.uid.calc_check_digit(number)

Calculate the check digit. The number passed should not have the check digit included.

stdnum.at.uid.compact(number)

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

stdnum.at.uid.is_valid(number)

Check if the number is a valid VAT number.

stdnum.at.uid.validate(number)

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