Official Python SDK for Lavendly - generate AI video with one API call.
Project description
lavendly
Official Python SDK for Lavendly.
pip install lavendly
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;
LavendlyandAsyncLavendly. - 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_skillreturns the markdown body ofstoryteller,multi-clip,cost-aware.
Async
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
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
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
lavendly-0.0.1.tar.gz
(3.3 kB
view details)
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 lavendly-0.0.1.tar.gz.
File metadata
- Download URL: lavendly-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2063735f1814a768b57937fd59c3b2b377fbe5174b895437c5f168ec03d8ea52
|
|
| MD5 |
970a79e2273cdc62a4f34bfa75612974
|
|
| BLAKE2b-256 |
7bc9a945946520022a020f4e92a6bc062bd7f42e95af8aebfc7546fd269a2026
|
File details
Details for the file lavendly-0.0.1-py3-none-any.whl.
File metadata
- Download URL: lavendly-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
679c82244e4f64826bc0127b7e48ca81e3378ef7e110b704f20ebfc2644a2dd6
|
|
| MD5 |
1fa4cf8d6d8bd746fa611e6dda9f74cc
|
|
| BLAKE2b-256 |
e6fdf6c774dbe3ebefe6cdee8a399bbb13c70b7d68f08cdd41cd843dd65edd79
|