MCPcopy Create free account
hub / github.com/billxbf/ReWOO / get_current_zipcode

Method get_current_zipcode

nodes/Worker.py:183–188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

181 return location.raw["address"]["postcode"]
182
183 def get_current_zipcode(self):
184 ip_address = self.get_ip_address()
185 location_data = self.get_location_data(ip_address)
186 lat, long = location_data["loc"].split(",")
187 zipcode = self.get_zipcode_from_lat_long(float(lat), float(long))
188 return zipcode
189
190 def run(self, input):
191 assert isinstance(input, self.input_type)

Callers 1

runMethod · 0.95

Calls 3

get_ip_addressMethod · 0.95
get_location_dataMethod · 0.95

Tested by

no test coverage detected