Metadata-Version: 2.4
Name: ip2geo-sdk
Version: 0.0.1
Summary: Official Python SDK for Ip2Geo - IP to Geolocation API.
Author-email: Ip2Geo <support@ip2geo.dev>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://ip2geo.dev
Project-URL: Documentation, https://docs.ip2geo.dev
Project-URL: Changelog, https://docs.ip2geo.dev/sdk/changelogs
Project-URL: Repository, https://github.com/ip2geo/python-sdk
Keywords: ip,geolocation,geo,ip2geo,geoip,ip-to-geo
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.20.0
Dynamic: license-file

<div align='center'>
   <a href='https://ip2geo.dev'>
        <img
            src='https://cdn-prod.ip2geo.dev/assets/python/generals/ip2geo.svg'
            alt='Ip2Geo Logo'
        />
   </a>

   <br />
</div>

<p align='center'>
    Your go-to IP-to-Geo cloud service — fast, accurate, and built for developers. Start free with 1,000 monthly stored conversions.
</p>

<p align='center'>
    <a href='https://ip2geo.dev'>
        <b>
            Website
        </b>
    </a>
    •
    <a href='https://app.ip2geo.dev'>
        <b>
            Dashboard
        </b>
    </a>
    •
    <a href='https://docs.ip2geo.dev'>
        <b>
            Documentation
        </b>
    </a>
    •
    <a href='https://status.ip2geo.dev'>
        <b>
            Services Status
        </b>
    </a>
</p>

<br />

## Intro to the Python SDK

This package provides a lightweight way to integrate Ip2Geo into your Python applications.

### Installing
```bash
pip install ip2geo-sdk
```

### Initializing
```python
import ip2geo

ip2geo.init('your-api-key')
```

### Using
```python
converted_ip = ip2geo.convert_ip(ip='8.8.8.8')

converted_ips = ip2geo.convert_ips(
    ips=[
        '8.8.8.8',
        '1.1.1.1',
        '9.9.9.9',
        '64.6.64.6',
    ]
)

# {
#     'success': True,
#     'code': 200,
#     'message': 'Success',
#     'data': { ... },
#     '_req': {
#          'reqId': 'string',
#          'resTime': 123
#     }
# }

# {
#     'success': True,
#     'code': 200,
#     'message': 'Success',
#     'data': [
#         {
#             'ip': '8.8.8.8',
#             'conversion': { ... }
#         }
#     ],
#     '_req': {
#          'reqId': 'string',
#          'resTime': 123
#     }
# }
```
