Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plannexus-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plannexus-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for plannexus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40efee12f8b96ebe4951c4618630355a66ab30f7f41c898b7a420b0f9450ac16
MD5 69f1b2d402ffe1e1bb009c34ccb88856
BLAKE2b-256 85f6f46b0a5cc6e2242f6a8ea422415b8d8459a83206551cce652dc8c8434adc

See more details on using hashes here.

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

Hashes for plannexus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 018a882d0d8d07fd1a823ad6a550e4a06ba068390b2cdf7208d9925e27e2834c
MD5 82ef8f4b30bfc66cf5c01a219d093b68
BLAKE2b-256 653de6425861c9b17126f43d56ddcddbe09626fa7d2c40986ee52db0c0b24105

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