Add Python samples for durabletask-python v1.4.0 features#243
Open
andystaples wants to merge 1 commit intoAzure-Samples:mainfrom
Open
Add Python samples for durabletask-python v1.4.0 features#243andystaples wants to merge 1 commit intoAzure-Samples:mainfrom
andystaples wants to merge 1 commit intoAzure-Samples:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 4 new Python sample directories and updates 1 existing sample to cover the major features added in
durabletask-pythonv1.4.0.New Samples
large-payload/Demonstrates automatic externalization of oversized orchestration payloads to Azure Blob Storage using
BlobPayloadStore. Shows both small (inline) and large (externalized) payloads transparently handled by the SDK. Includes adocker-compose.ymlto start the DTS emulator and Azurite together.work-item-filtering/Demonstrates running multiple specialized workers (
worker_a.py,worker_b.py) where each only processes specific orchestrations/activities usinguse_work_item_filters(). Shows auto-generated filter mode.testing/Demonstrates unit testing orchestrations and activities without Docker or an emulator using
InMemoryOrchestrationBackendfromdurabletask.testing. Includes pytest-based tests with happy path and failure path coverage.orchestration-management/Demonstrates client-side lifecycle management operations:
restart_orchestration()(same ID and new ID),purge_orchestrations_by()for batch cleanup, andget_all_orchestration_states()for querying.Updated Sample
async-http-api/Replaced the synchronous
DurableTaskSchedulerClientwithAsyncDurableTaskSchedulerClientfor native async/await support. Usesazure.identity.aio.DefaultAzureCredential, FastAPI lifespan for client lifecycle, and async context manager pattern. Added documentation section to README.Conventions
All new samples follow existing conventions:
worker.py/client.pysplitTASKHUB,ENDPOINT)SAMPLE_TEMPLATE.mdstructurerequirements.txtwith minimal dependenciesVerification
.pyfiles passpython -m py_compilesyntax validation