Skip to content

Commit f0ab53b

Browse files
committed
Minor tweaks to code
1 parent 9bb9a9b commit f0ab53b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ If you want to skip straight to the code, see the [Python quickstart](https://gi
2222
## Prerequisites
2323

2424
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)
25-
- [Python 3](https://www.python.org/downloads/)
25+
- Python 3
26+
- For MacOS or Linux, download from [python.org](https://www.python.org/downloads/).
27+
- For Windows 11, use the [Windows Store](https://www.microsoft.com/en-us/p/python-3/9nblggh083nz?activetab=pivot:overviewtab).
2628

2729
## Create an Azure Cache for Redis instance
2830
[!INCLUDE [redis-cache-create](includes/redis-cache-create.md)]
@@ -33,9 +35,9 @@ If you want to skip straight to the code, see the [Python quickstart](https://gi
3335

3436
[Redis-py](https://github.com/andymccurdy/redis-py) is a Python interface to Azure Cache for Redis. Use the Python packages tool, `pip`, to install the `redis-py` package from a command prompt.
3537

36-
The following example used *pip3* for Python 3 to install `redis-py` on Windows 11 from an Administrator command prompt.
38+
The following example used `pip3` for Python 3 to install `redis-py` on Windows 11 from an Administrator command prompt.
3739

38-
![Install the redis-py Python interface to Azure Cache for Redis](./media/cache-python-get-started/cache-python-install-redis-py.png)
40+
:::image type="content" source="media/cache-python-get-started/cache-python-install-redis-py.png" alt-text="Install the redis-py Python interface to Azure Cache for Redis.":::
3941

4042
## Read and write to the cache
4143

@@ -77,14 +79,14 @@ result = r.get("Message")
7779
print("GET Message returned : " + result.decode("utf-8"))
7880

7981
result = r.client_list()
80-
print("CLIENT LIST returned : ")
82+
print(f"CLIENT LIST returned : ")
8183
for c in result:
8284
print(f"id : {c['id']}, addr : {c['addr']}")
8385
```
8486

8587
Run `PythonApplication1.py` with Python. You should see results like the following example:
8688

87-
![Run Python script to test cache access](./media/cache-python-get-started/cache-python-completed.png)
89+
:::image type="content" source="media/cache-python-get-started/cache-python-completed.png" alt-text="Run Python script to test cache access.":::
8890

8991
## Clean up resources
9092

@@ -96,11 +98,14 @@ If you're finished with the Azure resource group and resources you created in th
9698
To delete the resource group and its Redis Cache for Azure instance:
9799

98100
1. From the [Azure portal](https://portal.azure.com), search for and select **Resource groups**.
101+
99102
1. In the **Filter by name** text box, enter the name of the resource group that contains your cache instance, and then select it from the search results.
103+
100104
1. On your resource group page, select **Delete resource group**.
105+
101106
1. Type the resource group name, and then select **Delete**.
102107

103-
![Delete your resource group for Azure Cache for Redis](./media/cache-python-get-started/delete-your-resource-group-for-azure-cache-for-redis.png)
108+
:::image type="content" source="./media/cache-python-get-started/delete-your-resource-group-for-azure-cache-for-redis.png" alt-text="Delete your resource group for Azure Cache for Redis":::
104109

105110
## Next steps
106111

0 commit comments

Comments
 (0)