Skip to main content

Official Python client for zipcodestack.com API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zipcodestack-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zipcodestack-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file zipcodestack-0.1.1.tar.gz.

File metadata

  • Download URL: zipcodestack-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for zipcodestack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2d8b7b313fa08ce626c85eb92cd7de3d85ca6951b63901d665b7a4cdf73e730b
MD5 716b4ba5564350c6daa9559948d49934
BLAKE2b-256 a530e97fb3b1ca65a85c60ce00ae6e072c20be589072f8e763f7c07daa498dc9

See more details on using hashes here.

File details

Details for the file zipcodestack-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zipcodestack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for zipcodestack-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd9babbe135036fb98e662dee816e35fd020f6352c0e140aa15dc076945e4bc
MD5 dcc4d4775c9b3f5b70406dad5eae2bf8
BLAKE2b-256 e2b3971879a6a2ddbc05de50fe82855a86638bf5216128e5fc5d981d6d9f8273

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page