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.1.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.1.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bce_codes_to_label-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 433de9ed7df1425d4653196c62a0d0bf5b918c2a235f7fbf70cd3d73e67f2657
MD5 65245d8aa4b091dd5c4f29bf5acca631
BLAKE2b-256 cf00b9ff1d832c12c9118b0bfd98caae212061b57c91caddc8a8b49df53fc0fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for bce_codes_to_label-0.1.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.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bce_codes_to_label-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef0e220df9cc8d7283315423ef1abcdcea08b1ad5978e6c78fc1b47a2ec2e08
MD5 fa444b80fc4107f6c139b4485554240f
BLAKE2b-256 693799ba241363fcf835afa61fef4db8c92e777266a59a53c96045cd106ec920

See more details on using hashes here.

Provenance

The following attestation bundles were made for bce_codes_to_label-0.1.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