Metadata-Version: 2.4
Name: snowsure
Version: 0.1.0
Summary: Python SDK and CLI for SnowSure - live ski & snow data: conditions, multi-model forecasts, powder rankings, and a grounded snow Answer Engine across 500+ resorts.
Project-URL: Homepage, https://www.snowsure.ai
Project-URL: Documentation, https://www.snowsure.ai/llms.txt
Project-URL: API Reference, https://www.snowsure.ai/openapi.json
Project-URL: Repository, https://github.com/mikeslone/snowsure-mcp
Project-URL: Issues, https://github.com/mikeslone/snowsure-mcp/issues
Author-email: SnowSure <me@mikeslone.com>
License-Expression: MIT
Keywords: forecast,mcp,powder,resorts,ski,snow,snowboard,snowsure,weather
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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 :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Description-Content-Type: text/markdown

# snowsure

Python SDK and CLI for [SnowSure](https://www.snowsure.ai) — live ski & snow data: current conditions, 14-day multi-model forecasts, powder rankings, and a grounded natural-language snow Answer Engine across 500+ resorts worldwide. No API key required.

```bash
pip install snowsure
```

## SDK

```python
from snowsure import SnowSureClient

client = SnowSureClient()

# Global snow rankings (SnowSure score, fresh snow, depth, 14-day forecast)
report = client.get_snow_report(sort="recent", region="europe", limit=10)
for resort in report["resorts"]:
    print(resort["name"], resort["snowSure"]["score"], resort["conditions"]["snowfall24hCm"])

# List / filter resorts
resorts = client.get_resorts(country="Switzerland", sort="score", limit=20)

# One resort in full detail (slugs are lowercase-hyphenated)
zermatt = client.get_resort("matterhorn-ski-paradise")

# Grounded natural-language Q&A
answer = client.ask("where is the best powder in the alps right now?")
print(answer["answer"])
```

All SnowSure API responses use a `{"meta": ..., "data": ...}` envelope; client methods return the unwrapped `data` payload. The most recent `meta` block (source, timestamp) is available on `client.last_meta`. Errors raise `snowsure.SnowSureError`.

`ask()` uses the public keyless tier (`partnerId: "chatgpt"`). Partners with a SnowSure API key can pass `SnowSureClient(api_key="...", partner_id="your-partner-id")`.

## CLI

The package installs a `snowsure` command:

```bash
snowsure report                         # global snow rankings
snowsure report --sort recent --region europe --limit 10
snowsure resort matterhorn-ski-paradise # live conditions for one resort
snowsure ask "how much snow fell at Niseko this week?"
```

Add `--json` to any command for the raw JSON payload.

## Related

- MCP server (39 tools, streamable HTTP, no auth): `https://www.snowsure.ai/mcp`
- OpenAPI spec: https://www.snowsure.ai/openapi.json
- LLM guide: https://www.snowsure.ai/llms.txt
- Repo: https://github.com/mikeslone/snowsure-mcp

## License

MIT
