Metadata-Version: 2.4
Name: origifix-apis
Version: 0.1.0
Summary: Python client for the Origifix data APIs (CPSC recalls, GDACS disaster alerts) on RapidAPI
Author: Levent Akyol
License: MIT
Project-URL: Homepage, https://origifix.com
Project-URL: Documentation, https://api.origifix.com/docs
Project-URL: Repository, https://github.com/leventakyol/origifix-apis
Keywords: cpsc,recall,gdacs,disaster,api,rapidapi,open-data
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25
Dynamic: license-file

# origifix-apis

Python client for the [Origifix](https://origifix.com) data APIs, published on [RapidAPI](https://rapidapi.com/).

```bash
pip install origifix-apis
```

You need a RapidAPI key: subscribe to a product (free tier available) on its RapidAPI listing page, then copy your key from the "X-RapidAPI-Key" field on the Endpoints/test page.

## CPSC Product Recall Lookup

```python
from origifix import CPSCClient

client = CPSCClient(api_key="YOUR_RAPIDAPI_KEY")
result = client.get_recalls(recall_date_start="2026-01-01", limit=20)
print(result["count"], "recalls")
for r in result["recalls"]:
    print(r["record_date"], r["product_description"])
```

## GDACS Global Disaster Alerts

```python
from origifix import GDACSClient

client = GDACSClient(api_key="YOUR_RAPIDAPI_KEY")
result = client.get_events(event_types="EQ", alert_level="Orange,Red")
print(result["count"], "active events")
```

## Error handling

All network/HTTP errors raise `origifix.OrigifixAPIError`:

```python
from origifix import CPSCClient, OrigifixAPIError

client = CPSCClient(api_key="YOUR_RAPIDAPI_KEY")
try:
    client.get_recalls()
except OrigifixAPIError as e:
    print("Request failed:", e, "status:", e.status_code)
```

## More products

NASA FIRMS, SEC EDGAR, and OSHA clients are coming soon as they're published on RapidAPI. See [api.origifix.com/docs](https://api.origifix.com/docs) for the full live API reference.

## License

MIT
