# AddressZen Python SDK

[`addresszen`](https://pypi.org/project/addresszen/) is the Python client for the AddressZen API. It has one typed method per API operation and returns each response as a Pydantic model. It needs Python 3.12 or later.

```bash
pip install addresszen
```

verify.pypython

```python
from addresszen import AddressZen

with AddressZen("ak_test") as client:
    result = client.address_verify(query="1010 Cauthen Ln, Alamogordo, NM 88310")
    print(result.address_line_one, result.city, result.state, result.zip_code)
```

## Capabilities

Every operation in the API has a method. The ones most integrations need have a guide:

* [Address verification](/docs/sdks/python/address-verify.md): correct and standardize a US address against USPS data
* [Email validation](/docs/sdks/python/email-validation.md): check that an address can receive mail
* [Phone validation](/docs/sdks/python/phone-validation.md): check a number from any country and format it
* [API keys](/docs/sdks/python/keys.md) and [licensees](/docs/sdks/python/licensees.md): balances, limits, usage and sub-licensing

Address autocomplete, place search and saved configs are on the [endpoint pages](/docs/sdks/python/endpoints.md), one per method.

## SDK vs direct API calls

* Each method takes the API's parameters as typed arguments, so Pyright and mypy catch a misspelled argument before you run it
* The SDK checks each response against the OpenAPI spec and raises `ProtocolError` if it does not match
* It never retries on its own, so a billable lookup repeats only when your code repeats it
* It depends on HTTPX and Pydantic, nothing else

## Coding agents

* **Agent skill.** `npx skills add addresszen/skills` installs the `azn-python-sdk` skill, built from these pages.
* **Markdown.** Add `.md` to any page URL, such as [`/docs/sdks/python/address-verify.md`](/docs/sdks/python/address-verify.md).
* **[llms.txt](https://docs.addresszen.com/llms.txt).** An index of every page on this site.
* **[OpenAPI spec](https://openapi.addresszen.com/openapi.json).** The contract the SDK is generated from.
