uszipcode
USA zipcode programmable database, includes 2020 census data and geometry information.
What it is and what it does
uszipcode is a Python library that bundles a snapshot of US zipcode data crawled from data.census.gov, exposing it through a queryable search interface. It includes 42,724 zipcodes (STANDARD, PO BOX, UNIQUE, and MILITARY types) with associated census demographics, geographic coordinates, housing statistics, employment data, and income information. The data is primarily static from Census 2010 for demographic fields, with some time-series data extending to 2020 for population trends.
You query the database by zipcode to retrieve address, postal, geography, demographic, housing, employment, and education fields. The package depends on SQLAlchemy for data storage and retrieval, plus utilities like fuzzywuzzy for fuzzy matching and haversine for distance calculations. It is designed as a self-contained, offline-queryable reference rather than a live API client.
Use it for:
- Look up geographic coordinates and timezone for a US zipcode without calling an external API
- Retrieve Census 2010 demographic and income statistics for a zipcode to support business analytics or research
- Find housing and rental cost estimates by zipcode for real estate or relocation planning
- Query employment and educational attainment data for a region to support workforce analysis
- Perform fuzzy zipcode matching when user input is incomplete or misspelled
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides programmable access to a database of 42,724 US zipcodes with census demographics, geography, housing, employment, and income data.
Yes, if your use case tolerates static Census 2010 data and you need offline zipcode lookups without external API calls. No, if you require current census data, frequent updates, or active maintenance—the package has been abandoned since 2022-01-06 and will not receive security or data updates. Suitable for reference applications, historical analysis, or prototyping; not for production systems requiring fresh demographic data.
Install
uszipcode on PyPI
pip
pip install uszipcodeuv
uv add uszipcodepoetry
poetry add uszipcodeInstalling uszipcode
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2022-01-06, over 1681 days ago. No recent maintenance or security updates; rely on it only if the data snapshot it contains meets your needs.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
Quickstart
pip install uszipcode
from uszipcode import SearchEngine
se = SearchEngine()
result = se.by_zipcode('94103')
print(result.lat, result.lng, result.population)
Verify before relying
- Whether the Census 2010 static data and IRS population data through FY 2018 / 2020 are current enough for your use case
- Whether the 42,724 zipcodes in the database include all current US postal codes or represent a snapshot
- How frequently the underlying data source (data.census.gov) is updated and whether this package will track those updates
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — attrs, requests, pathlib-mate, atomicwrites, fuzzywuzzy, haversine, SQLAlchemy, sqlalchemy-mate |
| Maintenance | abandoned — 1,681 days since the last release |
| First released | |
| Downloads | 996,200/month — #4,547 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: uszipcode-1.0.1-py2.py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pyzipcodeProvides local lookup of US ZIP code…
permissive · top 15,000 on PyPI
zipcodesQuery and validate U.S. zipcodes with embedded…
permissive · top 15,000 on PyPI
spm-calculatorCalculate Supplemental Poverty Measure (SPM)…
permissive · top 15,000 on PyPI
censusgeocodeWraps the US Census Geocoder API to convert…
copyleft · top 15,000 on PyPI
usProvides structured access to US state and…
unclear · top 5,000 on PyPI
pypostalcodeLooks up Canadian postal codes to retrieve…
permissive · top 15,000 on PyPI
segregationCalculates over 40 segregation indices—both…
permissive · top 15,000 on PyPI
censusProvides a Python wrapper for the United States…
permissive · top 15,000 on PyPI
reverse-geocodeReverse Geocode converts latitude/longitude…
copyleft · top 15,000 on PyPI
python-rangesProvides Range, RangeSet, and RangeDict data…
permissive · top 15,000 on PyPI