-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract ip addresses #34
Conversation
|
sage/ip_lookup.py
Outdated
ip_info_response = requests.post('http://ip-api.com/batch', json=ip_list) | ||
except Exception as err: | ||
print(ip_info_response.status_code) | ||
if ip_info_response.status_code == 429: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future change would be to use the backoff package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving script in its current state since I know it's a hack to get the first round of data in the door. If these becomes an airflow DAG the items noted should be addressed.
|
Problem
It would be nice if we gathered the individual IP address information so we can make interesting analysis around cost and usage.
Solution
Leveraging a free API to extract the IP information and pushing it to a snowflake table.
Admittedly, the code is a bit hacky right now...