Metadata-Version: 2.4
Name: lavendly
Version: 0.0.1
Summary: Official Python SDK for Lavendly - generate AI video with one API call.
Author: Lavendly
License: MIT
Project-URL: Homepage, https://docs.lavendly.ai/sdks/python
Project-URL: Repository, https://github.com/barlou83/lavendly
Project-URL: Documentation, https://docs.lavendly.ai
Keywords: lavendly,ai-video,sdk
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24

# lavendly

Official Python SDK for Lavendly.

```bash
pip install lavendly
```

```python
from lavendly import Lavendly

vs = Lavendly(api_key="lv_...")

wf = vs.workflows.create(
    name="Fox in a bookshop",
    shots=[{"prompt": "a sleepy fox in a bookshop", "duration": 5}],
)

video = vs.renders.run(wf["id"])
print(video.url)
```

## Highlights

- **Sync + async.** Same surface; `Lavendly` and `AsyncLavendly`.
- **Idempotent by default.** Every mutating method accepts `idempotency_key`.
- **One-call renders.** `vs.renders.run()` creates + polls to completion.
- **Tool-use dispatcher.** `vs.call(operation, args)` for the Anthropic SDK tool_use pattern.
- **Bundled skills.** `from lavendly.skills import load_skill` returns the markdown body of `storyteller`, `multi-clip`, `cost-aware`.

## Async

```python
import asyncio
from lavendly import AsyncLavendly

async def main():
    async with AsyncLavendly(api_key="...") as lavendly:
        wf = await vs.workflows.create(name="x", shots=[...])
        return await vs.renders.run(wf["id"])

result = asyncio.run(main())
```

## Errors

```python
from lavendly import LavendlyError
try:
    vs.workflows.create(name="...", shots=[...])
except LavendlyError as e:
    print(e.code, e.status, e.details)
```

## Full docs

<https://docs.lavendly.ai/sdks/python>

## License

MIT
