Metadata-Version: 2.4
Name: aistemsplitter
Version: 0.1.0
Summary: Official Python SDK for the AIStemSplitter public API.
Project-URL: Homepage, https://aistemsplitter.org
Project-URL: Documentation, https://aistemsplitter.org/developers/api
Project-URL: Source, https://github.com/aistemsplitter/aistemsplitter-python
Project-URL: Issues, https://github.com/aistemsplitter/aistemsplitter-python/issues
Author-email: AIStemSplitter <support@aistemsplitter.org>
License-Expression: MIT
License-File: LICENSE
Keywords: aistemsplitter,audio,sdk,stem-separation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# AIStemSplitter Python SDK

Official Python SDK for the AIStemSplitter public API.

- Homepage: https://aistemsplitter.org
- API docs: https://aistemsplitter.org/developers/api
- API base: `https://api.aistemsplitter.org/v1`
- OpenAPI: https://api.aistemsplitter.org/openapi.yaml

## Installation

The package source is prepared for conda-forge review. After publication:

```sh
conda install -c conda-forge aistemsplitter
```

## Usage

```python
import os
from aistemsplitter import AIStemSplitter

client = AIStemSplitter(os.environ["AISTEMSPLITTER_API_KEY"])

split = client.create_split({
    "input": {
        "type": "direct_url",
        "url": "https://example.com/song.mp3",
    },
    "stemModel": "6s",
})

print(split["id"])
```

## Uploading local audio

```python
with open("song.mp3", "rb") as handle:
    upload = client.upload_audio(
        handle.read(),
        filename="song.mp3",
        content_type="audio/mpeg",
    )

split = client.create_split({"input": upload["input"], "stemModel": "6s"})
result = client.wait_for_split(split["id"])
```

## Development

```sh
PYTHONPATH=src python -m unittest discover -s tests
```

The conda-forge recipe skeleton lives in
`conda-forge/staged-recipes/recipes/aistemsplitter`.
