Examples¶
Practical examples for common WFRMLS client workflows. This section stays intentionally compact and points to the guides that already exist in the repository.
Quick Navigation¶
-
Quick Start
Make your first request and inspect a simple response.
-
Property Search
Work with filtering, sorting, and field selection.
-
OData Queries
Build more precise query expressions for real workloads.
-
Data Sync
Use incremental update patterns for local stores.
-
Error Handling
Add retries, logging, and defensive response handling.
Short Examples¶
Property search¶
from wfrmls import WFRMLSClient
client = WFRMLSClient()
properties = client.property.get_properties(
filter_query="StandardStatus eq 'Active' and ListPrice le 500000",
select=["ListingId", "ListPrice", "City", "BedroomsTotal"],
orderby="ListPrice asc",
top=10,
)
for property_record in properties:
print(
property_record["ListingId"],
property_record.get("City"),
property_record.get("ListPrice"),
)
Open house lookup¶
from wfrmls import WFRMLSClient
client = WFRMLSClient()
open_houses = client.openhouse.get_upcoming_open_houses(days_ahead=7, top=10)
for open_house in open_houses.get("value", []):
print(open_house.get("OpenHouseDate"), open_house.get("ListingKey"))
Incremental sync pattern¶
from datetime import datetime, timedelta, timezone
from wfrmls import WFRMLSClient
client = WFRMLSClient()
cutoff = datetime.now(timezone.utc) - timedelta(minutes=15)
recent_updates = client.property.get_properties(
filter_query=f"ModificationTimestamp gt '{cutoff.isoformat()}'",
orderby="ModificationTimestamp desc",
top=200,
)
When To Use Guides Instead¶
Use the dedicated guides when you need more than a quick pattern:
- Property Search Guide for search-oriented applications.
- OData Queries Guide for complex filters and sorting.
- Data Sync Guide for synchronization workflows.
- Rate Limits Guide for pacing and retry strategies.
Next Steps¶
- API Reference - Review the full client surface.
- Reference Guide - Check shared field and response conventions.
- Getting Started - Revisit installation and authentication setup.