Python SDK
Coming Soon – Python SDK is currently in development.
Overview
Official Python SDK for the Canvelete API.
Planned Features
- Type hints – Full type safety with mypy
- Async support – asyncio-compatible client
- Pydantic models – Request/response validation
- Retry logic – Automatic retries with exponential backoff
- Session management – Connection pooling
- Context managers – Resource cleanup
Expected Installation
pip install canveleteExpected Usage
from canvelete import Canvelete
client = Canvelete(api_key="cvt_YOUR_API_KEY")
# Render image
result = client.render(
design_id="abc123",
format="png",
quality=90,
dynamic_elements={
"title": {"text": "Hello World"},
"image": {"src": "https://example.com/image.jpg"}
}
)
print(f"Image URL: {result.image_url}")
print(f"Render time: {result.render_time}ms")Async Example
import asyncio
from canvelete import AsyncCanvelete
async def main():
client = AsyncCanvelete(api_key="cvt_YOUR_API_KEY")
result = await client.render(
design_id="abc123",
format="png"
)
print(result.image_url)
asyncio.run(main())Get Notified
Want to be notified when the Python SDK is released?
Join our mailing list (opens in a new tab) or star the repo (opens in a new tab).
Alternative
Use the REST API with requests library:
import requests
response = requests.post(
"https://api.canvelete.com/api/v1/render",
headers={"Authorization": "Bearer cvt_YOUR_API_KEY"},
json={"designId": "abc123", "format": "png"}
)
data = response.json()
print(data["data"]["imageUrl"])