Official Python client for the PlanNexus planning data API.
Project description
PlanNexus Python SDK
Official Python client for the PlanNexus planning data API — access live planning applications from 100+ UK local authorities through one consistent interface.
Install
pip install plannexus
Requires Python 3.10+. Depends only on httpx.
Usage
Synchronous
from plannexus import PlanNexus
with PlanNexus(api_key="pn_live_...") as client:
# Full-text + structured search
result = client.applications.search(q="extension", postcode="SW1", per_page=10)
for app in result["data"]:
print(app["reference"], "-", app["address"])
# Nearby (radius in metres)
nearby = client.applications.nearby(lat=51.509, lng=-0.118, radius=500)
# Single record with full detail
full = client.applications.get(app["id"])
Asynchronous
import asyncio
from plannexus import AsyncPlanNexus
async def main():
async with AsyncPlanNexus(api_key="pn_live_...") as client:
result = await client.applications.search(postcode="SW1")
print(f"Matched {result['meta']['total']} applications")
asyncio.run(main())
Rate limits & retries
The client automatically retries 429 Too Many Requests up to 3 times,
honouring the Retry-After header when present. After retries are
exhausted a RateLimitError is raised with the .retry_after attribute.
from plannexus import PlanNexus, RateLimitError
try:
client.applications.search(...)
except RateLimitError as e:
print(f"Still rate-limited; hint was {e.retry_after}s")
Error handling
Any non-2xx (other than handled 429s) raises PlanNexusError with
.status_code, .detail, and .body populated from the response.
Links
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
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 plannexus-0.1.0.tar.gz.
File metadata
- Download URL: plannexus-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40efee12f8b96ebe4951c4618630355a66ab30f7f41c898b7a420b0f9450ac16
|
|
| MD5 |
69f1b2d402ffe1e1bb009c34ccb88856
|
|
| BLAKE2b-256 |
85f6f46b0a5cc6e2242f6a8ea422415b8d8459a83206551cce652dc8c8434adc
|
File details
Details for the file plannexus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plannexus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
018a882d0d8d07fd1a823ad6a550e4a06ba068390b2cdf7208d9925e27e2834c
|
|
| MD5 |
82ef8f4b30bfc66cf5c01a219d093b68
|
|
| BLAKE2b-256 |
653de6425861c9b17126f43d56ddcddbe09626fa7d2c40986ee52db0c0b24105
|