pyzipcode
query zip codes and location data
What it is and what it does
pyzipcode wraps a local SQLite database of US ZIP codes to provide fast, offline lookups of postal code metadata. It loads city, state, latitude, longitude, timezone, and daylight savings time information for any ZIP code, and supports search by city name and radius-based filtering around a given ZIP code.
The package exposes a dictionary-like ZipCodeDatabase interface: you can look up a ZIP code by integer or string, search for all codes in a city using SQL wildcards, or find codes within a specified radius. It requires no external API calls or network access, making it suitable for applications that need reliable ZIP code data without external dependencies.
Use it for:
- Validate and enrich user-submitted ZIP codes with city/state information in web forms or data pipelines
- Find nearby ZIP codes for location-based features like store locators or delivery radius calculations
- Populate timezone and daylight savings time data for scheduling or time-aware applications
- Offline geocoding: convert ZIP codes to approximate latitude/longitude for mapping or distance calculations
- Bulk lookup of ZIP code metadata in batch processing without rate limits or API costs
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides local lookup of US ZIP code information including city, state, coordinates, timezone, and daylight savings time, with search and radius-based filtering.
No. The package is abandoned (last update 2021-03-03), has high install friction (source-only distribution), and relies on a ZIP code database from 2004 that is now significantly outdated. For current applications, use a maintained alternative or a live API service that reflects current postal code assignments.
Install
pyzipcode on PyPI
pip
pip install pyzipcodeuv
uv add pyzipcodepoetry
poetry add pyzipcodeInstalling pyzipcode
Before you install
High install friction: the package ships as a source distribution only and requires compilation or build steps. Maintenance is abandoned—last release was 2021-03-03, over 1990 days ago, with no recent commits.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or redistribution.
Quickstart
from pyzipcode import ZipCodeDatabase
zcdb = ZipCodeDatabase()
result = zcdb[54115]
print(result.city, result.state, result.latitude, result.longitude)
Requires Python 3.6+; source distribution may require a C compiler or build tools to install.
Verify before relying
- Whether the embedded ZIP code database (from 2004) remains accurate for current US postal codes
- Whether the package builds cleanly on modern Python versions despite abandonment
- Performance characteristics when searching or filtering large result sets
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,990 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 289,818/month — #7,997 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyzipcode-3.0.1.tar.gz
Keywords: zip, code, distance
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
uszipcodeProvides programmable access to a database of…
permissive · top 5,000 on PyPI
zipcodesQuery and validate U.S. zipcodes with embedded…
permissive · top 15,000 on PyPI
pypostalcodeLooks up Canadian postal codes to retrieve…
permissive · top 15,000 on PyPI
reverse-geocodeReverse Geocode converts latitude/longitude…
copyleft · top 15,000 on PyPI
IP2LocationLooks up geolocation data (country, region,…
permissive · top 15,000 on PyPI
pgeocodepgeocode queries postal codes to retrieve GPS…
permissive · top 5,000 on PyPI
usProvides structured access to US state and…
unclear · top 5,000 on PyPI
airportsdataProvides a static database of airport location,…
permissive · top 5,000 on PyPI
tzfpyConverts geographic coordinates…
permissive · top 5,000 on PyPI
tzwhereLooks up the IANA timezone name for a given…
permissive · top 15,000 on PyPI