# stdnum.hu.anum

ANUM (Közösségi adószám, Hungarian VAT number).

The ANUM is the Hungarian VAT (Közösségi adószám) number. It is an 8-digit taxpayer registration number that includes a weighted checksum.

    >>> validate('HU-12892312')
    '12892312'
    >>> validate('HU-12892313')  # invalid check digit
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...

stdnum.hu.anum.checksum(number: str) → int

  Calculate the checksum. Valid numbers should have a checksum of 0.

stdnum.hu.anum.compact(number: str) → str

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

stdnum.hu.anum.is_valid(number: str) → bool

  Check if the number provided is a valid VAT number.

stdnum.hu.anum.validate(number: str) → str

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