Metadata-Version: 2.4
Name: addrly
Version: 1.0.1
Summary: Official Python SDK for the Addrly email validation API
Author-email: Addrly <support@addrly.io>
License: MIT
Project-URL: Homepage, https://addrly.io
Project-URL: Documentation, https://addrly.io/documentation
Project-URL: Repository, https://github.com/addrlyq/addrly-python
Keywords: email,validation,verification,disposable,spam,mx,domain,addrly,gate
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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 :: Communications :: Email
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.20.0

# addrly

Official Python SDK for the [Addrly](https://addrly.io) email validation API.

## Install

```bash
pip install addrly
```

## Quick Start

```python
from addrly import Addrly

client = Addrly("sk_your_api_key")

# Validate an email
result = client.validate_email("user@example.com")
print(result["mx"], result["disposable"], result["domain_age_in_days"])

# Validate a domain
domain = client.validate_domain("example.com")

# Auto-detect (email or domain)
auto = client.validate("test@gmail.com")
```

## Bulk Validation

```python
# Bulk email validation (Pro: 500, Ultra: 1000)
bulk = client.bulk_validate_emails([
    "user1@gmail.com",
    "user2@yahoo.com",
    "spam@tempmail.com",
])
print(bulk["summary"])  # {"total": 3, "valid": 2, ...}

# Bulk domain validation
domains = client.bulk_validate_domains(["gmail.com", "tempmail.com"])
```

## Gates

```python
# Evaluate an email against a gate
decision = client.gate("gate_abc123def456", email="user@tempmail.com")
print(decision["decision"]["action"])  # "block"
```

## Error Handling

```python
from addrly import Addrly, AddrlyError

try:
    result = client.validate_email("test@example.com")
except AddrlyError as e:
    print(e.status)    # 429
    print(e.error)     # "Rate limit exceeded"
    print(e.response)  # full API error response
```
