Skip to main content

Lookup labels for Belgian Crossroads Bank for Enterprises (BCE/KBO) codes

Project description

bce-codes-to-label

Lookup labels for Belgian Crossroads Bank for Enterprises (BCE/KBO) codes.

Covers NACE codes, legal forms, joint committees, countries, postal codes, and more — with labels in French, Dutch, German, and English (where available).

Installation

pip install bce-codes-to-label

Quick start

from bce_codes_to_label import joint_committees, countries, nace, lookup

# Each registry accepts three input forms:
joint_committees("jcc:m100")   # full BCE code
joint_committees("m100")       # suffix (part after ":")
joint_committees("100")        # value only

# Filter by language
countries("BE", lang="fr")
# {'_key': 'BE', '_code': 'cty:mBE', 'label_fr': 'Belgique'}

# Global lookup — returns a result only if there is a unique match across all registries
lookup("jcc:m100")
# {'_registry': 'joint_committees', 'label_fr': '...', '_key': '100', '_code': 'jcc:m100'}

Available registries

Registry Prefix Example Description
joint_committees jcc: joint_committees("100") Joint committees (commissions paritaires)
nace nace: nace("2008:01110") NACE-BEL activity codes (2003 & 2008)
currencies ccy: currencies("EUR") Currency codes
countries cty: countries("BE") Country codes
data_types met: data_types("am1") Data/metric types
address_types atc: address_types("001") Address type codes
commercial_courts cct: commercial_courts("31") Commercial courts
mandate_functions fct: mandate_functions("10") Mandate/function labels
legal_forms lgf: legal_forms("001") Legal form codes
identifier_kinds nmt: identifier_kinds("1") Identifier kind-of-number labels
sectors sct: sectors("01") Sector codes
postal_codes pcd: postal_codes("1000") Belgian postal codes
msca msca: msca("10/49") MSCA accounting codes
rejection rej: rejection("PDF:11") Filing rejection codes
models mod: models("m02-f") Annual accounts model types

API

Registry call

registry(query, lang=None)
  • query: full BCE code ("jcc:m100"), suffix ("m100"), or value ("100")
  • lang (optional): "fr", "nl", "de", or "en" — returns only that language's label
  • Returns a dict with labels and metadata, a list if multiple matches, or None if not found

Global lookup

lookup(query, lang=None)

Searches all registries. Returns the match only if exactly one registry produces exactly one result. Returns None if ambiguous or not found.

Utilities

registry.all_keys()       # list all canonical keys
registry.get(query, lang) # alias for registry(query, lang)

NACE codes

NACE codes include a version prefix since both 2003 and 2008 versions are available:

from bce_codes_to_label import nace

nace("2008:01110")           # specific version + code
nace("nace:2008:m01110")     # full BCE code form

Data structure

Each data file uses an efficient keyed format:

{
  "code_prefix": "jcc:",
  "codes": {
    "100": {
      "label_fr": "Commission paritaire auxiliaire pour ouvriers",
      "label_nl": "Aanvullend PC voor de werklieden",
      "label_de": "die paritätische Hilfskommission für Arbeiter"
    }
  }
}

Rebuilding data

Source JSON files live in codes/. To regenerate the optimized data files:

python scripts/build_data.py

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bce_codes_to_label-0.2.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bce_codes_to_label-0.2.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file bce_codes_to_label-0.2.0.tar.gz.

File metadata

  • Download URL: bce_codes_to_label-0.2.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bce_codes_to_label-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d3c917b32cd0a81d1ad8818d47f205b195deb48d54857f798a2eba3c70153b6c
MD5 bd1161b2802019ea578c00b61edc30de
BLAKE2b-256 6d8d352ec9dddd8ad3c62120d01deb7e79d83d9d7bab1d1e376cbdf32368cf21

See more details on using hashes here.

Provenance

The following attestation bundles were made for bce_codes_to_label-0.2.0.tar.gz:

Publisher: python-publish.yml on GaspardMerten/bce_codes_to_label

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bce_codes_to_label-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bce_codes_to_label-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f86b4abc1adeb4c6bdea29bf3ad0697bf0c66046b908863e8efff1227d5cb36
MD5 530a6c7d2c4691ac5d466caf02e83b73
BLAKE2b-256 cf2964968565cb11109876095d67b1b55266fc64a2fe3c9ed94f5d1eb859e871

See more details on using hashes here.

Provenance

The following attestation bundles were made for bce_codes_to_label-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on GaspardMerten/bce_codes_to_label

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page