Skip to main content

Client SDK for WSI embedding backend

Project description

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

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

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

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

2) Usage

Python API

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:

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

pytest -q

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

squishy_wsi-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

squishy_wsi-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file squishy_wsi-0.1.0.tar.gz.

File metadata

  • Download URL: squishy_wsi-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.3

File hashes

Hashes for squishy_wsi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f829050e69168b46468b7b1984e50a97a95ed7c4248e85e7edb4c7c178f610bb
MD5 a158dfb282fad3d1206c5be4277f6c46
BLAKE2b-256 73430169c0142dd80c69d8d3bf6e4863fceea11a227d97f9299c6a7ca2538767

See more details on using hashes here.

File details

Details for the file squishy_wsi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: squishy_wsi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.3

File hashes

Hashes for squishy_wsi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a480683ecc1b65c199bbc163289df573ecb003ad6f7b7675a7cc39d66c6b05f
MD5 98e04c956133f02ddbcccec5da8353dd
BLAKE2b-256 78bf5d4233d1f08b8df36708cfad34a32187946b29bc8d1c2df4bd99969d79ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page