Metadata-Version: 2.4
Name: ipclues
Version: 0.2.0
Summary: Official IPClues SDK for Python
Keywords: ip,geolocation,network-intelligence,ipclues,api
Author: Rufai Limantawa
Author-email: Rufai Limantawa <rufailimantawa@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Typing :: Typed
Requires-Dist: ruff>=0.17.3 ; extra == 'dev'
Requires-Dist: twine>=7.0 ; extra == 'dev'
Requires-Python: >=3.10
Project-URL: Homepage, https://ipclues.com
Project-URL: Repository, https://github.com/ipclues/python-sdk
Project-URL: Issues, https://github.com/ipclues/python-sdk/issues
Provides-Extra: dev
Description-Content-Type: text/markdown

# IPClues Python SDK

Official Python SDK for the [IPClues](https://ipclues.com) IP intelligence API.

## Requirements

- Python 3.10+
- An IPClues API key

## Install

```bash
python -m pip install ipclues
```

## Quick start

```python
import os
from ipclues import Client, Database

client = Client("YOUR_API_KEY")

response = client.lookup(
    "1.1.1.1",
    db=[Database.GEO_I3_LITE, Database.NET_I3_IDENTITY],
)

print(response.data)
print(response.metadata.status)
print(response.metadata.credits_remaining)
print(response.metadata.database_versions)
```

## Response behavior

The SDK wraps the API response body and HTTP metadata:

- `response.data`: original decoded response body.
- `response.metadata.status`: HTTP status code.
- `response.metadata.request_id`: `I3-Request-Id` header.
- `response.metadata.credits_charged` and `credits_remaining`: credit usage headers.
- `response.metadata.databases` and `database_versions`: response database headers.
- `response.metadata.rate_limit`: parsed rate-limit headers.

HTTP error responses such as 401, 402, and 429 are returned as `APIResponse` objects too. Network failures and timeouts raise exceptions.

## License

MIT
