freightid
AI agents can look up every port on Earth. Not one can check a container number. Now they can.
Pure-function validators for the identifier formats that move global freight — with the arithmetic shown, not just the verdict.
pip install freightid
from freightid import validate_container, explain_container
validate_container("csqu 305438-3")["valid"] # True
explain_container("CSQU3054383")["detail"]["worked_example"]
# 'C(13)x1 + S(30)x2 + Q(28)x4 + U(32)x8 + 3(3)x16 + 0(0)x32 + 5(5)x64
# + 4(4)x128 + 3(3)x256 + 8(8)x512 = 6185; 6185 mod 11 = 3 -> check digit 3'
Or from the shell — kind auto-detected, JSON out:
freightid CSQU3054383
freightid --kind imo 9321483
freightid --explain "IMO 9074729"
What it validates
| Identifier | Depth |
|---|---|
| ISO 6346 container numbers | full check-digit math + worked explanation |
| IMO ship numbers | full check-digit math + worked explanation |
| SCAC carrier codes | format + suffix-convention metadata |
| UN/LOCODE place codes | format + ISO 3166-1 country check |
| USDOT numbers | format (no check digit exists) |
| MC docket numbers | format (no check digit exists) |
freightid checks math, not registration
A mathematically valid container number is not evidence that the container exists. freightid can prove a check digit; it cannot prove registration — so every result says so explicitly:
{"valid": True, ..., "registration": "not_checked"}
That field is always "not_checked". If you need registry truth, ask a
registry. freightid will never blur the line for you.
Honest edges
The standards have designed-in blind spots, and freightid's test suite asserts them rather than hiding them:
- ISO 6346: letter substitutions whose value difference is a multiple of 11 (A↔K, B↔L, …) are undetectable — the weighted sum doesn't move. Separately, mod-11 remainders 0 and 10 both fold to check digit 0, so mutations moving the remainder between those two are invisible; this is why the standard discourages remainder-10 serials.
- IMO: the position weights (7..2) aren't all coprime to 10, so certain digit deltas at certain positions slip through by design.
Roadmap
Not in v0.1, on the list: UN/LOCODE location lookup (needs the UNECE dataset), IMO company numbers, BIC owner-registry awareness, AWB/BOL/GS1.
Built by Novacrest · from the team behind OmniOrders · MIT © 2026 Shipedge Inc.
Edge API — worker/
The same engine as a public JSON API on Cloudflare Workers — validate, repair (did-you-mean), mint, prefix lookup, and a production self-test: https://freightid.altacrest.workers.dev
It powers the browser tool at https://binlogic.io/free-tools/freightid. Deploy instructions: worker/README.md
Metadata
Release files for freightid 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| freightid-0.1.1.tar.gz | 22.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| freightid-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.8 kB
Release files / freightid-0.1.1.tar.gz
| Download URL | freightid-0.1.1.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9368d465344832a21ffc4eae736b4753896a4f8286d66650958ecb5b26e04af6
|
|
BLAKE2b-256 checksum How to use checksums |
5906c80d34da913de5e74886f814c6378a704fcf0c88c51f7adef613db35cdec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / freightid-0.1.1-py3-none-any.whl
| Download URL | freightid-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
460dcfbe5008fc0b5a8198b8a58be49338fd1a46d02fc8cc74ede49cb2b8dddc
|
|
BLAKE2b-256 checksum How to use checksums |
9148cc7d4b202cbd68782c44d89bf82ade94e7f6a60e75e3907a0f8e9bad88bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for freightid 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.