stdnum.ua.edrpou¶
ЄДРПОУ, EDRPOU (Identifier for enterprises and organizations in Ukraine).
The ЄДРПОУ (Єдиного державного реєстру підприємств та організацій України, Unified State Register of Enterprises and Organizations of Ukraine) is a unique identification number of a legal entities in Ukraine. Th number consists of 8 digits, the last being a check digit.
More information:
https://uk.wikipedia.org/wiki/Код_ЄДРПОУ
>>> validate('32855961')
'32855961'
>>> validate('32855968')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('12345')
Traceback (most recent call last):
...
InvalidLength: ...
>>> format(' 32855961 ')
'32855961'
-
stdnum.ua.edrpou.
calc_check_digit
(number)¶ Calculate the check digit for number.
-
stdnum.ua.edrpou.
compact
(number)¶ Convert the number to the minimal representation.
-
stdnum.ua.edrpou.
format
(number)¶ Reformat the number to the standard presentation format.
-
stdnum.ua.edrpou.
is_valid
(number)¶ Check if the number is a valid Ukraine EDRPOU (ЄДРПОУ) number.
-
stdnum.ua.edrpou.
validate
(number)¶ Check if the number is a valid Ukraine EDRPOU (ЄДРПОУ) number.
This checks the length, formatting and check digit.