Specification, shared test vectors, and the Python reference implementation for Meridian Enterprise Unique Identifiers (EUIDs).
Project description
meridian-euid
Meridian defines a compact Enterprise Unique Identifier (EUID) format suitable for printed labels and barcodes.
For v0.4.0, Meridian is intentionally strict:
- Canonical: one shape only,
DOMAIN-PREFIX-BODYCHECKSUM - Lookup-first: the string identifies an object but does not explain it
- Sequence-backed: BODY is a PostgreSQL
BIGINT-bounded value - Governed:
(DOMAIN, PREFIX)ownership is tracked in checked-in JSON registries - Python-first: Python is the only supported reference implementation in this repo
Quick Start
Python
cd reference-implementations/python
pip install -e ".[dev]"
# Validate a canonical EUID
meridian-euid validate A1-Z9-3V9
# Encode an integer as a canonical EUID
meridian-euid encode 123 Z9 --domain-code A1
# Parse an EUID into its structural components
meridian-euid parse MAX-MAX-7ZZZZZZZZZZZZB
# Compute the check character for DOMAIN + PREFIX + BODY
meridian-euid compute-check A1Z93V
Documentation
| Document | Description |
|---|---|
| SPEC.md | Normative specification |
| meridian_clinical_lab_profile.md | Minimal barcode and rendering profile for clinical lab use |
| checksum_elaboration.md | Why Meridian keeps the checksum inside the same safe alphabet |
| domain_code_registry.json | Checked-in manual registry of valid domain codes |
| prefix_ownership_registry.json | Checked-in manual registry of (domain, prefix) ownership |
| test-vectors/README.md | Shared machine-readable vectors and contract notes |
| reference-implementations/python/README.md | Python reference implementation and CLI |
Repository Structure
meridian-euid/
├── SPEC.md
├── CHANGELOG.md
├── domain_code_registry.json
├── prefix_ownership_registry.json
├── meridian_clinical_lab_profile.md
├── checksum_elaboration.md
├── test-vectors/
│ ├── README.md
│ └── v3.json
└── reference-implementations/
└── python/
EUID Format
Canonical format:
DOMAIN-PREFIX-BODYCHECKSUM
Example:
A1-Z9-3V9
Rules:
DOMAIN: 1-4 uppercase Crockford Base32 characters from0123456789ABCDEFGHJKMNPQRSTVWXYZPREFIX: 1-4 uppercase Crockford Base32 characters from the same alphabetBODY: Crockford Base32 encoding of an integer in1..9223372036854775807, with no leading0CHECKSUM: 1 Crockford Base32 character- Forbidden everywhere:
I,L,O,U - Lowercase input MUST be rejected
- Checksum payload is
DOMAIN + PREFIX + BODY; hyphens are syntax only
Governance
The repo carries a lightweight manual governance model:
domain_code_registry.jsondeclares valid domains.prefix_ownership_registry.jsonmaps each(DOMAIN, PREFIX)pair to exactly oneissuer_app_code.
issuer_app_code is a lowercase ASCII governance token matching:
^[a-z0-9]+(?:[._-][a-z0-9]+)*$
Claims are explicit JSON objects, for example:
{
"Z9": {
"issuer_app_code": "meridian.lims"
}
}
Canonical validation does not require a governance lookup. Issuance and resolver routing typically do.
Breaking Note
v0.4.0 removes the older split shapes and compatibility surfaces:
- no absent-domain form
- no
:separator - no sandbox/production mode split
- no legacy aliases
- no supported TypeScript reference implementation
Contributing
Before proposing changes:
- Run the Python test suite under reference-implementations/python.
- Keep the registries human-auditable.
- Update the shared vectors and docs in the same change when syntax or governance expectations move.
- Treat syntax, alphabet, checksum, and integer-range changes as major-version work.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meridian_euid_spec-0.4.2.tar.gz.
File metadata
- Download URL: meridian_euid_spec-0.4.2.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af573fd0b7c38b44227b53978095231a6e20274008d3b168895e499ed0501055
|
|
| MD5 |
d68a851ab02c8778fbf01446fda7b83d
|
|
| BLAKE2b-256 |
75f87c20fbe23d05a86084b39256b6ebf6250eda79aba049aad82b5f571d4146
|
File details
Details for the file meridian_euid_spec-0.4.2-py3-none-any.whl.
File metadata
- Download URL: meridian_euid_spec-0.4.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e6d74a3ee0d0ff0769d5e73effb119bc904ceee4af2e2d749529342ad8c6bc
|
|
| MD5 |
7a3e6c73cc981b58949acf0328917b35
|
|
| BLAKE2b-256 |
0189591ca4d0cc73bf06f4dfd90232e524618730ae0911ccda264b2e61aa900d
|