Metadata-Version: 2.4
Name: tukiwatch-core
Version: 0.1.0
Summary: Canonical shared domain core for StreamWatch, rebranded as tukiwatch-core. Provides streamlink session pool, resolution, and metadata extraction.
Author-email: Snowballons <snowballons@protonmail.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlink>=8.5.0
Requires-Dist: pydantic>=2.10.0
Provides-Extra: dev
Requires-Dist: pytest>=9.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=1.0.0; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: ruff>=0.16.0; extra == "dev"
Requires-Dist: mypy>=1.15.0; extra == "dev"
Dynamic: license-file

# streamwatch-core

Shared stream-watching domain core for the StreamWatch ecosystem. This package is the **canonical** source for logic shared between the backend and the CLI:

- **Session pool** — reusable pre-configured `Streamlink` sessions
- **Stream resolution** — resolve a URL to online/offline status + stream details
- **Error taxonomy** — platform error classification (no plugin / no streams / browser required / plugin error)
- **Metadata extraction** — platform detection, category/keyword extraction, viewer counts, thumbnails, stream types

## Consumers

| Consumer | Relationship |
|----------|--------------|
| `streamwatch-api` (backend) | imports this package directly |
| `streamwatch-cli` | vendors a **copy** (dev-only `tools/sync-to-cli.sh` script + parity tests); core wins on conflicts |

The CLI must never depend on this package at runtime — some users only use the CLI, and a backend/shared dependency is impractical for them. This package exists to help the maintainer keep both projects consistent.

## Development

```bash
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest
```

## License

MIT
