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: articles/azure-app-configuration/use-variant-feature-flags-python.md
+9-32Lines changed: 9 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,49 +1,26 @@
1
1
---
2
-
title: 'Tutorial: Use variant feature flags in Azure App Configuration (preview)'
2
+
title: 'Tutorial: Use variant feature flags from Azure App Configuration in a Python application (preview)'
3
3
titleSuffix: Azure App configuration
4
-
description: In this tutorial, you learn how to set up and use variant feature flags in an App Configuration
5
-
#customerintent: As a user of Azure App Configuration, I want to learn how I can use variants and variant feature flags in my application.
4
+
description: In this tutorial, you learn how to use variant feature flags in an Python application
5
+
#customerintent: As a user of Azure App Configuration, I want to learn how I can use variants and variant feature flags in my python application.
6
6
author: mrm9084
7
7
ms.author: mametcal
8
8
ms.service: azure-app-configuration
9
9
ms.devlang: python
10
10
ms.topic: tutorial
11
-
ms.date: 10/28/2024
11
+
ms.date: 12/02/2024
12
12
---
13
13
14
14
# Tutorial: Use variant feature flags in Azure App Configuration (preview)
15
15
16
-
Variant feature flags (preview) enable your application to support multiple variants of a feature. The variants of your feature can be assigned to specific users, groups, or percentile buckets. Variants can be useful for feature rollouts, configuration rollouts, and feature experimentation (also known as A/B testing).
17
-
18
-
> [!NOTE]
19
-
> A quicker way to start your variant journey is to run the [Quote of the Day AZD sample.](https://github.com/Azure-Samples/quote-of-the-day-python/)- This repository provides a comprehensive example, complete with variants and Azure resource provisioning.
20
-
21
-
In this tutorial, you:
22
-
23
-
> [!div class="checklist"]
24
-
> * Create a variant feature flag
25
-
> * Set up an app to consume variant feature flags
16
+
In this tutorial, you use a variant feature flag to manage experiences for different user segments in an example application, *Quote of the Day*. You utilize the variant feature flag created in [Use variant feature flags](./use-variant-feature-flags.md). Before proceeding, ensure you create the variant feature flag named *Greeting* in your App Configuration store.
26
17
27
18
## Prerequisites
28
19
29
-
* An Azure subscription. If you don’t have one, [create one for free](https://azure.microsoft.com/free/).
30
-
* An [App Configuration store](./quickstart-azure-app-configuration-create.md).
31
-
32
-
## Create a variant feature flag (preview)
33
-
34
-
Create a variant feature flag (preview) called *Greeting* with no label and three variants, *None*, *Simple*, and *Long*. Creating variant flags is described in the [Feature Flag quickstart](./manage-feature-flags.md#create-a-variant-feature-flag-preview).
35
-
36
-
| Variant Name | Variant Value | Allocation|
37
-
|---|---|---|
38
-
| None *(Default)*| null | 50% |
39
-
| Simple | "Hello!" | 25% |
40
-
| Long | "I hope this makes your day!" | 25% |
41
-
42
-
## Set up an app to use the variants (preview)
43
-
44
-
In this example, you create a Python Flask web app named _Quote of the Day_. When the app is loaded, it displays a quote. Users can interact with the heart button to like it. To improve user engagement, you want to explore whether a personalized greeting message increases the number of users who like the quote. Users who receive the _None_ variant see no greeting. Users who receive the _Simple_ variant get a simple greeting message. Users who receive the _Long_ variant get a slightly longer greeting.
20
+
* Python 3.8 or later - for information on setting up Python on Windows, see the [Python on Windows documentation](/windows/python/)
21
+
* Follow the [Use variant feature flags](./use-variant-feature-flags.md) tutorial and create the variant feature flag named *Greeting*.
45
22
46
-
###Create an app that uses variants (preview)
23
+
## Create a Python web app
47
24
48
25
1. Create a new project folder named *QuoteOfTheDay*.
49
26
@@ -62,7 +39,7 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
62
39
1. Install the required packages. The latest preview versions of `azure-appconfiguration-provider`, and `featuremanagement` are required for variant feature flags (preview).
0 commit comments