Canonical passport, visa, and ID document photo specifications validated against 15+ official government sources. 100+ countries, 248 document formats.
Project description
passport-photo-specs (Python)
Canonical passport, visa, and ID document photo specifications validated against 15+ official government sources. 100+ countries, 248 document formats. Python distribution of the passport-photo-specs dataset.
Useful for:
- Building passport / visa photo tools without re-researching per-country specs
- Validating photo uploads before submitting to a government portal (DS-160, COVA, Sarathi, voters.eci.gov.in, etc.)
- Immigration / visa software that needs correct dimensions and background colors
- ML training corpora for biometric photo compliance
- Research on ICAO 9303 / biometric photo standards across jurisdictions
Install
pip install passport-photo-specs
Quick start
from passport_photo_specs import find_document, find_country, countries, documents
# Look up a specific document
italy_visa = find_document("italy-visa-photo")
print(italy_visa["widthMm"], italy_visa["heightMm"], italy_visa["dpi"])
# 35 45 300
# Look up a country (by id or by any of its document slugs)
italy = find_country("italy")
print(italy["name"], len(italy["documents"]))
# Italy 3
# Iterate everything
print(f"Total countries: {len(countries())}")
print(f"Total document formats: {len(documents())}")
# Get the raw dict if you want to walk it yourself
from passport_photo_specs import raw
all_data = raw()
What's in each document spec
{
"id": "italy-visa",
"countryId": "italy",
"name": "Italian Visa",
"slug": "italy-visa-photo",
"widthMm": 35,
"heightMm": 45,
"widthPx": 413,
"heightPx": 531,
"dpi": 300,
"background": "Plain light grey",
"bgColor": "#eeeeee",
"bgColorLabel": "Light grey",
"requirements": ["Size: 35×45 mm", ...],
"seoTitle": "...",
"h1": "...",
"faq": [{"q": "...", "a": "..."}, ...],
}
Source-of-truth: validated against the issuing-authority's published guidance. The full source list is in the parent repository's README.
Citation
This dataset is archived on Zenodo with a citable DOI. Use the concept DOI to always resolve to the latest version:
whitetirocket. (2026). passport-photo-specs: Open Dataset of Passport, Visa, and ID Photo Specifications for 100+ Countries. Zenodo. https://doi.org/10.5281/zenodo.20409880
See also
- npm:
passport-photo-specs— TypeScript / JavaScript - GitHub (canonical):
whitetirocket/passport-photo-specs - Zenodo dataset record:
zenodo.org/records/20409881 - Reference implementation: idphotosnap.com — browser-only passport photo tool that consumes this dataset
License
MIT. See LICENSE.
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 passport_photo_specs-1.3.0.tar.gz.
File metadata
- Download URL: passport_photo_specs-1.3.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5316c57cb14906776d51316adb9e95754e61946ccafffb6fca378303bd739cec
|
|
| MD5 |
4f45176aeefa8b36c3381bc49edd9f08
|
|
| BLAKE2b-256 |
686e0187e0270ba2b6333212ff87dfe76f3876d1be2b4a9a128a840f08c16109
|
File details
Details for the file passport_photo_specs-1.3.0-py3-none-any.whl.
File metadata
- Download URL: passport_photo_specs-1.3.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c5ddc3a66aa0cb9628c51a80a0ef4a657fc69badf1e097e98fe2d3cda33ef50
|
|
| MD5 |
ebeb87c2ac2b50070d7ecd5fa71aa2f3
|
|
| BLAKE2b-256 |
ef40c43dd20d1981e879f73fb666cf5af99951836b1cd0186931aebbd55a48c6
|