samples-python
samples-python copied to clipboard
Samples for working with the Temporal Python SDK
## What was changed Providing a new implementation of the CustomerServiceWorkflow to move the agent loop into the workflow run function. ## Why? See if this format is easier to...
## What was changed ## Why? ## Checklist 1. Closes 2. How was this tested: 3. Any docs updates needed?
Print exception cause chain in each process: ``` Heartbeating activity Heartbeating activity Got expected exception in workflow. Cause chain is ActivityError -> CancelledError Executing cleanup activity Heartbeating activity Got expected...
## What was changed ## Why? ## Checklist 1. Closes 2. How was this tested: 3. Any docs updates needed?
## What was changed Ported the expense example from Go to Python ## Why? Demonstrate human-in-the-loop processing and asynchronous activity completion ## Checklist 1. Closes N/A 2. How was this...
## What was changed Added a python sample for mutex pattern ## Why? The sample exists for [go sdk](https://github.com/temporalio/samples-go/blob/main/mutex) but not for python yet. I needed it so I figured...
## 🛠 What was changed Added a new sample workflow: `ReauthenticationAfterRiskEventWorkflow`. This workflow demonstrates an adaptive authentication pattern where users are required to reauthenticate after suspicious activity — such as...
### What are you really trying to do? When using ``` @register_activity @activity.defn async def get_http_response(URL: str) -> dict: async with httpx.AsyncClient() as client: return await client.get(url) ``` ### Describe...
### Describe the solution you'd like Similar to samples in Go, TypeScript, and .NET, Python needs an early-return sample for update with start