google-i18n-address
Address validation helpers for Google's i18n address database
What it is and what it does
This package wraps Google's i18n address metadata repository to provide programmatic address validation, normalization, and formatting for addresses worldwide. It recognizes nine address fields (country code, region, city, postal code, street address, and others) and validates them against country-specific rules, either returning a canonical form suitable for storage or raising an exception with a list of validation errors.
Beyond validation, it offers address latinization (converting non-Latin scripts to Latin equivalents for display and search), address formatting according to postal regulations of the destination country, and access to validation rules for building country-specific address forms. The package ships with a snapshot of Google's metadata and depends only on requests; it is classified as production-stable and actively maintained.
Use it for:
- Validate and normalize user-submitted addresses in e-commerce checkout flows before storing or printing shipping labels.
- Build dynamic address forms that show only the fields required for a specific country and display appropriate field labels.
- Convert addresses with non-Latin scripts to Latin equivalents for display in systems that cannot render the original script.
- Validate postal codes and country regions against official rules to catch typos or invalid entries early.
- Format addresses for printing according to each country's post office standards to ensure deliverability.
- Pre-populate country-area choices and postal code patterns for form UI generation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates, normalizes, and formats postal addresses according to country-specific rules using Google's i18n address metadata, with support for latinization and form generation.
Yes. The package is production-stable, actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem—address validation and formatting across countries is tedious to implement correctly. Use it if you need to handle international addresses in any form. The BSD 3-Clause license is permissive and poses no compliance burden.
Install
google-i18n-address on PyPI
pip
pip install google-i18n-addressuv
uv add google-i18n-addresspoetry
poetry add google-i18n-addressInstalling google-i18n-address
Before you install
Low friction: pure Python wheel with only requests as a runtime dependency. Active maintenance with recent commits and production-stable classification.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions; retain copyright notice and disclaimer in distributions.
Quickstart
pip install google-i18n-address
from google_i18n_address import normalize_address, InvalidAddressError
try:
address = normalize_address({
'country_code': 'US',
'country_area': 'California',
'city': 'Mountain View',
'postal_code': '94043',
'street_address': '1600 Amphitheatre Pkwy'
})
print(address)
except InvalidAddressError as e:
print(e.errors)
Verify before relying
- Whether requests dependency is used at runtime or only for optional data updates
- Frequency and coverage of i18n metadata updates relative to postal code rule changes
Package facts
| License | BSD 3-Clause License Copyright (c) 2016, MIRUMEE SOFTWARE SP. Z O.O. SP.K. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following… (full text in the JSON record) (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | actively maintained — 709 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 160,347/month — #10,664 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_i18n_address-3.1.1-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
usaddress-scourgifyCleans and normalizes US addresses to USPS and…
unclear · top 5,000 on PyPI
random-addressGenerates random real US addresses with…
permissive · top 15,000 on PyPI
usProvides structured access to US state and…
unclear · top 5,000 on PyPI
FormEncodeFormEncode validates and generates HTML forms,…
permissive · top 15,000 on PyPI
django-localflavorProvides country-specific form fields,…
permissive · top 5,000 on PyPI
usaddressusaddress parses unstructured US address…
permissive · top 5,000 on PyPI
iso3166Converts between ISO 3166-1 country codes…
permissive · top 5,000 on PyPI
pyapPyap detects and parses postal addresses from…
permissive · top 15,000 on PyPI
pyap2Pyap2 detects and parses postal addresses from…
permissive · top 15,000 on PyPI
postalPython bindings to libpostal, a C library for…
permissive · top 15,000 on PyPI