# stdnum.tr.vkn

VKN (Vergi Kimlik Numarası, Turkish tax identification number).

The Vergi Kimlik Numarası is the Turkish tax identification number used for businesses. The number consists of 10 digits where the first digit is derived from the company name.

More information:

- https://www.turkiye.gov.tr/gib-intvrg-vergi-kimlik-numarasi-dogrulama

    >>> validate('4540536920')
    '4540536920'
    >>> validate('4540536921')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> validate('454053692')
    Traceback (most recent call last):
        ...
    InvalidLength: ...

stdnum.tr.vkn.calc_check_digit(number: str) → str

  Calculate the check digit for the specified number.

stdnum.tr.vkn.compact(number: str) → str

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

stdnum.tr.vkn.is_valid(number: str) → bool

  Check if the number is a valid Vergi Kimlik Numarası. This checks the length and check digits.

stdnum.tr.vkn.validate(number: str) → str

  Check if the number is a valid Vergi Kimlik Numarası. This checks the length and check digits.