Metadata-Version: 2.4
Name: piedpiper-sdk
Version: 0.1.0
Summary: Python SDK for Pied Piper multimodal compression
Author: Pied Piper
License: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1.0,>=0.27
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"

# Pied Piper Python SDK

Pied Piper is a lightweight Python SDK for the Pied Piper multimodal compression service.

## Install

```bash
python -m pip install -e app/packaging
```

## Configure

Set your API key:

```bash
export PIED_PIPER_API_KEY="your-shared-api-key"
```

The SDK defaults to the production Pied Piper service URL. `PIED_PIPER_BASE_URL` is only needed if you want to override that for local development or a non-production deployment.

## Quickstart

```python
import pied_piper

result = pied_piper.compress("Long inline text to compress", fidelity=0.33)
print(result.status)
print(result.text)
```

## Mixed inputs

```python
from pathlib import Path

from pied_piper import Client

client = Client()
result = client.compress(
    [
        "inline text",
        Path("paper.pdf"),
        Path("diagram.png"),
        Path("demo.mp4"),
    ],
    fidelity=0.55,
)
```

Current behavior:

- text is extracted and compressed remotely
- images are accepted as passthrough items
- video inputs return an inline MP4 artifact on `item.output_file`

```python
video_item = next(item for item in result.items if item.modality == "video")
video_bytes = video_item.output_file.as_bytes()
```
