Skip to main content

Open Exchange Python SDK.

Project description

Open Exchange Python SDK

The Open Exchange Python SDK provides access to the Open Exchange REST API from applications written in Python 3.6 and later.

Documentation

The REST API documentation is available at https://openexchange.readme.io/.

Installation

You can install the package via pip:

pip install open-exchange

Usage

See the examples directory for examples of how to use the SDK.

import open_exchange
from open_exchange.types.data import rental_comps_fetch_params, rental_comps_response
from typing import List

# get API KEY from environment variable OPEN_EXCHANGE_API_KEY
client = open_exchange.OpenExchangeClient()

addresses: List[rental_comps_fetch_params.Address] = [
    {
        "street": " 5201 S 44th St",
        "city": "Omaha",
        "state": "NE",
        "postal_code": "68107",
        "token": "client-provided-token-1",
    }
]

filters: rental_comps_fetch_params.Filters = {
    "bedrooms_total": {
        "relative": 1,
    }
}

# get rental comps for a iterable of addresses with filters
result: rental_comps_response.Result
for result in client.data.rental_comps.fetch(addresses=addresses, filters=filters):
    assert result.token == "client-provided-token-1"

    print("Subject property details:", result.subject_property_details)
    print("Number of rental comps:", len(result.rental_comps))
    print("Rental comps:", result.rental_comps)

Logging

We use the Python standard library logging module.

Requirements

Python 3.6 or higher.

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

open_exchange-0.2.0.tar.gz (30.3 kB view hashes)

Uploaded Source

Built Distribution

open_exchange-0.2.0-py3-none-any.whl (23.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page