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:

>>> 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)

Convert the number to the minimal representation.

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

stdnum.gn.nifp.format(number)

Reformat the number to the standard presentation format.

stdnum.gn.nifp.is_valid(number)

Check if the number is a valid Guinea NIFp number.

stdnum.gn.nifp.validate(number)

Check if the number is a valid Guinea NIFp number.

This checks the length, formatting and check digit.