Inherit ipstack.connector module and use the available methods
_name = "your.model"
_inherit = ["ipstack.connector"]
@api.multi
def your_method(self):
(...)
country = self.map_ip(rec.ip_address)
Set the API URL and key on system general settings
FAQ
ipstack Connector is under BSD-3 License