Metadata-Version: 2.4
Name: sails-sdk
Version: 1.0.1
Summary: Python client for the Sails Developer API
Author: Sails AI
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Software Development :: Libraries
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Sails Python SDK

Python client for the Sails Developer API.

## Install

```bash
pip install sails-sdk
```

## Usage

```python
from sails_sdk import SailsClient

client = SailsClient(api_key="sails_sk_...")

response = client.predict(
    image_url="https://example.com/shoe.jpg",
    description="Black Nike Air Max 90 on a white background",
    limit=10,
)

print(response["price_lower"], response["price_upper"])
```

## Product appraisal

```python
response = client.appraise_product(
    image_url="https://example.com/shoe.jpg",
    description="Black Nike Air Max 90 on a white background",
    country="US",
    lens_mode="high",
    max_items=20,
)

print(response["appraisal"]["price_lower"], response["appraisal"]["price_upper"])
```

By default the client targets `https://sails.live/api/v1`. Override it if needed:

```python
client = SailsClient(
    api_key="sails_sk_...",
    base_url="https://sails.live/api/v1",
)
```
