Skip to main content

Zipcodestack Python Client

Official Python wrapper for the Zipcodestack API.

Installation

pip install zipcodestack

Install from source:

pip install git+https://github.com/everapihq/zipcodestack-python.git

Quickstart

import os
from zipcodestack import Client

client = Client(os.environ["ZIPCODESTACK_API_KEY"])  # or Client("YOUR_API_KEY")

# Retrieve API status & quota
print(client.status())

# Search postal/zip codes
print(client.search(codes=["1010", "1020"], country="AT"))

# Calculate distance between postal/zip codes
print(client.distance(code="99501", compare=["90210", "10001"], country="US", unit="km"))

API

  • Client(api_key: str, *, base_url: str = "https://api.zipcodestack.com/v1", timeout: float | None = None)
  • status() → dict
  • search(*, codes: str | Iterable[str], country: str | None = None, **params) → dict
  • distance(*, code: str, compare: str | Iterable[str], country: str | None = None, unit: str | None = None, **params) → dict

See the official docs for accepted parameters and response formats: https://zipcodestack.com/docs/

License

MIT

Metadata

Release files for zipcodestack 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zipcodestack 0.1.1
File Size Uploaded
zipcodestack-0.1.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zipcodestack 0.1.1
File Interpreter ABI Platform
zipcodestack-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / zipcodestack-0.1.1.tar.gz

Download URL zipcodestack-0.1.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d8b7b313fa08ce626c85eb92cd7de3d85ca6951b63901d665b7a4cdf73e730b
BLAKE2b-256 checksum
How to use checksums
a530e97fb3b1ca65a85c60ce00ae6e072c20be589072f8e763f7c07daa498dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release files / zipcodestack-0.1.1-py3-none-any.whl

Download URL zipcodestack-0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dd9babbe135036fb98e662dee816e35fd020f6352c0e140aa15dc076945e4bc
BLAKE2b-256 checksum
How to use checksums
e2b3971879a6a2ddbc05de50fe82855a86638bf5216128e5fc5d981d6d9f8273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page