# stdnum.fr.accise

n° d’accise (French number to identify taxpayers of excise taxes).

The n° d’accise always start by FR0 following by the 2 ending digits of the year, 3 number of customs office, one letter for the type and an ordering number of 4 digits.

    >>> validate('FR023004N9448')
    'FR023004N9448'
    >>> validate('FR0XX907E0820')
    Traceback (most recent call last):
        ...
    InvalidFormat: ...
    >>> validate('FR012907A0820')
    Traceback (most recent call last):
        ...
    InvalidComponent: ...

stdnum.fr.accise.compact(number: str) → str

  Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.fr.accise.is_valid(number: str) → bool

  Check if the number is a valid accise number.

stdnum.fr.accise.validate(number: str) → str

  Check if the number is a valid accise number. This checks the length, formatting.