Skip to content

Commit 11c0936

Browse files
committed
Minor fixes and heading levels
1 parent 934fc5c commit 11c0936

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/azure-cache-for-redis/cache-python-get-started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ The following example used `pip3` for Python 3 to install `redis-py` on Windows
3939

4040
:::image type="content" source="media/cache-python-get-started/cache-python-install-redis-py.png" alt-text="Screenshot of a terminal showing an install of redis-py interface to Azure Cache for Redis.":::
4141

42-
## Create a sample Python script to access your cache
42+
## Create a Python script to access your cache
4343

44-
Create a Python that uses either Microsoft Entra ID or access keys to connect to an Azure Cache for Redis. We recommend you use Microsoft Entra ID.
44+
Create a Python script to that uses either Microsoft Entra ID or access keys to connect to an Azure Cache for Redis. We recommend you use Microsoft Entra ID.
4545

4646
## [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
4747

@@ -57,7 +57,7 @@ Create a Python that uses either Microsoft Entra ID or access keys to connect to
5757
pip install azure-identity
5858
```
5959

60-
### Create a sample python app
60+
### Create a Python script using Microsoft Entra ID
6161

6262
1. Create a new text file, add the following script, and save the file as `PythonApplication1.py`.
6363

@@ -110,11 +110,11 @@ Create a Python that uses either Microsoft Entra ID or access keys to connect to
110110

111111
:::image type="content" source="media/cache-python-get-started/cache-python-completed.png" alt-text="Screenshot of a terminal showing a Python script to test cache access.":::
112112

113-
## Create a sample Python script with reauthentication
113+
### Create a Python script using reauthentication
114114

115115
Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using Python.
116116

117-
1. Create a new text file, add the following script, and save the file as `PythonApplication2.py`.
117+
1. Create a new text file, add the following script. Then, save the file as `PythonApplication2.py`.
118118

119119
1. Replace `<Your Host Name>` with the value from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
120120

@@ -195,9 +195,9 @@ Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](
195195

196196
[!INCLUDE [redis-cache-access-keys](includes/redis-cache-access-keys.md)]
197197

198-
## Read and write to the cache from the command line
198+
### Read and write to the cache from the command line
199199

200-
Run [Python from the command line](https://docs.python.org/3/faq/windows.html#id2) to test your cache. First, initiate the python interpreter in your command line by typing `py`, and then use the following code. Replace `<Your Host Name>` and `<Your Access Key>` with the values from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
200+
Run [Python from the command line](https://docs.python.org/3/faq/windows.html#id2) to test your cache. First, initiate the Python interpreter in your command line by typing `py`, and then use the following code. Replace `<Your Host Name>` and `<Your Access Key>` with the values from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
201201

202202
```python
203203
>>> import redis
@@ -209,7 +209,7 @@ True
209209
b'bar'
210210
```
211211

212-
## Create a Python sample app
212+
### Create a Python script using access keys
213213

214214
Create a new text file, add the following script, and save the file as `PythonApplication1.py`. Replace `<Your Host Name>` and `<Your Access Key>` with the values from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
215215

0 commit comments

Comments
 (0)