{"id":39756293,"url":"https://github.com/benhovinga/aamva_barcode_library","last_synced_at":"2026-01-18T11:31:04.714Z","repository":{"id":213544014,"uuid":"734370346","full_name":"benhovinga/aamva_barcode_library","owner":"benhovinga","description":"This library parses the barcode data on a North American driver license or identification card.","archived":false,"fork":false,"pushed_at":"2025-05-13T18:08:06.000Z","size":172,"stargazers_count":11,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T19:27:59.791Z","etag":null,"topics":["aamva-standard","driver-license","identification-card","library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benhovinga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-21T14:10:27.000Z","updated_at":"2025-04-30T16:27:29.000Z","dependencies_parsed_at":"2024-01-21T00:27:59.058Z","dependency_job_id":"99967ae9-a8c0-4e4d-8cd9-1c6b4fd53fc8","html_url":"https://github.com/benhovinga/aamva_barcode_library","commit_stats":null,"previous_names":["benhovinga/aamva_card_barcode"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/benhovinga/aamva_barcode_library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhovinga%2Faamva_barcode_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhovinga%2Faamva_barcode_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhovinga%2Faamva_barcode_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhovinga%2Faamva_barcode_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benhovinga","download_url":"https://codeload.github.com/benhovinga/aamva_barcode_library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhovinga%2Faamva_barcode_library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aamva-standard","driver-license","identification-card","library"],"created_at":"2026-01-18T11:31:04.274Z","updated_at":"2026-01-18T11:31:04.654Z","avatar_url":"https://github.com/benhovinga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AAMVA DL/ID Barcode Library\n\n### Version: v0.6-beta\n\n_The American Association of Motor Vehicle Administrators_ (AAMVA) releases a standards guide for driver license and identification card design. The _[2020 AAMVA DL/ID Card Design Standard](https://www.aamva.org/topics/driver-license-and-identification-standards)_ outlines the specifications for the Mandatory PDF417 Bar Code in Annex D. Nearly all jurisdictions across North America use this standard for their driver license and identification cards.\n\nThis library isn't intended to \"scan\" these barcodes, but rather parse the data file coming from a barcode scanning tool (like [zxing-cpp](https://pypi.org/project/zxing-cpp/) or [pdf417decoder](https://pypi.org/project/pdf417decoder/)). After it has been parsed and the data elements decoded into human readable properties, the card profile can be displayed to a user or used by other applications.\n\n## Quick Start Example\n\n```python\n\u003e\u003e\u003e from aamva.barcode import parse_barcode_string\n\n\u003e\u003e\u003e barcode_string = \"@\\n\\x1e\\rANSI 636000100102DL00410278ZV03190008DLDAQT64235789\\nDCSSAMPLE\\nDDEN\\nDACMICHAEL\\nDDFN\\nDADJOHN\\nDDGN\\nDCUJR\\nDCAD\\nDCBK\\nDCDPH\\nDBD06062019\\nDBB06061986\\nDBA12102024\\nDBC1\\nDAU068 in\\nDAYBRO\\nDAG2300 WEST BROAD STREET\\nDAIRICHMOND\\nDAJVA\\nDAK232690000  \\nDCF2424244747474786102204\\nDCGUSA\\nDCK123456789\\nDDAF\\nDDB06062018\\nDDC06062020\\nDDD1\\rZVZVA01\\r\"\n# Example output string from PDF417 barcode scanning tool\n\n\u003e\u003e\u003e barcode_file = parse_barcode_string(barcode_string)\n# Parse the barcode string to extract the subfiles and elements\n\n\u003e\u003e\u003e barcode_file\n# {'header': {'issuer_id': 636000, 'aamva_version': 10, 'number_of_entries': 2, 'jurisdiction_version': 1}, 'subfiles': ({'subfile_type': 'DL', 'elements': {'DAQ': 'T64235789', 'DCS': 'SAMPLE', 'DDE': 'N', 'DAC': 'MICHAEL', 'DDF': 'N', 'DAD': 'JOHN', 'DDG': 'N', 'DCU': 'JR', 'DCA': 'D', 'DCB': 'K', 'DCD': 'PH', 'DBD': '06062019', 'DBB': '06061986', 'DBA': '12102024', 'DBC': '1', 'DAU': '068 in', 'DAY': 'BRO', 'DAG': '2300 WEST BROAD STREET', 'DAI': 'RICHMOND', 'DAJ': 'VA', 'DAK': '232690000  ', 'DCF': '2424244747474786102204', 'DCG': 'USA', 'DCK': '123456789', 'DDA': 'F', 'DDB': '06062018', 'DDC': '06062020', 'DDD': '1'}}, {'subfile_type': 'ZV', 'elements': {'ZVA': '01'}})}\n```\n\nCurrently in `v0.6-beta` the library can take the barcode string (captured from a barcode scanning tool) and break it down into it's various file parts. These parts are the file header, subfiles, and subfile elements.\n\nThe subfile elements are where the profile properties are stored. This is information like first name, last name, birthday, etc. Profile property names like `customer_family_name` are too large for the limited space of the barcode, so all property names have to be encoded with a three letter name, like `DCS`. The AAMVA Standard lists the decoded names for each property in Annex D.\n\nIn addition to encoding the property names, many properties have different encoding methods for their values. For example gender is represented by an integer. 1 = male, 2 = female, 9 = not specified.\n\nThe next step in the development process is to decode each of the subfile element into human readable propeties.\n\n## Resources\n\nBelow are some resources that made creating this library possible.\n\n- [AAMVA 2020 DL/ID Card Design Standard](https://www.aamva.org/getmedia/99ac7057-0f4d-4461-b0a2-3a5532e1b35c/AAMVA-2020-DLID-Card-Design-Standard.pdf) (aamva.org) - PDF\n  - Annex D - Mandatory PDF417 Bar Code\n  - Note: The encoding schema in Annex I (Optional Comact Encoding) is not yet implemented.\n- [AAMVA D20 Data Dictionary 7.0](https://www.aamva.org/getmedia/4373f9e2-468b-4304-b0ee-12d7c867ad7e/D20-Data-Dictionary-7-0.pdf) (aamva.org) - PDF\n  - A.9.2 Driver Eye Color\n  - A.9.3 Driver Hair Color\n  - A.9.8 Driver Race and Ethnicity\n- [List of Issuer Identification Numbers (IIN)](\u003chttps://www.aamva.org/identity/issuer-identification-numbers-(iin)\u003e) (aamva.org) - HTML\n\n## License\n\nMIT License\n\nCopyright \u0026copy; 2025 Benjamin P.C. Hovinga\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhovinga%2Faamva_barcode_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenhovinga%2Faamva_barcode_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhovinga%2Faamva_barcode_library/lists"}