skillfed

pypostalcode

Radius searches on Canadian postal codes, location data

pypostalcode v0.4.1 196.0K downloads/30d#9,799 on PyPI44
Permissive license MIT Abandoned released

What it is and what it does

pypostalcode is a Canadian postal code database and lookup tool. It provides fast lookups of Forward Sortation Area (FSA) codes to retrieve associated city, province, geographic coordinates, and timezone data. The package also supports radius-based searches to find all postal codes within a specified distance in kilometers from a given FSA code.

The package has no runtime dependencies and installs cleanly as a pure Python wheel. It was last updated in June 2021 and is no longer actively maintained, so the underlying postal code data may not reflect recent changes to Canadian postal code assignments or geographic boundaries.

Use it for:

  • Look up city and province information for a Canadian postal code in an application or data pipeline.
  • Find all postal codes within a radius to support location-based filtering or geographic queries.
  • Retrieve geographic coordinates and timezone for a postal code to support mapping or scheduling features.
  • Validate or enrich Canadian address data with postal code lookups in batch processing.
  • Support geolocation features in a web or mobile application serving Canadian users.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Looks up Canadian postal codes to retrieve city, province, geographic coordinates, and timezone information, and finds postal codes within a specified radius.

Yes, if you need Canadian postal code lookups and can accept that the data is frozen as of June 2021. The package is stable, has no dependencies, and installs easily. However, if you require current postal code data or active maintenance, you should verify the database currency against Canada Post's current FSA assignments before relying on it in production.

Install

pypostalcode on PyPI

pip

pip install pypostalcode

uv

uv add pypostalcode

poetry

poetry add pypostalcode

Installing pypostalcode

Before you install

Installation is straightforward with no runtime dependencies. The package is abandoned as of June 2021 with no recent maintenance, so expect no updates or bug fixes.

License in practice

MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install pypostalcode

from pypostalcode import PostalCodeDatabase
pcdb = PostalCodeDatabase()
location = pcdb['V5K']
print(location.city, location.province, location.latitude, location.longitude)

Verify before relying

  • Whether the postal code database is current or reflects changes to Canadian postal codes since the last 2021 release.
  • Compatibility with modern Python versions, as the package specifies no explicit Python version requirement.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,882 days since the last release
Last repo commit
First released
Downloads 196,048/month — #9,799 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pypostalcode-0.4.1-py3-none-any.whl

Keywords: Canada, postal, code, distance, geonames

Tags

canadian postal code lookuppostal code distance searchcanadian city by postal codepostal code radius searchcanada postal code databasepostal code geocodingcanadian fsa lookup
geolocationcanadian-datapostal-codes

More Database packages