SDK · Python

PropRaven Python SDK

Typed Python client for the PropRaven API. Generated from OpenAPI 3.1 via Stainless, published to PyPI with SLSA provenance.

Install

pip install propraven

Python 3.9+. Optional extras for DataFrame conversion: propraven[pandas], propraven[polars], propraven[arrow].

Quickstart

Set PROPRAVEN_API_KEY in your environment, or pass api_key= to the constructor.

from propraven import Propraven

client = Propraven()  # reads PROPRAVEN_API_KEY from env

# Single parcel
parcel = client.v1.parcels.retrieve("37183:0012345")
print(parcel.owner_name, parcel.assessed_value)

# Owner pierce
portfolio = client.v1.owners.retrieve_portfolio_summary("BLACKROCK FUND ADVISORS")

# Coverage stats
cov = client.v1.retrieve_coverage()
print(f"{cov.total_parcels:,} parcels across {cov.states_covered} states")

Async

import asyncio
from propraven import AsyncPropraven

async def main():
    async with AsyncPropraven() as client:
        parcels = await asyncio.gather(*[
            client.v1.parcels.retrieve(pid) for pid in parcel_ids
        ])
    return parcels

asyncio.run(main())

Webhook signature verification

When PropRaven POSTs an event to your endpoint, verify the signature before processing.

from propraven.webhooks import verify, WebhookVerificationError

# Inside your webhook handler — use the RAW body, not parsed JSON
raw_body = await request.body()
sig = request.headers["X-PropRaven-Signature"]

try:
    verify(
        secret=os.environ["PROPRAVEN_WEBHOOK_SECRET"],
        signature_header=sig,
        payload=raw_body,
    )
except WebhookVerificationError:
    return Response(status_code=401)

event = json.loads(raw_body)

HMAC-SHA256, 5-minute replay window, constant-time compare. Configurable via tolerance_seconds.

Resources