Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
.env
.DS_Store

# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
.Python
build/
dist/
*.egg-info/
env/
venv/
.venv/
.pytest_cache/
.coverage

# TypeScript / Node
node_modules/
dist/
*.tsbuildinfo
package-lock.json
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ A curated collection of production-ready workflow examples demonstrating various

## Overview

These examples demonstrate how to build robust, scalable workflows using Render's Python SDK. All examples follow best practices for production deployments and include comprehensive documentation.
These examples demonstrate how to build robust, scalable workflows using Render's SDK. Each example is available in both **Python** and **TypeScript**, with implementations side by side in `python/` and `typescript/` subdirectories. All examples follow best practices for production deployments and include comprehensive documentation.

**Important Notes:**
- **Python-only**: Render Workflows are currently only supported in Python via `render-sdk`
- **Service Type**: All workflow services must be deployed as Workflow services on Render
**Service type**: All workflow services must be deployed as Workflow services on Render.

## Examples

Expand Down
88 changes: 41 additions & 47 deletions data-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,67 +45,63 @@ run_data_pipeline (orchestrator)
└── aggregate_insights
```

## Local Development
## Local development

### Prerequisites
- Python 3.10+

### Setup and Run
- Python 3.10+ (for the Python version)
- Node.js 18+ (for the TypeScript version)

```bash
# Navigate to example directory
cd data-pipeline
### Python

# Install dependencies
```bash
cd data-pipeline/python
pip install -r requirements.txt

# Run the workflow service
python main.py
```

## Deploying to Render

### Service Configuration

**Service Type**: Workflow
### TypeScript

**Build Command**:
```bash
cd data-pipeline && pip install -r requirements.txt
cd data-pipeline/typescript
npm install
npm run dev
```

**Start Command**:
```bash
cd data-pipeline && python main.py
```
## Deploying to Render

### Service configuration

**Service type**: Workflow

### Environment Variables
**Python:**

Required:
- `RENDER_API_KEY` - Your Render API key (from Render dashboard)
| Setting | Value |
|---|---|
| Build command | `cd data-pipeline/python && pip install -r requirements.txt` |
| Start command | `cd data-pipeline/python && python main.py` |

Optional (if using real APIs):
- Any API keys for external services you integrate
**TypeScript:**

### Deployment Steps
| Setting | Value |
|---|---|
| Build command | `cd data-pipeline/typescript && npm install && npm run build` |
| Start command | `cd data-pipeline/typescript && npm start` |

1. **Create Workflow Service**
- Go to Render Dashboard
- Click "New +" → "Workflow"
- Connect your repository
- Name: `data-pipeline-workflows`
### Environment variables

2. **Configure Build Settings**
- Build Command: `cd data-pipeline && pip install -r requirements.txt`
- Start Command: `cd data-pipeline && python main.py`
| Variable | Description |
|---|---|
| `RENDER_API_KEY` | Your Render API key (from Render Dashboard) |

3. **Set Environment Variables**
- Add `RENDER_API_KEY` in the Environment section
- Get API key from: Render Dashboard → Account Settings → API Keys
### Deployment steps

4. **Deploy**
- Click "Create Workflow"
- Render will build and start your workflow service
1. Go to Render Dashboard.
1. Click **New +** > **Workflow**.
1. Connect your repository.
1. Set the build and start commands for your chosen language.
1. Add `RENDER_API_KEY` in the Environment section.
1. Click **Create Workflow**.

## Testing in Render Dashboard

Expand Down Expand Up @@ -373,11 +369,9 @@ async def send_pipeline_notification(result: dict) -> dict:
4. **Timeout Settings**: HTTP client configured with 30s timeout
5. **Error Isolation**: One source failure doesn't block others

## Important Notes
## Important notes

- **Python-only**: Workflows are only supported in Python via render-sdk
- **No Blueprint Support**: Workflows don't support render.yaml blueprint configuration
- **Mock Data**: Example uses simulated data; replace with real API calls in production
- **Idempotency**: Design pipeline to be safely re-runnable
- **Monitoring**: Add logging and metrics for production deployments
- **Cost**: Consider API rate limits and costs for external services
- **Mock data**: This example uses simulated data. Replace with real API calls in production.
- **Idempotency**: Design pipeline to be safely re-runnable.
- **Monitoring**: Add logging and metrics for production deployments.
- **Cost**: Consider API rate limits and costs for external services.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions data-pipeline/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "data-pipeline-workflow",
"version": "1.0.0",
"description": "Data Pipeline - Multi-source customer analytics with Render Workflows (TypeScript)",
"type": "module",
"scripts": {
"build": "tsc",
"start": "node dist/main.js",
"dev": "tsx src/main.ts"
},
"dependencies": {
"@renderinc/sdk": "latest",
"dotenv": "^16.4.7"
},
"devDependencies": {
"tsx": "^4.19.0",
"typescript": "^5.7.0"
}
}
Loading