Metadata-Version: 2.4
Name: axonn-power
Version: 0.1.0
Summary: Python client for the Axonn energy market data API
Project-URL: Homepage, https://axonnpower.com
Project-URL: Documentation, https://axonnpower.com/docs
Project-URL: Repository, https://github.com/axonnpower/axonn-python
Author-email: Axonn <hello@axonnpower.com>
License-Expression: MIT
License-File: LICENSE
Keywords: api,axonn,energy,ferc,grid,iso,lmp,renewables
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Description-Content-Type: text/markdown

# Axonn

Python client for the Axonn energy market data API.

## Install

```bash
pip install axonn
```

## Quick Start

```python
import axonn

client = axonn.Client("ak_...")
prices = client.prices("ERCOT")
print(prices.data)
```

Or use the `AXONN_API_KEY` environment variable:

```python
import axonn

client = axonn.Client()  # reads AXONN_API_KEY
prices = client.prices("CAISO", zone="SP15")
```

The client also works as a context manager:

```python
with axonn.Client() as client:
    prices = client.prices("PJM")
```

## Features

- Real-time LMP prices from 7 US ISOs (ERCOT, PJM, CAISO, MISO, NYISO, SPP, ISO-NE)
- FERC filings search (932+ tracked)
- Interconnection queue (12K+ projects)
- Battery storage pipeline tracking
- Commodity prices (Henry Hub, WTI, TTF, EUA)
- EU market data (8 countries)
- Site analysis (solar, wind, risk, incentives)
- Structured data extraction from URLs/PDFs

## All Methods

### US Market Data

| Method | Description |
|---|---|
| `client.prices(iso, zone, market, start, end)` | Get LMP prices for a US ISO |
| `client.generation(iso, date, fuel_type)` | Get generation mix by fuel type |
| `client.load(iso, area, date)` | Get demand/load data |
| `client.filings(source, category, q, start, end, limit, offset)` | Search FERC filings |
| `client.filing_text(filing_id)` | Get full text of a filing |
| `client.queue(iso, fuel_type, status, min_mw, state, limit, offset)` | Search interconnection queue |
| `client.bess(iso, status, min_mw, state, limit, offset)` | Get battery storage pipeline |
| `client.grid(area_id, date)` | Get EIA grid monitor data |
| `client.commodities(symbol)` | Get commodity prices (all or single symbol) |

### Site Analysis

| Method | Description |
|---|---|
| `client.weather(country, date)` | Wind speed and solar radiation forecast |
| `client.carbon(region)` | Grid carbon intensity (US ISO or EU country) |
| `client.capacity_prices(iso)` | Capacity market clearing prices |
| `client.ancillary_services(iso, date)` | Ancillary service prices (regulation, reserves) |
| `client.disaster_risk(lat, lon)` | Multi-hazard disaster risk for a US location |
| `client.incentives(state)` | Federal and state renewable energy incentives |
| `client.retail_rates(state, sector)` | Retail electricity rates by state |
| `client.solar_wind(lat, lon)` | NREL solar irradiance and wind speed data |
| `client.hosting_capacity(utility, lat, lon)` | Distribution grid hosting capacity |
| `client.datacenter_load(region)` | Data center energy load by region |

### EU Market Data

| Method | Description |
|---|---|
| `client.eu_prices(country, date)` | European day-ahead prices |
| `client.eu_generation(country, date)` | European generation mix |
| `client.grid_capacity(country)` | EU transmission grid capacity |

### Extraction & Analysis

| Method | Description |
|---|---|
| `client.extract(url, schema, custom_fields, render_js)` | Extract structured data from any URL or PDF |
| `client.extract_schemas()` | List available extraction schemas |
| `client.compliance(state, category, q, limit, offset)` | Search state PUC compliance filings |
| `client.compliance_filing(filing_id)` | Get a single compliance filing with full data |
| `client.site_analysis(lat, lon, state)` | Composite site assessment (solar, wind, risk, incentives, carbon) |

## Error Handling

```python
from axonn.exceptions import AuthError, RateLimitError, NotFoundError, AxonnError

try:
    data = client.prices("ERCOT")
except AuthError:
    print("Invalid API key")
except RateLimitError:
    print("Slow down")
except NotFoundError:
    print("Resource not found")
except AxonnError as e:
    print(f"API error [{e.code}]: {e.message}")
```

## Links

- Docs: https://axonnpower.com/docs
- API Reference: https://api.axonnpower.com/docs
- Repository: https://github.com/axonnpower/axonn-python
