Metadata-Version: 2.4
Name: sybilion
Version: 0.1.4
Summary: Official Python SDK for the Sybilion API.
Author-email: Sybilion <support@sybilion.com>
License-Expression: Apache-2.0
Project-URL: Documentation, https://sybilion.dev/docs/
Keywords: sybilion,forecasting,drivers,api,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3>=2.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Dynamic: license-file

# Sybilion Python SDK

Official Python SDK for the [Sybilion API](https://sybilion.dev/docs/).

```bash
pip install sybilion
```

Requires Python 3.10+.

## Quick use

```python
from sybilion import Client

# Token read from SYBILION_API_TOKEN env var automatically
c = Client()
me = c.me()
print(me.user_id, me.available_eur_cents, me.api_usage_tier)
```

Or pass the token explicitly:

```python
c = Client(token="sk_ops_...")
```

The token is an API key (`sk_ops_...`) created in the Developers Portal, or a dashboard session token.


## What's in the box

**Account**
- `c.me()` — authenticated account info (balance, tier).

**Catalog**
- `c.list_categories()` / `c.list_regions()` — available thematic categories and geographic regions.

**Forecasts**
- `c.submit_forecast(request)` — submit an async forecast job.
- `c.get_forecast(id)` — poll status of a forecast job.
- `c.get_forecast_artifact(id, name)` — download a forecast artifact by name.
- `c.wait_forecast(job_id)` — polls until the job is settled or timeout is exceeded.

**Drivers**
- `c.get_drivers(request)` — drivers ranked by explanatory power (synchronous, billed).

**Alerts**
- `c.get_alerts(metadata, context_enriched, ...)` — anomaly alerts for a timeseries (synchronous, billed).

**Jobs & Usage**
- `c.list_jobs(...)` / `c.iter_jobs_pages(...)` — async job list with optional filters.
- `c.get_usage(...)` / `c.iter_usage_pages(...)` — credit/usage ledger.

**Escape hatch**
- `c._api` — the OpenAPI-generated `DefaultApi` for any endpoint not yet wrapped.
- Typed exceptions (`sybilion.ApiException` and per-status subclasses).

## Documentation

Full guides, feature walkthroughs, API reference, and SDK patterns: **<https://sybilion.dev/docs/>**.

## Support

- Email — [support@sybilion.com](mailto:support@sybilion.com)
- Slack — [Sybilion Community](https://join.slack.com/t/sybilioncommunity/shared_invite/zt-3y6vx56nk-WJu35eLxkyFQr~Yfko6RjQ)
- Discord — [Sybilion Developers Community](https://discord.gg/KMDyXBdQ8c)

## License

[Apache 2.0](LICENSE).
