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 starting with 1 and with a valid check digit. Personal numbers (IDNPs) have the same format but start with 0 or 2, and are rejected.

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.3.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.3.0
File Size Uploaded Provenance Actions
org_id-0.3.0.tar.gz 174.5 kB With provenance Details for org_id-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 350.9 kB

Release files / org_id-0.3.0.tar.gz

Download URL org_id-0.3.0.tar.gz
Size 174.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b05aace560174b2f6eb55667de03b9029d6ddf1317921e0745a2a871ab337408
BLAKE2b-256 checksum
How to use checksums
368d2169d0aad47a84f899705eed0c2f9ae2b7756259e201cdc84441a5bfcc3a
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.3.0-py3-none-any.whl

Download URL org_id-0.3.0-py3-none-any.whl
Size 176.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8029b12fb6f77a75b85d30448cf6a09124fff805e6978c6a1cfeb5c7826b77b
BLAKE2b-256 checksum
How to use checksums
1ee9d7bf05c65e78c3b26d6cbbd9f912ceca37bd37c5248d16faa09abfef0738
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.3.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.3.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