# therminal-py

Python SDK for Therminal — Kalshi temperature prediction markets + NWS weather data.
Wraps the REST API at `https://api.mostlyright.xyz`.

## Stack
- Python 3.10+, httpx (HTTP client)
- Optional: pandas + pyarrow (DataFrame support), typer + rich (CLI)

## Project Layout
```
src/therminal/
  __init__.py       # Public API exports
  client.py         # TherminalClient — all endpoint methods
  exceptions.py     # Error hierarchy (NotFoundError, RateLimitError, etc.)
  cli.py            # Optional CLI (typer)
  _version.py       # Version string
tests/
  test_client.py    # Full client test suite (pytest-httpx mocks)
  conftest.py       # Shared fixtures
```

## Commands
```bash
source .venv/bin/activate
pytest tests/ -v                     # Run tests
pytest tests/ --cov=therminal        # With coverage
ruff check src/ tests/               # Lint
python -m build                      # Build package
python -m therminal.cli health       # CLI
```

## Coding Rules
- All methods return `list[dict]` by default, DataFrame with `as_dataframe=True`
- Never mutate input parameters
- All HTTP errors mapped to specific exceptions
- Date params accept both YYYY-MM-DD and RFC3339 (auto-normalized)
- Pandas is optional — ImportError with helpful message if missing
