Skip to content
Merged
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
2 changes: 1 addition & 1 deletion python/patterns-use-cases/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"hypercorn",
"restate_sdk[serde]==0.11.0",
"restate-sdk[serde]>=0.12.0",
"pydantic",
"httpx",
"stripe",
Expand Down
8 changes: 4 additions & 4 deletions python/templates/lambda/.claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ response = await ctx.service_call(

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#durable_steps"} theme={null}
# Wrap non-deterministic code in ctx.run
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
result = await ctx.run_typed("my-side-effect", lambda: call_external_api("weather", "123"))

# Or with typed version for better type safety
result = await ctx.run_typed("my-side-effect", call_external_api)
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
```

### Deterministic randoms and time
Expand Down Expand Up @@ -204,10 +204,10 @@ ctx.reject_awakeable(awakeable_id, "Cannot be reviewed")

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#workflow_promises"} theme={null}
# Wait for promise
review = await ctx.promise("review").value()
review = await ctx.promise("review", type_hint=str).value()

# Resolve promise
await ctx.promise("review").resolve("approval")
await ctx.promise("review", type_hint=str).resolve("approval")
```

## Concurrency
Expand Down
2 changes: 1 addition & 1 deletion python/templates/lambda/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.10.6",
"restate_sdk[serde]>=0.11.0",
"restate-sdk[serde]>=0.12.0",
]

[tool.hatch.build.targets.wheel]
Expand Down
8 changes: 4 additions & 4 deletions python/templates/python/.claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ response = await ctx.service_call(

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#durable_steps"} theme={null}
# Wrap non-deterministic code in ctx.run
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
result = await ctx.run_typed("my-side-effect", lambda: call_external_api("weather", "123"))

# Or with typed version for better type safety
result = await ctx.run_typed("my-side-effect", call_external_api)
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
```

### Deterministic randoms and time
Expand Down Expand Up @@ -204,10 +204,10 @@ ctx.reject_awakeable(awakeable_id, "Cannot be reviewed")

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#workflow_promises"} theme={null}
# Wait for promise
review = await ctx.promise("review").value()
review = await ctx.promise("review", type_hint=str).value()

# Resolve promise
await ctx.promise("review").resolve("approval")
await ctx.promise("review", type_hint=str).resolve("approval")
```

## Concurrency
Expand Down
8 changes: 4 additions & 4 deletions python/templates/python/.cursor/rules/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ response = await ctx.service_call(

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#durable_steps"} theme={null}
# Wrap non-deterministic code in ctx.run
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
result = await ctx.run_typed("my-side-effect", lambda: call_external_api("weather", "123"))

# Or with typed version for better type safety
result = await ctx.run_typed("my-side-effect", call_external_api)
result = await ctx.run_typed("my-side-effect", call_external_api, query="weather", some_id="123")
```

### Deterministic randoms and time
Expand Down Expand Up @@ -204,10 +204,10 @@ ctx.reject_awakeable(awakeable_id, "Cannot be reviewed")

```python {"CODE_LOAD::python/src/develop/agentsmd/actions.py#workflow_promises"} theme={null}
# Wait for promise
review = await ctx.promise("review").value()
review = await ctx.promise("review", type_hint=str).value()

# Resolve promise
await ctx.promise("review").resolve("approval")
await ctx.promise("review", type_hint=str).resolve("approval")
```

## Concurrency
Expand Down
2 changes: 1 addition & 1 deletion python/templates/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.11"
dependencies = [
"hypercorn>=0.17.3",
"pydantic>=2.10.6",
"restate_sdk[serde]>=0.11.0",
"restate-sdk[serde]>=0.12.0",
]

[tool.hatch.build.targets.wheel]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.11"
dependencies = [
"hypercorn>=0.17.3",
"pydantic>=2.10.6",
"restate_sdk[serde]>=0.11.0",
"restate-sdk[serde]>=0.12.0",
]

[tool.hatch.build.targets.wheel]
Expand Down
2 changes: 1 addition & 1 deletion python/tutorials/tour-of-workflows-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"hypercorn>=0.17.3",
"pydantic>=2.10.6",
"httpx",
"restate_sdk[serde]>=0.11.0",
"restate-sdk[serde]>=0.12.0",
]

[tool.hatch.build.targets.wheel]
Expand Down