From 26e314bc0ff04546cfc3136ca82f4b49fe16215e Mon Sep 17 00:00:00 2001 From: Stefan Obermeier Date: Sat, 4 Nov 2023 15:16:19 +0100 Subject: [PATCH] Use os.environ dictionary to set environment variables. %export ENVIRONMENT_VARIABLE could led to "UsageError: Line magic function `%export` not found." os.environ dictionary seems to be more generic and reuses the approach from other StreamPipes Python tutorials. --- .../1-introduction-to-streampipes-python-client.ipynb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/streampipes-client-python/docs/tutorials/1-introduction-to-streampipes-python-client.ipynb b/streampipes-client-python/docs/tutorials/1-introduction-to-streampipes-python-client.ipynb index 9ec18392c3..c7efd9a81f 100644 --- a/streampipes-client-python/docs/tutorials/1-introduction-to-streampipes-python-client.ipynb +++ b/streampipes-client-python/docs/tutorials/1-introduction-to-streampipes-python-client.ipynb @@ -170,8 +170,9 @@ "execution_count": null, "outputs": [], "source": [ - "%export SP_USERNAME=\"\"\n", - "%export SP_API_KEY=\"\"" + "import os\n", + "os.environ[\"SP_USERNAME\"] = \"admin@streampipes.apache.org\"\n", + "os.environ[\"SP_API_KEY\"] = \"XXX\"\n" ], "metadata": { "collapsed": false