"""The two AAMVA revisions the encoder can target, and their differences. The default is v10 (CDS 2020) for every jurisdiction. v11 (CDS 2025) is implemented in the encoder and changes specific element widths, so it is publishable per jurisdiction as its own URL rather than a footnote. Nothing here is a claim about the print date on a physical card. It states the header version the encoder writes when asked. """ REVISIONS = ( { "slug": "2020", "version": "10", "year": "2020", "standard": "AAMVA DL/ID Card Design Standard, September 2020 (version 10)", "default": True, "summary": ( "The version every jurisdiction defaults to. The header carries " "AAMVA version 10, postal codes are space-filled to eleven characters, " "and the subfile directory counts a two-byte designator." ), "differs": ( ("DAK (postal code)", "space-filled to 11 characters", "zero-filled to 9 characters"), ("Header version field", "10", "11"), ("Subfile designator width", "2 bytes", "2 bytes"), ("Default for new requests", "yes", "no, opt in with aamva_version"), ), }, { "slug": "2025", "version": "11", "year": "2025", "standard": "AAMVA DL/ID Card Design Standard, 2025 (version 11)", "default": False, "summary": ( "The later standard. Postal codes narrow to nine characters and are " "zero-filled rather than space-filled, which shortens every record with " "a DAK and shifts the subfile length. Opt in per request; it is not the " "default." ), "differs": ( ("DAK (postal code)", "space-filled to 11 characters", "zero-filled to 9 characters"), ("Header version field", "10", "11"), ("Subfile designator width", "2 bytes", "2 bytes"), ("Default for new requests", "yes", "no, opt in with aamva_version"), ), }, ) BY_SLUG = {r["slug"]: r for r in REVISIONS} SLUGS = tuple(BY_SLUG) def get(slug): """The revision record for a URL slug, or None.""" return BY_SLUG.get(str(slug)) def other(slug): """The sibling revision, for the cross-link.""" return next((r for r in REVISIONS if r["slug"] != slug), None)