Metadata-Version: 2.4
Name: apple-device-specs
Version: 1.0.0
Summary: Python client for the Apple Device Specs API by LorisLabs
Author-email: LorisLabs <support@lorislab.fr>
License: MIT
Project-URL: Homepage, https://api.lorislab.fr/docs/
Project-URL: Documentation, https://api.lorislab.fr/docs/
Keywords: apple,iphone,ipad,mac,specs,api,device
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25.0

# apple-device-specs

Python client for the [Apple Device Specs API](https://api.lorislab.fr/docs/) by LorisLabs — detailed specs, feature badges, pricing, and depreciation estimates for every Apple device.

## Install

```bash
pip install apple-device-specs
```

## Quick start

```python
from apple_device_specs import AppleDeviceAPI

# Initialize with your API key (omit for free-tier access)
client = AppleDeviceAPI(api_key="your_api_key_here")

# Look up a device by hardware identifier
device = client.get_device("iPhone16,1")
print(device["name"])          # iPhone 15 Pro
print(device["chip"])          # A17 Pro
print(device["released"])      # 2023-09-22

# Search by name
results = client.search("MacBook Pro 14")
for d in results["devices"]:
    print(d["identifier"], d["name"])

# List all iPhones (paginated)
page = client.list_devices(category="iPhone", page=1, limit=20)

# Get feature badges for a device
features = client.get_features("iPhone16,1")
print(features["features"])    # ["USB-C", "MagSafe", "Face ID", "5G", ...]

# Get current depreciation estimate
value = client.get_value("iPhone16,1")
print(value["estimatedValue"])

# Get pricing across storefronts
pricing = client.get_pricing("iPhone16,1", storefront=["US", "GB", "FR"])

# API stats
stats = client.get_stats()
print(stats["deviceCount"])

# Use as a context manager — connection closes automatically
with AppleDeviceAPI(api_key="your_api_key_here") as api:
    mac = api.get_device("Mac14,5")
    print(mac["name"])
```

## Pricing

| Tier     | Price      | Rate limit        |
|----------|------------|-------------------|
| Free     | $0         | 100 req/day       |
| Pro      | $9.99/mo   | 10,000 req/day    |
| Business | $49.99/mo  | 100,000 req/day   |

Get an API key at [api.lorislab.fr/docs/#pricing](https://api.lorislab.fr/docs/#pricing).

## Docs

Full API reference: [api.lorislab.fr/docs/](https://api.lorislab.fr/docs/)

## License

MIT
