Metadata-Version: 2.5
Name: ipdatum
Version: 1.0.0
Summary: Official zero-dependency Python SDK for IPDatum — dual-stack IPv4/IPv6 geolocation, ASN metadata, VPN/proxy/Tor detection, DNS, and RDAP/WHOIS intelligence.
Project-URL: Homepage, https://www.ipdatum.com
Project-URL: Documentation, https://www.ipdatum.com/docs
Project-URL: MCP Server, https://www.ipdatum.com/docs/mcp
Project-URL: Get API Key, https://www.ipdatum.com/dashboard
Project-URL: Repository, https://github.com/ipdatum/ipdatum-python
Project-URL: Issues, https://github.com/ipdatum/ipdatum-python/issues
Project-URL: Changelog, https://github.com/ipdatum/ipdatum-python/blob/main/CHANGELOG.md
Author-email: IPDatum <support@ipdatum.com>
License-Expression: MIT
License-File: LICENSE
Keywords: asn,geolocation,ip,ip-geolocation,ip-intelligence,ip-lookup,rdap,vpn-detection,whois
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# ipdatum

Official zero-dependency Python SDK for [IPDatum](https://www.ipdatum.com) — dual-stack IPv4 & IPv6 geolocation, ASN metadata, VPN/proxy/Tor/cloud detection, reverse & forward DNS, and RDAP/WHOIS intelligence.

Works immediately on the **free keyless tier (1,000 requests/day)** or with an API key from the [IPDatum Dashboard](https://www.ipdatum.com/dashboard).

## Installation

```bash
python -m pip install ipdatum
```

Requires Python 3.9+ (zero third-party runtime dependencies).

## Quick Start

```python
from ipdatum import IPDatumClient

with IPDatumClient() as client:  # or IPDatumClient(api_key="ipd_...")
    info = client.lookup("88.198.47.21")
    print(info.location.city, info.location.country, info.security.is_vpn)
    print(client.last_rate_limit)
```

## Batch, ASN, DNS & WHOIS

```python
from ipdatum import IPDatumClient

client = IPDatumClient()

# Up to 100 IPv4/IPv6 addresses (no-code tool: https://www.ipdatum.com/bulk-ip-lookup)
batch_res = client.batch(["8.8.8.8", "2606:4700:4700::1111"])

# ASN metadata & RDAP prefixes
google_asn = client.asn("AS15169")

# Reverse PTR or forward A/AAAA resolution + IP intelligence
dns_res = client.dns("8.8.8.8")

# RDAP / WHOIS for an IP, ASN, or domain
whois_res = client.whois("8.8.8.8")
```

## Error Handling

```python
from ipdatum import IPDatumClient, IPDatumError

client = IPDatumClient()
try:
    client.lookup("999.999.999.999")
except IPDatumError as exc:
    print(exc.status_code, exc.code, exc.retry_after, str(exc))
```

## Documentation & Links

- **API Reference:** [https://www.ipdatum.com/docs](https://www.ipdatum.com/docs)
- **Remote MCP Server (Claude / Cursor / AI Agents):** [https://www.ipdatum.com/docs/mcp](https://www.ipdatum.com/docs/mcp)
- **API Keys & Usage Dashboard:** [https://www.ipdatum.com/dashboard](https://www.ipdatum.com/dashboard)
- **Source Code:** [https://github.com/ipdatum/ipdatum-python](https://github.com/ipdatum/ipdatum-python)

## License

MIT — see [LICENSE](https://github.com/ipdatum/ipdatum-python/blob/main/LICENSE).
