Official Python SDK for the WWSrapport API.
- API overview and Swagger: wwsrapport.nl/api/docs
- OpenAPI JSON: wwsrapport.nl/api/openapi.json
- Request a partner account: wwsrapport.nl/api/toegang-aanvragen
- WWSrapport account and API keys: wwsrapport.nl/account
- GitHub organization: github.com/wwsrapport
Official clients:
pip install wwsrapportfrom wwsrapport import ReportResponse, WwsrapportClient
client = WwsrapportClient(api_key="wwsr_live_...")
report: ReportResponse = client.reports.create(
{
"address": {
"postcode": "3905RB",
"house_number": "4",
"city": "Veenendaal",
},
"customer_reference": "demo-001",
},
idempotency_key="demo-001",
)
print(report["id"], report["status"])The package exports TypedDict definitions for the public API contract, including property prefill, reports, calculations, improvement advice, documents, usage, rulesets, webhooks, and webhook delivery attempts.
The runtime response remains the normal Python dict returned by the API, while editors and type checkers can use the exported types for safer integrations.
from wwsrapport import parse_webhook_event, verify_webhook_signature
raw_body = request.get_data(as_text=True)
if not verify_webhook_signature(raw_body, request.headers, "whsec_..."):
raise ValueError("Invalid WWSrapport webhook signature")
event = parse_webhook_event(raw_body)
print(event["type"], event["data"])The verifier expects:
WWS-Webhook-TimestampWWS-Webhook-Signature
The signature format is v1=<hex-hmac-sha256>, signed over:
{timestamp}.{raw_body}
python -m pip install -e ".[dev]"
python -m unittest discover -s tests