From 6d1061f50a6fe4cfa0a39f6a6852ed1a3a6da0bd Mon Sep 17 00:00:00 2001 From: CrimsonGlory Date: Wed, 15 Mar 2023 06:37:12 -0300 Subject: [PATCH] ConnectionPool SSL example (#2605) --- 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": {},