-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata.py
More file actions
36 lines (28 loc) · 1.15 KB
/
data.py
File metadata and controls
36 lines (28 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sys
sys.path.insert(0, './src')
from zillowapi import api, key
def getRawResults(address, postalCode):
result = api.GetSearchResults(key, address, postalCode)
zestimate = result.zestiamte.valuation_range_low
return int(zestimate)
def getResults(address, postalCode):
result = api.GetSearchResults(key, address, postalCode)
zestimate = result.zestiamte.valuation_range_low
formattedZestimate = '{:,}'.format(zestimate)
return("$" + formattedZestimate)
def getAddress(address, postalCode):
result = api.GetSearchResults(key, address, postalCode)
address = result.full_address
fullAddress = ("Address: " + address.street + ", " + address.city + ", " +
address.state + " " + address.zipcode)
return(fullAddress)
def realisticSale(address, postalCode):
baseValue = getRawResults(address, postalCode)
realisticSaleValue = baseValue * 0.71
formattedValue = '{:,}'.format(realisticSaleValue)
return formattedValue
def getMaxBid(address, postalCode):
homeValue = getRawResults(address, postalCode) * 0.71
maxBid = homeValue * 0.67
formattedBid = '{:,}'.format(maxBid)
return("$" + formattedBid)