Skip to content

Commit 40dfc8b

Browse files
committed
preview tags
1 parent 774eb07 commit 40dfc8b

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

articles/azure-app-configuration/use-variant-feature-flags-python.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Tutorial: Use variant feature flags in Azure App Configuration'
2+
title: 'Tutorial: Use variant feature flags in Azure App Configuration (preview)'
33
titleSuffix: Azure App configuration
44
description: In this tutorial, you learn how to set up and use variant feature flags in an App Configuration
55
#customerintent: As a user of Azure App Configuration, I want to learn how I can use variants and variant feature flags in my application.
@@ -13,7 +13,7 @@ ms.date: 10/28/2024
1313

1414
# Tutorial: Use variant feature flags in Azure App Configuration (preview)
1515

16-
Variant feature flags 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).
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).
1717

1818
> [!NOTE]
1919
> 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.
@@ -29,21 +29,21 @@ In this tutorial, you:
2929
* An Azure subscription. If you don’t have one, [create one for free](https://azure.microsoft.com/free/).
3030
* An [App Configuration store](./quickstart-azure-app-configuration-create.md).
3131

32-
## Create a variant feature flag
32+
## Create a variant feature flag (preview)
3333

34-
Create a variant feature flag 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).
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).
3535

3636
| Variant Name | Variant Value | Allocation|
3737
|---|---|---|
3838
| None *(Default)* | null | 50% |
3939
| Simple | "Hello!" | 25% |
4040
| Long | "I hope this makes your day!" | 25% |
4141

42-
## Set up an app to use the variants
42+
## Set up an app to use the variants (preview)
4343

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.
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 (preview) 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.
4545

46-
### Create an app and add user secrets
46+
### Create an app and add user secrets (preview)
4747

4848
1. Create a new project folder named *QuoteOfTheDay*.
4949

@@ -59,10 +59,10 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
5959
.\venv\Scripts\Activate
6060
```
6161

62-
1. Install the required packages. The latest preview versions of `azure-appconfiguration-provider`, and `featuremanagement` are required for variant feature flags.
62+
1. Install the required packages. The latest preview versions of `azure-appconfiguration-provider`, and `featuremanagement` are required for variant feature flags (preview).
6363

6464
```bash
65-
pip install flask azure-appconfiguration-provider==2.0.0b2 azure-identity featuremanagement[AzureMonitor]==2.0.0b2 flask-login flask_sqlalchemy flask_bcrypt azure-monitor-opentelemetry
65+
pip install flask azure-appconfiguration-provider==2.0.0b2 azure-identity featuremanagement[AzureMonitor]==2.0.0b2 flask-login flask_sqlalchemy flask_bcrypt
6666
```
6767

6868
1. Create a new file named *app.py* in the *QuoteOfTheDay* folder.
@@ -72,18 +72,13 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
7272
from azure.appconfiguration.provider import load
7373
from featuremanagement import FeatureManager
7474
from featuremanagement.azuremonitor import publish_telemetry
75-
from azure.monitor.opentelemetry import configure_azure_monitor
7675
from opentelemetry import trace
7776
from opentelemetry.trace import get_tracer_provider
7877
from flask_bcrypt import Bcrypt
7978
8079
from flask_sqlalchemy import SQLAlchemy
8180
from flask_login import LoginManager
8281
83-
DEBUG = True
84-
85-
configure_azure_monitor(connection_string=os.getenv("ApplicationInsightsConnectionString"))
86-
8782
from flask import Flask
8883
8984
app = Flask(__name__, template_folder="../templates", static_folder="../static")
@@ -517,7 +512,7 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
517512
}
518513
```
519514
520-
### Build and run the app
515+
### Build and run the app (preview)
521516
522517
1. In the command prompt, in the *QuoteOfTheDay* folder, run: `flask run`.
523518
1. Wait for the app to start, and then open a browser and navigate to `http://localhost:5000/`.

0 commit comments

Comments
 (0)