Skip to main content

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)

PyPI version License: MIT DOI

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

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

passport_photo_specs-1.3.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

passport_photo_specs-1.3.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

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

Hashes for passport_photo_specs-1.3.0.tar.gz
Algorithm Hash digest
SHA256 5316c57cb14906776d51316adb9e95754e61946ccafffb6fca378303bd739cec
MD5 4f45176aeefa8b36c3381bc49edd9f08
BLAKE2b-256 686e0187e0270ba2b6333212ff87dfe76f3876d1be2b4a9a128a840f08c16109

See more details on using hashes here.

File details

Details for the file passport_photo_specs-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for passport_photo_specs-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c5ddc3a66aa0cb9628c51a80a0ef4a657fc69badf1e097e98fe2d3cda33ef50
MD5 ebeb87c2ac2b50070d7ecd5fa71aa2f3
BLAKE2b-256 ef40c43dd20d1981e879f73fb666cf5af99951836b1cd0186931aebbd55a48c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page