# stdnum.co.nit

NIT (Número De Identificación Tributaria, Colombian identity code).

This number, also referred to as RUT (Registro Unico Tributario) is the Colombian business tax number.

    >>> validate('213.123.432-1')
    '2131234321'
    >>> validate('2131234325')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> format('2131234321')
    '213.123.432-1'

stdnum.co.nit.calc_check_digit(number: str) → str

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

stdnum.co.nit.compact(number: str) → str

  Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.

stdnum.co.nit.format(number: str) → str

  Reformat the number to the standard presentation format.

stdnum.co.nit.is_valid(number: str) → bool

  Check if the number is a valid NIT.

stdnum.co.nit.validate(number: str) → str

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