Python SDK for Render Workflows
Project description
Render Workflows Python SDK
A Python SDK for defining and executing tasks in the Render Workflows system.
⚠️ Early Access: This SDK is in early access and subject to breaking changes without notice.
Installation
pip install render_sdk
Usage
Defining Tasks
Use the Workflows class to define and register tasks:
from render_sdk import Workflows
app = Workflows()
@app.task
def square(a: int) -> int:
"""Square a number."""
return a * a
@app.task
async def add_squares(a: int, b: int) -> int:
"""Add the squares of two numbers."""
# Execute subtasks
result1 = await square(a)
logger.info(f"Square result: {result1}")
result2 = await square(b)
logger.info(f"Square result: {result2}")
return result1 + result2
You can also specify task parameters like timeout and plan:
@app.task(timeout=60, plan="starter")
def quick_task(x: int) -> int:
return x + 1
Running the Task Server
Run your workflow application using the CLI command:
render ea tasks dev -- python main.py
Features
- Decorator-based task registration
- Type-safe task execution
- Retry configuration support
- Environment-based configuration
- Generated client for SDK server communication
Development
This project uses Poetry for dependency management and tox for testing across multiple Python versions.
Setup
# Install Poetry (if not already installed)
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
# Activate virtual environment
poetry shell
Testing
# Run tests
poetry run pytest
# Run tests with coverage
poetry run tox -e coverage
# Run tests across all Python versions
poetry run tox
# Run specific Python version
poetry run tox -e py313
Code Quality
# Check formatting and linting
poetry run tox -e format
poetry run tox -e lint
# Fix formatting issues
poetry run tox -e format-fix
poetry run tox -e lint-fix
# Run all quality checks
poetry run tox -e format,lint
Supported Python Versions
- Python 3.10+
- Tested on Python 3.10, 3.11, 3.12, 3.13, 3.14
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 render_sdk-0.3.0.tar.gz.
File metadata
- Download URL: render_sdk-0.3.0.tar.gz
- Upload date:
- Size: 204.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19dce587d7dd87906b246df69228f79b90d600174905453becd63e0bb9e45762
|
|
| MD5 |
f3c9f8f16bbf9cf979c8f5a1d550a068
|
|
| BLAKE2b-256 |
2ed43cdf19bf0ffdc2accbfee46c36f01555b83f8df0292929c34b5cf5c13e48
|
File details
Details for the file render_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: render_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 682.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
660def7294150a9d36880b53b41f04927cf8a7bcda53be671d4bbd9b92e2cace
|
|
| MD5 |
89256ae4e4c3070330e77744ffb6ad3a
|
|
| BLAKE2b-256 |
1b06a0110d87b10e65403faa47293fe56b60f8dc941d9d187528fdf8d8e7ea1d
|