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.0.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.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipcodestack-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 84ea542f097e02b731e9cbdbbd6522940c6c8f44da42389347d480d40cdfaece
MD5 5bf62160794a67e7c84607b3d7b10eb8
BLAKE2b-256 d43f94e843715e2f6b78aeb54ce8a2134079d2ce849aa1ec8cb38f365d0c0577

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipcodestack-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1976114d93286a825d8920bd925b9c31fbc226d90b65dc1ad92518b841033c0b
MD5 4695c65a736a33931264b5d3cf89f46e
BLAKE2b-256 73fa540277ef391661d5ea059cae48566d3a86c521022483f9cf422e8717f007

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