summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrimsonGlory <CrimsonGlory@users.noreply.github.com>2023-03-15 06:37:12 -0300
committerGitHub <noreply@github.com>2023-03-15 11:37:12 +0200
commit6d1061f50a6fe4cfa0a39f6a6852ed1a3a6da0bd (patch)
treecf2dcc8d87cd7cee70a7b154def1ca382489d797
parent3edd49bea4d88dbe565a920fdd12be28ff4f513e (diff)
downloadredis-py-6d1061f50a6fe4cfa0a39f6a6852ed1a3a6da0bd.tar.gz
ConnectionPool SSL example (#2605)
-rw-r--r--docs/examples/ssl_connection_examples.ipynb21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/examples/ssl_connection_examples.ipynb b/docs/examples/ssl_connection_examples.ipynb
index 386e4af..ab3b441 100644
--- a/docs/examples/ssl_connection_examples.ipynb
+++ b/docs/examples/ssl_connection_examples.ipynb
@@ -57,6 +57,27 @@
},
{
"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": {},
"source": [
"## Connecting to a Redis instance via SSL, while specifying a self-signed SSL certificate."