Skip to content

Commit 29e3e83

Browse files
authoredNov 15, 2024
Python: Add the Dapr Runtime for Processes (microsoft#9642)
### Motivation and Context In addition to the Python local process runtime, we're adding the ability to congfigure the Dapr runtime for Python SK processes. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description The PR introduces: - The ability to configure the Dapr Runtime for Python processes - Adds a sample FastAPI app showing how to configure the Dapr runtime with a sample SK Python process (see the README for details on setup) - Adds some unit test coverage for the Dapr runtime - Closes microsoft#9355 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
1 parent 434db27 commit 29e3e83

File tree

66 files changed

+3449
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3449
-206
lines changed
 

‎python/.vscode/launch.json

+20
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@
1010
"request": "launch",
1111
"program": "${file}",
1212
"console": "integratedTerminal",
13+
"justMyCode": true
14+
},
15+
{
16+
"name": "Python FastAPI app with Dapr",
17+
"type": "python",
18+
"request": "launch",
19+
"program": "${workspaceFolder}/samples/demos/process_with_dapr/fastapi_app.py",
20+
"console": "integratedTerminal",
21+
"preLaunchTask": "daprd-debug-python",
22+
"postDebugTask": "daprd-down-python",
23+
"justMyCode": false
24+
},
25+
{
26+
"name": "Python Flask API app with Dapr",
27+
"type": "python",
28+
"request": "launch",
29+
"program": "${workspaceFolder}/samples/demos/process_with_dapr/flask_app.py",
30+
"console": "integratedTerminal",
31+
"preLaunchTask": "daprd-debug-python",
32+
"postDebugTask": "daprd-down-python",
1333
"justMyCode": false
1434
}
1535
]

‎python/.vscode/tasks.json

+14
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@
164164
"panel": "shared"
165165
},
166166
"problemMatcher": []
167+
},
168+
{
169+
"label": "daprd-debug-python",
170+
"type": "daprd",
171+
"appId": "dapr-processes",
172+
"httpPort": 3500,
173+
"appPort": 5001,
174+
"grpcPort": 53317,
175+
"metricsPort": 9091
176+
},
177+
{
178+
"label": "daprd-down-python",
179+
"type": "daprd-down",
180+
"appId": "dapr-processes"
167181
}
168182
],
169183
"inputs": [

0 commit comments

Comments
 (0)