Skip to content

Commit 6d1061f

Browse files
authored
ConnectionPool SSL example (#2605)
1 parent 3edd49b commit 6d1061f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/examples/ssl_connection_examples.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,27 @@
5555
"url_connection.ping()"
5656
]
5757
},
58+
{
59+
"cell_type": "markdown",
60+
"id": "04e70233",
61+
"metadata": {},
62+
"source": [
63+
"## Connecting to a Redis instance using ConnectionPool"
64+
]
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": null,
69+
"id": "2903de26",
70+
"metadata": {},
71+
"outputs": [],
72+
"source": [
73+
"import redis\n",
74+
"redis_pool = redis.ConnectionPool(host=\"localhost\", port=6666, connection_class=redis.SSLConnection)\n",
75+
"ssl_connection = redis.StrictRedis(connection_pool=redis_pool) \n",
76+
"ssl_connection.ping()"
77+
]
78+
},
5879
{
5980
"cell_type": "markdown",
6081
"metadata": {},

0 commit comments

Comments
 (0)