Python SDK for Pied Piper multimodal compression
Project description
Pied Piper Python SDK
Pied Piper is a lightweight Python SDK for the Pied Piper multimodal compression service.
Install
python -m pip install -e app/packaging
Configure
Set your API key:
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
import pied_piper
result = pied_piper.compress("Long inline text to compress", fidelity=0.33)
print(result.status)
print(result.text)
Mixed inputs
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
video_item = next(item for item in result.items if item.modality == "video")
video_bytes = video_item.output_file.as_bytes()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file piedpiper_sdk-0.1.0.tar.gz.
File metadata
- Download URL: piedpiper_sdk-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f777c155725eb170129ad8f18ba6c69c287ab92887e325b179cb0b5c13d59d8
|
|
| MD5 |
d58558fbe6d38c0afca5b48aa0cf398b
|
|
| BLAKE2b-256 |
25a5d6d7ac85181eda3cf825a2f22cd7d8bb8285d93d79aa50f8c34f63afa725
|
File details
Details for the file piedpiper_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: piedpiper_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de97fade6f71b50a307865f2bfc811abf52fcdadce8572d26d5f101243980f1f
|
|
| MD5 |
5fe4c25b351b7876b6960d38145bbc24
|
|
| BLAKE2b-256 |
9d7e6562850179adfedda36a89a05a931ad4ad828c16e9acff237f521d703958
|