uhub / awesome-python

A curated list of awesome Python frameworks, libraries and software.
1.13k stars 184 forks source link

Requesting adding IPinfo to the list. #21

Open abdullahdevrel opened 8 months ago

abdullahdevrel commented 8 months ago

Hi,

I would like to request the addition of ipinfo to the awesome-python list.

It is a wrapper library built on top of IPinfo.io's API service. The library has the following features:

If the request is approved, I can make a pull request to the repository. Thank you for reviewing.

Code example:

import ipinfo

# Initialize the library
handler = ipinfo.getHandler()

# Random IP address
ip = "167.116.158.203"

# Get details of the IP address using the IPinfo API service
print(details.all)

Output:

{'ip': '167.116.158.203', 'hostname': 'r167-116-158-203.dialup.mobile.ancel.net.uy', 'city': 'Montevideo', 'region': 'Montevideo Department', 'country': 'UY', 'loc': '-34.9033,-56.1882', 'org': 'AS6057 Administracion Nacional de Telecomunicaciones', 'postal': '11100', 'timezone': 'America/Montevideo', 'readme': 'https://ipinfo.io/missingauth', 'country_name': 'Uruguay', 'isEU': False, 'country_flag_url': 'https://cdn.ipinfo.io/static/images/countries-flags/UY.svg', 'country_flag': {'emoji': '🇺🇾', 'unicode': 'U+1F1FA U+1F1FE'}, 'country_currency': {'code': 'UYU', 'symbol': '$U'}, 'continent': {'code': 'SA', 'name': 'South America'}, 'latitude': '-34.9033', 'longitude': '-56.1882'}