Skip to content

Add Python Hello Cities sample for Durable Functions#312

Open
hhunter-ms wants to merge 1 commit into
Azure-Samples:mainfrom
hhunter-ms:add-python-hello-cities
Open

Add Python Hello Cities sample for Durable Functions#312
hhunter-ms wants to merge 1 commit into
Azure-Samples:mainfrom
hhunter-ms:add-python-hello-cities

Conversation

@hhunter-ms
Copy link
Copy Markdown
Collaborator

Adds a Python Hello Cities quickstart sample under samples/durable-functions/python/hello-cities/ to match the existing Hello Cities samples in other languages (C#, Java, JavaScript, TypeScript).

What's included

  • Function chaining orchestration — calls say_hello sequentially for Tokyo, Seattle, and London
  • Fan-out/fan-in orchestration — calls say_hello in parallel for 5 cities
  • function_app.py using DFApp (Python v2 programming model)
  • host.json configured with azureManaged storage provider for Durable Task Scheduler
  • local.settings.json with emulator connection string
  • requirements.txt with azure-functions and azure-functions-durable
  • README.md with prerequisites and quick run instructions

Testing

Both orchestrations tested locally against the DTS emulator and returned successful results:

  • Chaining: ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
  • Fan-out/fan-in: ["Hello Tokyo!", "Hello Seattle!", "Hello London!", "Hello Paris!", "Hello Berlin!"]

Copilot AI review requested due to automatic review settings May 22, 2026 17:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Python “Hello Cities” Durable Functions sample that demonstrates common orchestration patterns against the Durable Task Scheduler (DTS) backend, aligning the Python samples with the existing “Hello Cities” quickstarts in other languages.

Changes:

  • Added a Python v2 programming model Durable Functions app (DFApp) implementing function chaining and fan-out/fan-in orchestrations.
  • Added DTS emulator-ready configuration (host.json using azureManaged provider and local.settings.json with local connection string).
  • Added sample documentation (README.md), dependencies (requirements.txt), and a local .gitignore.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
samples/durable-functions/python/hello-cities/function_app.py Implements the two orchestrations, one activity, and two HTTP starters using DFApp.
samples/durable-functions/python/hello-cities/host.json Configures Durable extension to use DTS (azureManaged) with the emulator connection name.
samples/durable-functions/python/hello-cities/local.settings.json Provides local emulator settings and required Functions runtime values.
samples/durable-functions/python/hello-cities/requirements.txt Declares the Azure Functions + Durable Functions Python dependencies.
samples/durable-functions/python/hello-cities/README.md Documents prerequisites and how to run/trigger both orchestrations locally.
samples/durable-functions/python/hello-cities/.gitignore Ignores local virtualenv and Python cache artifacts for the sample directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants