Metadata-Version: 2.5
Name: hydopt-client
Version: 0.0.3
Summary: Python client for the HydOpt hydropower optimization API
Requires-Python: >=3.13
Requires-Dist: google-auth-oauthlib>=1.4.0
Requires-Dist: google-auth>=2.56.3
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.13.4
Requires-Dist: requests>=2.34.2
Description-Content-Type: text/markdown

# hydopt-client

Python client for the [HydOpt](https://hydopt.io) hydropower optimization API.

## Install

```bash
uv add hydopt-client
```

## Authentication

Authenticate with Google Cloud:

```bash
gcloud auth application-default login
```

## Quick Start

```python
from hydopt_client.client import Client

client = Client()

# List available partition dates
dates = client.list_partitions()
print(dates)  # ["2026-01-01", "2026-01-02", ...]

# Fetch a time series
records = client.series(dates[0], "production")
for record in records:
    print(record.name, record.x[0], record.y[0])

# Filter and group results
from hydopt_client.client import Filters, GroupBy

filtered = client.series(
    dates[0],
    "production",
    filters=Filters(country=["norway"]),
    group_by=[GroupBy.region],
)
```

## Available Methods

| Method | Description |
|--------|-------------|
| `list_partitions()` | List available partition dates |
| `series(asof, category1, ...)` | Query time-series data |
| `diff(category1, from, to, ...)` | Compare two partitions |
| `static(category1, ...)` | Query static dataset |
| `realized(category1, ...)` | Query realized dataset |
| `catchments(asof)` | Fetch catchment geometries |
| `orders(asof)` | Fetch energy orders |
| `object_report(source, target)` | Compare two partition objects |
