Skip to content

Commit eff9ba2

Browse files
authored
Update Python Quickstart
1 parent c6e898e commit eff9ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you want to skip straight to the code, see the [Python quickstart](https://gi
2424
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)
2525
- Python 3
2626
- 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).
27+
- For Windows 11, use the [Windows Store](https://apps.microsoft.com/search/publisher?name=Python+Software+Foundation&hl=en-us&gl=US).
2828

2929
## Create an Azure Cache for Redis instance
3030
[!INCLUDE [redis-cache-create](~/reusable-content/ce-skilling/azure/includes/azure-cache-for-redis/includes/redis-cache-create.md)]
@@ -41,11 +41,11 @@ The following example used `pip3` for Python 3 to install `redis-py` on Windows
4141

4242
## Read and write to the cache
4343

44-
Run Python from the command line and test your cache by using 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`.
44+
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`.
4545

4646
```python
4747
>>> import redis
48-
>>> r = redis.StrictRedis(host='<Your Host Name>',
48+
>>> r = redis.Redis(host='<Your Host Name>',
4949
port=6380, db=0, password='<Your Access Key>', ssl=True)
5050
>>> r.set('foo', 'bar')
5151
True
@@ -66,7 +66,7 @@ import redis
6666
myHostname = "<Your Host Name>"
6767
myPassword = "<Your Access Key>"
6868

69-
r = redis.StrictRedis(host=myHostname, port=6380,
69+
r = redis.Redis(host=myHostname, port=6380,
7070
password=myPassword, ssl=True)
7171

7272
result = r.ping()

0 commit comments

Comments
 (0)