You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/python-sdk-contributing/python-contributing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,14 @@ When contributing to the [Python SDK](https://github.com/dapr/python-sdk) the fo
12
12
13
13
The `examples` directory contains code samples for users to run to try out specific functionality of the various Python SDK packages and extensions. When writing new and updated samples keep in mind:
14
14
15
-
- All examples should be runnable on Windows, Linux, and MacOS. While Python code is consistent among operating systems, any pre/post example commands should provide options through [codetabs]({{< ref "contributing-docs.md#tabbed-content" >}})
15
+
- All examples should be runnable on Windows, Linux, and MacOS. While Python code is consistent among operating systems, any pre/post example commands should provide options through [tabpane]({{% ref "contributing-docs.md#tabbed-content" %}})
16
16
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
17
17
18
18
## Docs
19
19
20
20
The `daprdocs` directory contains the markdown files that are rendered into the [Dapr Docs](https://docs.dapr.io) website. When the documentation website is built this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs keep in mind:
21
21
22
-
- All rules in the [docs guide]({{< ref contributing-docs.md >}}) should be followed in addition to these.
22
+
- All rules in the [docs guide]({{% ref contributing-docs.md %}}) should be followed in addition to these.
23
23
- All files and directories should be prefixed with `python-` to ensure all file/directory names are globally unique across all Dapr documentation.
To get started with the Python SDK, install the main Dapr Python SDK package.
26
26
27
-
{{< tabs Stable Development>}}
27
+
{{< tabpane text=true >}}
28
28
29
-
{{% codetab %}}
29
+
{{% tab header="Stable" %}}
30
30
<!--stable-->
31
31
```bash
32
32
pip install dapr
33
33
```
34
-
{{% /codetab %}}
34
+
{{% /tab %}}
35
35
36
-
{{% codetab %}}
36
+
{{% tab header="Development" %}}
37
37
<!--dev-->
38
38
> **Note:** The development package will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Make sure to uninstall any stable versions of the Python SDK before installing the dapr-dev package.
39
39
40
40
```bash
41
41
pip install dapr-dev
42
42
```
43
43
44
-
{{% /codetab %}}
44
+
{{% /tab %}}
45
45
46
-
{{< /tabs >}}
46
+
{{< /tabpane >}}
47
47
48
48
49
49
## Available subpackages
@@ -57,14 +57,14 @@ Python SDK imports are subpackages included with the main SDK install, but need
57
57
<div class="card-body">
58
58
<h5 class="card-title"><b>Client</b></h5>
59
59
<p class="card-text">Write Python applications to interact with a Dapr sidecar and other Dapr applications, including stateful virtual actors in Python</p>
@@ -120,7 +120,7 @@ Walk through the Python quickstarts, tutorials, and examples to see Dapr in acti
120
120
121
121
| SDK samples | Description |
122
122
| ----------- | ----------- |
123
-
|[Quickstarts]({{< ref quickstarts >}}) | Experience Dapr's API building blocks in just a few minutes using the Python SDK. |
123
+
|[Quickstarts]({{% ref quickstarts %}}) | Experience Dapr's API building blocks in just a few minutes using the Python SDK. |
124
124
|[SDK samples](https://github.com/dapr/python-sdk/tree/master/examples)| Clone the SDK repo to try out some examples and get started. |
125
125
|[Bindings tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/bindings)| See how Dapr Python SDK works alongside other Dapr SDKs to enable bindings. |
126
126
|[Distributed Calculator tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/distributed-calculator/python)| Use the Dapr Python SDK to handle method invocation and state persistent capabilities. |
@@ -137,7 +137,7 @@ Walk through the Python quickstarts, tutorials, and examples to see Dapr in acti
137
137
<div class="card-body">
138
138
<h5 class="card-title"><b>Serialization</b></h5>
139
139
<p class="card-text">Learn more about serialization in Dapr SDKs.</p>
@@ -33,8 +33,8 @@ class DemoActorInterface(ActorInterface):
33
33
An actor service hosts the virtual actor. It is implemented a class that derives from the base type `Actor` and implements the interfaces defined in the actor interface.
34
34
35
35
Actors can be created using one of the Dapr actor extensions:
36
-
-[FastAPI actor extension]({{< ref python-fastapi.md >}})
37
-
-[Flask actor extension]({{< ref python-flask.md >}})
36
+
-[FastAPI actor extension]({{% ref python-fastapi.md %}})
37
+
-[Flask actor extension]({{% ref python-flask.md %}})
Copy file name to clipboardExpand all lines: daprdocs/content/en/python-sdk-docs/python-client.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@ description: How to get up and running with the Dapr Python SDK
9
9
The Dapr client package allows you to interact with other Dapr applications from a Python application.
10
10
11
11
{{% alert title="Note" color="primary" %}}
12
-
If you haven't already, [try out one of the quickstarts]({{< ref quickstarts >}}) for a quick walk-through on how to use the Dapr Python SDK with an API building block.
12
+
If you haven't already, [try out one of the quickstarts]({{% ref quickstarts %}}) for a quick walk-through on how to use the Dapr Python SDK with an API building block.
13
13
14
14
{{% /alert %}}
15
15
16
16
## Prerequisites
17
17
18
-
[Install the Dapr Python package]({{< ref "python#installation" >}}) before getting started.
18
+
[Install the Dapr Python package]({{% ref "python#installation" %}}) before getting started.
19
19
20
20
## Import the client package
21
21
@@ -140,7 +140,7 @@ except DaprGrpcError as err:
140
140
141
141
## Building blocks
142
142
143
-
The Python SDK allows you to interface with all of the [Dapr building blocks]({{< ref building-blocks >}}).
143
+
The Python SDK allows you to interface with all of the [Dapr building blocks]({{% ref building-blocks %}}).
144
144
145
145
### Invoke a service
146
146
@@ -164,7 +164,7 @@ If this variable is not set, the endpoint value is derived from the `DAPR_RUNTIM
164
164
The base endpoint for gRPC calls is the one used for the client initialisation ([explained above](#initialising-the-client)).
165
165
166
166
167
-
- For a full guide on service invocation visit [How-To: Invoke a service]({{< ref howto-invoke-discover-services.md >}}).
167
+
- For a full guide on service invocation visit [How-To: Invoke a service]({{% ref howto-invoke-discover-services.md %}}).
168
168
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/invoke-simple) for code samples and instructions to try out service invocation.
- For a full list of state operations visit [How-To: Get & save state]({{< ref howto-get-save-state.md >}}).
186
+
- For a full list of state operations visit [How-To: Get & save state]({{% ref howto-get-save-state.md %}}).
187
187
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/state_store) for code samples and instructions to try out state management.
188
188
189
189
### Query application state (Alpha)
@@ -213,7 +213,7 @@ with DaprClient() as d:
213
213
)
214
214
```
215
215
216
-
- For a full list of state store query options visit [How-To: Query state]({{< ref howto-state-query-api.md >}}).
216
+
- For a full list of state store query options visit [How-To: Query state]({{% ref howto-state-query-api.md %}}).
217
217
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/state_store_query) for code samples and instructions to try out state store querying.
- For more information about pub/sub, visit [How-To: Publish & subscribe]({{< ref howto-publish-subscribe.md >}}).
305
+
- For more information about pub/sub, visit [How-To: Publish & subscribe]({{% ref howto-publish-subscribe.md %}}).
306
306
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/pubsub-simple) for code samples and instructions to try out pub/sub.
307
307
308
308
#### Streaming message subscription
@@ -428,7 +428,7 @@ if __name__ == '__main__':
428
428
main()
429
429
```
430
430
431
-
- For more information about pub/sub, visit [How-To: Publish & subscribe]({{< ref howto-publish-subscribe.md >}}).
431
+
- For more information about pub/sub, visit [How-To: Publish & subscribe]({{% ref howto-publish-subscribe.md %}}).
432
432
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/main/examples/pubsub-simple) for code samples and instructions to try out streaming pub/sub.
433
433
434
434
### Conversation (Alpha)
@@ -437,7 +437,7 @@ if __name__ == '__main__':
437
437
The Dapr Conversation API is currently in alpha.
438
438
{{% /alert %}}
439
439
440
-
Since version 1.15 Dapr offers developers the capability to securely and reliably interact with Large Language Models (LLM) through the [Conversation API]({{< ref conversation-overview.md >}}).
440
+
Since version 1.15 Dapr offers developers the capability to securely and reliably interact with Large Language Models (LLM) through the [Conversation API]({{% ref conversation-overview.md %}}).
- For a full guide on output bindings visit [How-To: Use bindings]({{< ref howto-bindings.md >}}).
475
+
- For a full guide on output bindings visit [How-To: Use bindings]({{% ref howto-bindings.md %}}).
476
476
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/main/examples/invoke-binding) for code samples and instructions to try out output bindings.
- For a full guide on secrets visit [How-To: Retrieve secrets]({{< ref howto-secrets.md >}}).
487
+
- For a full guide on secrets visit [How-To: Retrieve secrets]({{% ref howto-secrets.md %}}).
488
488
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/secret_store) for code samples and instructions to try out retrieving secrets
- Learn more about managing configurations via the [How-To: Manage configuration]({{< ref howto-manage-configuration.md >}}) guide.
532
+
- Learn more about managing configurations via the [How-To: Manage configuration]({{% ref howto-manage-configuration.md %}}) guide.
533
533
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/configuration) for code samples and instructions to try out configuration.
534
534
535
535
### Distributed Lock
@@ -560,7 +560,7 @@ def main():
560
560
print('We tried to unlock it anyway and got back [%s]'% unlock_result.status)
561
561
```
562
562
563
-
- Learn more about using a distributed lock: [How-To: Use a lock]({{< ref howto-use-distributed-lock.md >}}).
563
+
- Learn more about using a distributed lock: [How-To: Use a lock]({{% ref howto-use-distributed-lock.md %}}).
564
564
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/blob/master/examples/distributed_lock) for code samples and instructions to try out distributed lock.
565
565
566
566
### Cryptography
@@ -594,7 +594,7 @@ def main():
594
594
print(decrypt_bytes.decode()) # The secret is "passw0rd"
595
595
```
596
596
597
-
- For a full list of state operations visit [How-To: Use the cryptography APIs]({{< ref howto-cryptography.md >}}).
597
+
- For a full list of state operations visit [How-To: Use the cryptography APIs]({{% ref howto-cryptography.md %}}).
598
598
- Visit [Python SDK examples](https://github.com/dapr/python-sdk/tree/master/examples/crypto) for code samples and instructions to try out cryptography
Copy file name to clipboardExpand all lines: daprdocs/content/en/python-sdk-docs/python-sdk-extensions/python-fastapi.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,25 @@ The Dapr Python SDK provides integration with FastAPI using the `dapr-ext-fastap
12
12
13
13
You can download and install the Dapr FastAPI extension with:
14
14
15
-
{{< tabs Stable Development>}}
15
+
{{< tabpane text=true >}}
16
16
17
-
{{% codetab %}}
17
+
{{% tab header="Stable" %}}
18
18
```bash
19
19
pip install dapr-ext-fastapi
20
20
```
21
-
{{% /codetab %}}
21
+
{{% /tab %}}
22
22
23
-
{{% codetab %}}
23
+
{{% tab header="Development" %}}
24
24
{{% alert title="Note" color="warning" %}}
25
25
The development package will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Make sure to uninstall any stable versions of the Python SDK extension before installing the `dapr-dev` package.
Copy file name to clipboardExpand all lines: daprdocs/content/en/python-sdk-docs/python-sdk-extensions/python-flask.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,25 @@ The Dapr Python SDK provides integration with Flask using the `flask-dapr` exten
12
12
13
13
You can download and install the Dapr Flask extension with:
14
14
15
-
{{< tabs Stable Development>}}
15
+
{{< tabpane text=true >}}
16
16
17
-
{{% codetab %}}
17
+
{{% tab header="Stable" %}}
18
18
```bash
19
19
pip install flask-dapr
20
20
```
21
-
{{% /codetab %}}
21
+
{{% /tab %}}
22
22
23
-
{{% codetab %}}
23
+
{{% tab header="Development" %}}
24
24
{{% alert title="Note" color="warning" %}}
25
25
The development package will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Make sure to uninstall any stable versions of the Python SDK extension before installing the `dapr-dev` package.
Copy file name to clipboardExpand all lines: daprdocs/content/en/python-sdk-docs/python-sdk-extensions/python-grpc.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,25 @@ The Dapr Python SDK provides a built in gRPC server extension, `dapr.ext.grpc`,
12
12
13
13
You can download and install the Dapr gRPC server extension with:
14
14
15
-
{{< tabs Stable Development>}}
15
+
{{< tabpane text=true >}}
16
16
17
-
{{% codetab %}}
17
+
{{% tab header="Stable" %}}
18
18
```bash
19
19
pip install dapr-ext-grpc
20
20
```
21
-
{{% /codetab %}}
21
+
{{% /tab %}}
22
22
23
-
{{% codetab %}}
23
+
{{% tab header="Development" %}}
24
24
{{% alert title="Note" color="warning" %}}
25
25
The development package will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Make sure to uninstall any stable versions of the Python SDK extension before installing the `dapr-dev` package.
0 commit comments