Metadata-Version: 2.1
Name: squishy-wsi
Version: 0.1.0
Summary: Client SDK for WSI embedding backend
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"

# WSI Embed Client SDK

Pip-installable frontend/client package for sending a local slide to the backend and saving embedding results on the user's machine.

## 1) Install

```bash
cd frontend
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

Install from built wheel (recommended for remote client machines):

```bash
pip install squishy_wsi-0.1.0-py3-none-any.whl
```

## 2) Usage

### Python API

```python
from wsi_embed_client import embed

result = embed(
    slide_path="/path/to/slide.svs",
    model="uni-v1",
    key="team-key-123",
    server_url="http://your-gpu-server:8000",
)

print(result["embedding_id"])
print(result["saved_path"])
```

### CLI

After install, use:

```bash
wsi-embed /path/to/slide.svs \
  --model uni-v1 \
  --key team-key-123 \
  --server-url http://your-gpu-server:8000
```

Optional flags:
- `--output-dir /path/to/save`
- `--timeout-seconds 600`
- `--print-json`

## What `embed(...)` does

1. Zips the slide file locally.
2. Sends the zip to the backend with `X-API-Key`.
3. Receives embedding + metadata.
4. Saves a rich JSON object to `./embeddings/` by default.

Saved filename format:
- `<slide>__<model>__<timestamp>__<shortid>.embedding.json`

## 3) Test

```bash
pytest -q
```
