# 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. The number consists of 8 digits, the last being a check digit.

More information:

- https://uk.wikipedia.org/wiki/Код_ЄДРПОУ

- https://1cinfo.com.ua/Articles/Proverka_koda_po_EDRPOU.aspx

    >>> 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: str) → str

  Calculate the check digit for number.

stdnum.ua.edrpou.compact(number: str) → str

  Convert the number to the minimal representation.

stdnum.ua.edrpou.format(number: str) → str

  Reformat the number to the standard presentation format.

stdnum.ua.edrpou.is_valid(number: str) → bool

  Check if the number is a valid Ukraine EDRPOU (ЄДРПОУ) number.

stdnum.ua.edrpou.validate(number: str) → str

  Check if the number is a valid Ukraine EDRPOU (ЄДРПОУ) number.

  This checks the length, formatting and check digit.