From d2045845887f16620c5aad08acd04199b0ff885f Mon Sep 17 00:00:00 2001 From: Robert Shelton Date: Tue, 26 Nov 2024 08:38:04 -0500 Subject: [PATCH] check for secrets --- docs/user_guide/vectorizers_04.ipynb | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/user_guide/vectorizers_04.ipynb b/docs/user_guide/vectorizers_04.ipynb index 4d0d689c..2a795237 100644 --- a/docs/user_guide/vectorizers_04.ipynb +++ b/docs/user_guide/vectorizers_04.ipynb @@ -571,10 +571,11 @@ "import os\n", "import getpass\n", "\n", - "# Either set environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION\n", - "# Or configure directly:\n", - "os.environ[\"AWS_ACCESS_KEY_ID\"] = getpass.getpass(\"Enter AWS Access Key ID: \")\n", - "os.environ[\"AWS_SECRET_ACCESS_KEY\"] = getpass.getpass(\"Enter AWS Secret Key: \")\n", + "if \"AWS_ACCESS_KEY_ID\" not in os.environ:\n", + " os.environ[\"AWS_ACCESS_KEY_ID\"] = getpass.getpass(\"Enter AWS Access Key ID: \")\n", + "if \"AWS_SECRET_ACCESS_KEY\" not in os.environ:\n", + " os.environ[\"AWS_SECRET_ACCESS_KEY\"] = getpass.getpass(\"Enter AWS Secret Key: \")\n", + "\n", "os.environ[\"AWS_REGION\"] = \"us-east-1\" # Change as needed" ] }, @@ -834,7 +835,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.8.13 ('redisvl2')", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -848,14 +849,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.11.9" }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "9b1e6e9c2967143209c2f955cb869d1d3234f92dc4787f49f155f3abbdfb1316" - } - } + "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2