Skip to main content

org-id

org-id is a small Python package for working with org-id.guide organisation identifiers.

It supports:

  • loading a bundled snapshot of the org-id.guide registry
  • looking up and searching list metadata
  • parsing and validating identifier strings
  • creating normalized identifiers for known registers
  • falling back to hashed IDs when no structured identifier is available

Install

uv pip install org-id

Usage

from org_id import Registry, make_id, make_org_id, parse_org_id

registry = Registry.default()

entry = registry.get("GB-COH")
assert entry is not None
assert entry.code == "GB-COH"

identifier = make_org_id("16957965", register="GB-COH", registry=registry)
assert identifier == "GB-COH-16957965"

fallback = make_id("openlobbying", "Samizdata Ltd", reg_nr=None)

parsed = parse_org_id("GB-COH-16957965")
assert parsed.scheme == "GB-COH"
assert parsed.identifier == "16957965"

Registration numbers are validated for some registers, and make_org_id returns None for an invalid one:

  • GB-COH: Companies House company numbers, zero-padded to 8 characters.
  • MD-IDNO: Moldovan IDNOs, 13 digits with a valid check digit.

If a register is missing from the bundled org-id.guide list, creation still proceeds and emits a warning. Deprecated registers also continue with a warning.

registry = Registry.default()

gb_company_lists = registry.search(country="GB", structure="company")
best_gb_company_list = registry.best(country="GB", structure="company")

search() sorts higher-quality entries first.

Refreshing the bundled snapshot

Fetch a fresh copy of download.json and write it to a file:

uv run org-id-refresh ./download.json

To update the bundled package snapshot in this repo:

uv run org-id-refresh ./src/org_id/data/download.json

Development

uv run pytest

Publishing

This repo includes a GitHub Actions workflow at .github/workflows/publish.yml.

It will:

  • run the test suite
  • build the package with uv build
  • publish to PyPI when you push a tag like v0.1.0

Metadata

Release files for org-id 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for org-id 0.2.0
File Size Uploaded Provenance Actions
org_id-0.2.0.tar.gz 174.3 kB With provenance Details for org_id-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for org-id 0.2.0
File Interpreter ABI Platform Actions
org_id-0.2.0-py3-none-any.whl Python 3 none any Details for org_id-0.2.0-py3-none-any.whl

Total release size: 350.4 kB

Release files / org_id-0.2.0.tar.gz

Download URL org_id-0.2.0.tar.gz
Size 174.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8565a559823d34ea38a4fd6e0fbad220322bcaa7183fe5db8bd970b49505682c
BLAKE2b-256 checksum
How to use checksums
53752bd965923215d9800f541e884fe4c49db034323e516df0265a552c9d2b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / org_id-0.2.0-py3-none-any.whl

Download URL org_id-0.2.0-py3-none-any.whl
Size 176.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15c4c6f402d17749a6a1793940738697d6e427fa9f914c3d130621c3ebbdaddd
BLAKE2b-256 checksum
How to use checksums
eb42e664be2bf80f8470965157d9df42b895633059da514c96d03561378354d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for org-id 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for org_id-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page