Official Python client for zipcodestack.com API
Project description
Zipcodestack Python Client
Official Python wrapper for the Zipcodestack API.
- Docs: https://zipcodestack.com/docs/
- Built on: https://github.com/everapihq/everapi-python
- Example reference: https://github.com/everapihq/freecurrencyapi-python
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()→ dictsearch(*, codes: str | Iterable[str], country: str | None = None, **params)→ dictdistance(*, 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84ea542f097e02b731e9cbdbbd6522940c6c8f44da42389347d480d40cdfaece
|
|
| MD5 |
5bf62160794a67e7c84607b3d7b10eb8
|
|
| BLAKE2b-256 |
d43f94e843715e2f6b78aeb54ce8a2134079d2ce849aa1ec8cb38f365d0c0577
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1976114d93286a825d8920bd925b9c31fbc226d90b65dc1ad92518b841033c0b
|
|
| MD5 |
4695c65a736a33931264b5d3cf89f46e
|
|
| BLAKE2b-256 |
73fa540277ef391661d5ea059cae48566d3a86c521022483f9cf422e8717f007
|