This is an automated email from the ASF dual-hosted git repository.

obermeier pushed a commit to branch obermeier-patch-1
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 26e314bc0ff04546cfc3136ca82f4b49fe16215e
Author: Stefan Obermeier <[email protected]>
AuthorDate: Sat Nov 4 15:16:19 2023 +0100

    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.
---
 .../docs/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 9ec18392c..c7efd9a81 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=\"<USERNAME>\"\n",
-    "%export SP_API_KEY=\"<API-KEY>\""
+    "import os\n",
+    "os.environ[\"SP_USERNAME\"] = \"[email protected]\"\n",
+    "os.environ[\"SP_API_KEY\"] = \"XXX\"\n"
    ],
    "metadata": {
     "collapsed": false

Reply via email to