Skip to content

Commit 6b872f6

Browse files
committed
feat: add python SDK examples and CLI tool for managing them
1 parent 09f2eb4 commit 6b872f6

36 files changed

+1284
-279
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ dist/
2929
.kiro/
3030
.idea
3131
.env
32+
33+
examples/build/*
34+
examples/*.zip

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,47 @@ Mimic the package structure in the src/aws_durable_execution_sdk_python director
121121
Name your module so that src/mypackage/mymodule.py has a dedicated unit test file
122122
tests/mypackage/mymodule_test.py
123123

124+
## Examples and Deployment
125+
126+
The project includes a unified CLI tool for managing examples, deployment, and AWS account setup:
127+
128+
### Bootstrap AWS Account
129+
```bash
130+
# Set up IAM role and KMS key for durable functions
131+
export AWS_ACCOUNT_ID=your-account-id
132+
hatch run examples:bootstrap
133+
```
134+
135+
### Build and Deploy Examples
136+
```bash
137+
# Build all examples with dependencies
138+
hatch run examples:build
139+
140+
# Generate SAM template for all examples
141+
hatch run examples:generate-sam
142+
143+
# List available examples
144+
hatch run examples:list
145+
146+
# Deploy specific example (when durable functions are available)
147+
hatch run examples:deploy "Hello World"
148+
```
149+
150+
### Other CLI Commands
151+
```bash
152+
# Invoke deployed function
153+
hatch run examples:invoke function-name --payload '{}'
154+
155+
# Get execution details
156+
hatch run examples:get execution-arn
157+
158+
# Get execution history
159+
hatch run examples:history execution-arn
160+
161+
# Clean build artifacts
162+
hatch run examples:clean
163+
```
164+
124165
## Coverage
125166
```
126167
hatch run test:cov

examples/.env.template

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/README.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

examples/build.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)