Metadata-Version: 2.4
Name: nephyr-weather
Version: 0.1.0
Summary: Weather signal intelligence for prediction markets — GFS ensemble forecasts vs market prices
Author-email: CLM Studios <citlali.lopmonster.studios@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/clm-studios/nephyr-weather
Project-URL: Repository, https://github.com/clm-studios/nephyr-weather
Project-URL: Issues, https://github.com/clm-studios/nephyr-weather/issues
Keywords: prediction-markets,weather,gfs,ensemble,polymarket,kalshi,trading,open-meteo,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
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 :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == "mcp"
Provides-Extra: api
Requires-Dist: fastapi>=0.110; extra == "api"
Requires-Dist: uvicorn[standard]>=0.29; extra == "api"
Requires-Dist: pydantic>=2.0; extra == "api"
Requires-Dist: slowapi>=0.1.9; extra == "api"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Provides-Extra: all
Requires-Dist: mcp>=1.0; extra == "all"
Requires-Dist: fastapi>=0.110; extra == "all"
Requires-Dist: uvicorn[standard]>=0.29; extra == "all"
Requires-Dist: pydantic>=2.0; extra == "all"
Requires-Dist: slowapi>=0.1.9; extra == "all"
Dynamic: license-file

# Nephyr Weather

Weather signal intelligence for prediction markets.

Fetches 31-member GFS ensemble forecasts from Open-Meteo and compares model probabilities against live market prices on Polymarket and Kalshi to detect tradeable edges.

## Install

```bash
pip install nephyr-weather          # core + httpx
pip install "nephyr-weather[mcp]"   # + MCP server
pip install "nephyr-weather[api]"   # + FastAPI REST server
pip install "nephyr-weather[all]"   # everything
```

## Quick start

```python
import asyncio
from nephyr_weather import OpenMeteoClient, signal_from_forecast, MarketInfo, detect_edge

async def main():
    # 1. Fetch GFS ensemble forecast
    async with OpenMeteoClient() as client:
        forecast = await client.fetch_ensemble("NYC", "2026-03-29")

    # 2. Generate probability signal
    signal = signal_from_forecast(forecast, threshold_f=75.0, direction="above")
    print(f"Model P(NYC high > 75°F): {signal.model_probability:.1%}")

    # 3. Compare to market price
    market = MarketInfo(
        platform="kalshi",
        ticker="KXHIGHNY-26MAR29-T75",
        city="NYC",
        threshold_f=75.0,
        direction="above",
        market_price=0.55,
    )
    result = detect_edge(signal, market)
    print(f"Edge: {result.edge:+.1%}, EV: {result.ev:.4f}, Tradeable: {result.is_tradeable}")

asyncio.run(main())
```

## Supported cities

NYC, Chicago, Miami, Austin, LA, Denver, Boston, London, Seoul, Shanghai, Hong Kong, Atlanta

## Modules

| Module | Purpose |
|---|---|
| `cities` | City coordinates + name normalisation |
| `ensemble` | Open-Meteo GFS client, temperature utils |
| `signals` | Probability calculations from ensemble arrays |
| `markets` | Polymarket + Kalshi weather market discovery |
| `edge` | Edge detection, EV calculation |
| `types` | Public dataclasses |

## MCP server

```bash
nephyr-weather-mcp
```

Tools: `get_weather_signals`, `get_ensemble_forecast`, `detect_edges`, `list_active_markets`, `get_city_info`

## REST API

```bash
uvicorn api.app:app --reload
```

Endpoints: `POST /v1/signals`, `POST /v1/forecast`, `POST /v1/edges`, `GET /v1/markets`, `GET /v1/cities`, `GET /v1/health`

## Pricing

| Tier | Details |
|------|---------|
| **Free** | 10 signals/day (one city) |
| **Paid** | $49/month — all 12 cities, unlimited calls |
| **Enterprise** | $499/month — custom cities, SLA, dedicated support |
| **Agent-to-agent** | $0.01/signal |

## License

MIT — CLM Studios
