zscaler / zscaler-sdk-python

Official Zscaler SDK Python provides an uniform and easy-to-use interface for each of the Zscaler product APIs.
https://pypi.org/project/zscaler-sdk-python/
MIT License
5 stars 1 forks source link

[FEATURE] Is there a option in SDK to find latitude and longitude based on city #169

Open gopurx opened 1 day ago

gopurx commented 1 day ago

Problem Statement Trying to find option to get lat and long of city while creating static_ips

Proposed Solution Extend create_static_ip to accept city,state,country to populate or option to search for lat and long to pass it on while creating the same

Additional Context Add any other context, references or screenshots about the feature request here.

willguibr commented 10 hours ago

@gopurx I assume your ask is to enhance the add_static_ip method here. The enhancement would involve implicitly invoke the method of the following method get_geo_by_ip here, and exporting the latitude and longitude values returned in the API response and passing it to the add_static_ip.

{
  "city_geo_id": 4269447,
  "state_geo_id": 4273857,
  "latitude": 37.6325999,
  "longitude": -97.7724999,
  "city_name": "Cheney",
  "state_name": "Kansas",
  "country_name": "United States",
  "country_code": "US",
  "postal_code": "67025",
  "continent_code": "NA"
}

We'll look into extending this functionality. Please confirm if our understanding is correct. In the meantime you can leverage the get_geo_by_ip here and it will give you the expected results you're looking for.

Zscaler DevRel.

gopurx commented 26 minutes ago

@willguibr I am looking for an ability to derive lat and long based on City, State vs IP. There are cases we are observing the City is wrongly derived while using get_geo_by_ip

willguibr commented 9 minutes ago

@gopurx Can you please provide an example where you're "observing the City is wrongly derived while using get_geo_by_ip" Thanks Zscaler DevRel