skillfed

pyzipcode

query zip codes and location data

pyzipcode v3.0.1 289.8K downloads/30d#7,997 on PyPI15
Permissive license MIT Abandoned released

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 pyzipcode

uv

uv add pyzipcode

poetry

poetry add pyzipcode

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

zip code lookupUS postal code databasecity state from zipcoordinates from zip codezip code search by citynearby zip codes radiustimezone from zip code
geocodingoffline-dataabandoned

More Utilities packages