Giter Club home page Giter Club logo

hometap's Introduction

Hometap Property API

Example approach for service that wraps an external API.

Dependencies

  • Flask - lightweight web application framework
  • Marshmallow - data marshalling and (de)serialization
  • Pytest - testing framework

How to run

  • create a virtualenv python3 -m venv hometap
  • install dependencies pip install -r requirements.txt
  • create a .env.secret file to store credentials (see Configuration)
  • run the flask app source run.sh
  • access the service at 127.0.0.1:5000

Configuration

A .env.secret file must be created to hold API credentials. Create this file with the following format:

HOUSECANARY_API_KEY = "enter_real_key"
HOUSECANARY_API_SECRET = "enter_real_secret"

Run tests

  • Run unit tests with pytest -k unit
  • Run integration tests with pytest -k integration (note: these will fail until proper API credentials are setup)

Endpoints

Endpoint: /propertydetails/sewer

Method: GET

Arguments:

  • address1_number - road number of the requested address (required)
  • address1_street - road name of the requested address (required)
  • address2 - additional address components (optional)
  • unit - building unit number of requested address (optional)
  • city - city name of the requested address (optional)
  • state - US state name of the requested address (optional)
  • zip - ZIP code of the requested address (optional)

parameters must include either a zip code or a city/state combination

Structure

  • /api - routes for wrapper API
  • /clients - client code to accessing external APIs (HouseCanary, etc.)
  • /schemas - domain object schemas for data validation / marshalling
  • /service - service layer to connect client and api layers and run business logic

hometap's People

Contributors

danesolberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.