Skip to content

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


Short Examples

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:


Next Steps