Metadata-Version: 2.5
Name: adiresi
Version: 0.1.0
Summary: Python client for the Adiresi API — Nigerian address resolution, NIPOST postcodes, geofencing and validation.
Project-URL: Homepage, https://adiresi.com.ng
Project-URL: Documentation, https://api.adiresi.com.ng/docs
Author-email: Adiresi <dev@adiresi.com.ng>
License: MIT
Keywords: address,geocoding,nigeria,nipost,postcode
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# adiresi (Python)

Python client for the [Adiresi](https://adiresi.com.ng) API — turn Nigerian address
descriptions into official NIPOST postcodes, confirmed pins, distance/ETA,
geofence events and contact validation.

## Install

```bash
pip install adiresi
```

## Usage

```python
from adiresi import Adiresi

adr = Adiresi("adr_your_key")

# Free-form Nigerian address → postcode + coordinates
r = adr.resolve("opposite Mobil, after the second gate, Lekki")
print(r["status"], r["postcode"], r["confidence"])

# Reuse a customer's confirmed address
v = adr.vault_lookup("+234 803 123 4567")
if v["found"]:
    print(v["postcode"], v["coordinates"])

# Distance + ETA (driving, two_wheeler, walking, bicycling, transit)
d = adr.distance("6.5244,3.3792", "6.6018,3.3515", mode="two_wheeler")
print(d["distance_m"], d["duration_s"])

# Proof of delivery: fence the confirmed pin, ping the rider's position
f = adr.create_geofence("Order 441 drop", lat=6.4281, lng=3.4219, radius_m=150)
adr.ping("rider-12", lat=6.4283, lng=3.4220)  # → geofence.enter webhook

# Contact data
print(adr.validate_phone("0803 123 4567"))   # {'carrier': 'mtn', ...}
print(adr.validate_email("dev@example.com")) # {'mx': True, ...}
```

All methods return the decoded JSON body. Non-2xx responses raise
`AdiresiError` with `.status` and `.detail`.

Full reference: <https://api.adiresi.com.ng/docs>
