From f73b7e1ed6e280f8855763d443a4702e59d71251 Mon Sep 17 00:00:00 2001 From: CrimsonGlory Date: Tue, 7 Mar 2023 21:53:16 +0000 Subject: [PATCH] ConnectionPool SSL example --- docs/examples/ssl_connection_examples.ipynb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/examples/ssl_connection_examples.ipynb b/docs/examples/ssl_connection_examples.ipynb index 386e4af452..ab3b4415ae 100644 --- a/docs/examples/ssl_connection_examples.ipynb +++ b/docs/examples/ssl_connection_examples.ipynb @@ -55,6 +55,27 @@ "url_connection.ping()" ] }, + { + "cell_type": "markdown", + "id": "04e70233", + "metadata": {}, + "source": [ + "## Connecting to a Redis instance using ConnectionPool" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2903de26", + "metadata": {}, + "outputs": [], + "source": [ + "import redis\n", + "redis_pool = redis.ConnectionPool(host=\"localhost\", port=6666, connection_class=redis.SSLConnection)\n", + "ssl_connection = redis.StrictRedis(connection_pool=redis_pool) \n", + "ssl_connection.ping()" + ] + }, { "cell_type": "markdown", "metadata": {},