stdnum.eu.nace

NACE (classification for businesses in the European Union).

The NACE (nomenclature statistique des activités économiques dans la Communauté européenne) is a 4-level (and up to 4 digit) code for classifying economic activities. It is the European implementation of the UN classification ISIC.

The first 4 digits are the same in all EU countries while additional levels and digits may be vary between countries. This module validates the numbers according to revision 2.1 (or 2.0 if that version is supplied) and based on the registry as published by the EC.

More information:

>>> validate('A')
'A'
>>> validate('62.01', revision='2.0')
'6201'
>>> get_label('62.10')
'Computer programming activities'
>>> validate('62.05')
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> validate('62059')  # does not validate country-specific numbers
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> format('6201')
'62.01'
stdnum.eu.nace.compact(number: str) str

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

stdnum.eu.nace.format(number: str) str

Reformat the number to the standard presentation format.

stdnum.eu.nace.get_label(number: str, revision: str = '2.1') str

Lookup the category label for the number.

stdnum.eu.nace.info(number: str, *, revision: str = '2.1') dict[str, str]

Lookup information about the specified NACE. This returns a dict.

stdnum.eu.nace.is_valid(number: str, revision: str = '2.1') bool

Check if the number is a valid NACE. This checks the format and searches the registry to see if it exists.

stdnum.eu.nace.validate(number: str, revision: str = '2.1') str

Check if the number is a valid NACE. This checks the format and searches the registry to see if it exists.