Skip to main content

Python SDK for HOUSES API

Project description

HOUSES Client

A Python Client SDK for the Mayo Clinic HOUSES API

Requirements

Python 3.11+

Installation

pip install houses-client
Houses Client Property Main function option Description
api_endpoint -e, --endpoint HOUSES api endpoint
client_id -u, --clientid OIDC Client ID - required unless using self_hosted mode
client_secret -s, --clientsecret OIDC Client Secret - required, unless using self_hosted mode
self_hosted -h, --selfhosted Self Hosted Mode - No Auth
log_level N/A Client log level
-i, --ifile input file path
-o, --ofile output file path
-y, --year request year [global]
-d, --delimiter input file record delimiter, default = ,

Example Usage

from houses_client import client

#Create a client passing in your API client id and client secret
client = client.HousesClient(api_endpoint="https://houses.konfidential.io", 
  client_id="my oidc client id", 
  client_secret="my oidc client secret",
  self_hosted=False,                             
  log_level="INFO")

# Submit batch request reading from myinput.csv and writing results to myoutput.csv
# year is applied to records if the csv format doesn not include year
client.batch(input_path="myinput.csv", output_path="myoutput.csv", year=2021, delimiter=',')

Example Usage - CLI

Example processing with custom endpoint, input file=sample1.csv, output_file=sample1_output.csv, year=2021, delimiter=, and self hosted mode (no auth):

 python -m houses_client.client \
  -e https://localhost:9000 \
  -i sample1.csv \
  -o sample1_output.csv \
  -y 2021 \
  -d , \
  --selfhosted

Input Data Schema

Single Address Format

  • id: user defined unique id
  • address: single address string; e.g. 123 main st anycity NY 12345. The address should contain one of the following combinations:
    • city and state
    • city
    • state
    • zipcode
  • year: the requested year. This is an optional field and if provided overrides the request level year
  • referenceAddress: the requested reference address. This is an optional field and if provided overrides the request level reference address

Example:

id,address,year
1,"123 main st anytown ny 5555",2019
2,"456 main st anytown ny 55555",2018

Example With referenceAddress:

id,address,year,referenceAddress
1,"123 main st anytown ny 5555",2019,"789 main st anytown y 55555"
2,"456 main st anytown ny 55555",2018,"678 main st anytown y 55555"

Full Component Address Format

  • id: user defined unique id
  • address: Street Address
  • secondary: Optional Secondary Street Address; e.g. Apartment or Suite number
  • city
  • state
  • zip
  • year: the requested year. This is an optional field and if provided overrides the request level year
  • referenceAddress: the requested reference address. This is an optional field and if provided overrides the request level reference address

Build

python3 -m pip install --upgrade build
python3 -m build

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

houses_client-1.3.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

houses_client-1.3.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file houses_client-1.3.0.tar.gz.

File metadata

  • Download URL: houses_client-1.3.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for houses_client-1.3.0.tar.gz
Algorithm Hash digest
SHA256 785be8b4ba9f36a99a6dec59b5562e501e1a437964821d0416f8eba01f81b039
MD5 9b5b43a40c91828fe23ac8c5a8e8199f
BLAKE2b-256 bd283c73010935a849b2380fe763faca63cd303197daea6633a7269b432eb239

See more details on using hashes here.

File details

Details for the file houses_client-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: houses_client-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for houses_client-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e641b226814a571e2674623a4eb5a8a274bcdf4d2c9875217279807d2075be41
MD5 424f1d907fcc0a4ec3f5fa85eb9501ae
BLAKE2b-256 e67443b40876235d8d6119028f9ae5d06eaf942e2f06c2894bce9fbee1499bd5

See more details on using hashes here.

Supported by

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