# stdnum.gn.nifp

NIFp (Numéro d’Identification Fiscale Permanent, Guinea tax number).

This number consists of 9 digits, usually separated into three groups using hyphens to make it easier to read. The first eight digits are assigned in a pseudorandom manner. The last digit is the check digit.

More information:

- https://dgi.gov.gn/wp-content/uploads/2022/09/N%C2%B0-12-Cahier-de-Charges-NIF-p.pdf

    >>> validate('693770885')
    '693770885'
    >>> validate('693-770-885')
    '693770885'
    >>> validate('12345')
    Traceback (most recent call last):
        ...
    InvalidLength: ...
    >>> validate('693770880')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> format('693770885')
    '693-770-885'

stdnum.gn.nifp.compact(number: str) → str

  Convert the number to the minimal representation.

  This strips the number of any valid separators and removes surrounding whitespace.

stdnum.gn.nifp.format(number: str) → str

  Reformat the number to the standard presentation format.

stdnum.gn.nifp.is_valid(number: str) → bool

  Check if the number is a valid Guinea NIFp number.

stdnum.gn.nifp.validate(number: str) → str

  Check if the number is a valid Guinea NIFp number.

  This checks the length, formatting and check digit.