Skip to content

Commit df794d0

Browse files
committed
Add note to example about helper function
1 parent e2c7adb commit df794d0

6 files changed

+18
-14
lines changed

doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-self-managed.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ import os
5959
6060
from graphdatascience.session import AuraAPICredentials, GdsSessions
6161
62-
# If your account is a member of several project, you must also specify the project ID to use
63-
62+
# you can also use AuraAPICredentials.from_env() to load credentials from environment variables
6463
api_credentials = AuraAPICredentials(
6564
client_id=os.environ["CLIENT_ID"],
6665
client_secret=os.environ["CLIENT_SECRET"],
66+
# If your account is a member of several project, you must also specify the project ID to use
6767
project_id=os.environ.get("PROJECT_ID", None),
6868
)
6969
@@ -119,7 +119,8 @@ from datetime import timedelta
119119
120120
from graphdatascience.session import DbmsConnectionInfo
121121
122-
# Identify the Neo4j DBMS
122+
# Identify the AuraDB instance
123+
# you can also use DbmsConnectionInfo.from_env() to load credentials from environment variables
123124
db_connection = DbmsConnectionInfo(
124125
uri=os.environ["NEO4J_URI"],
125126
username=os.environ["NEO4J_USERNAME"],

doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-standalone.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ import os
5858
5959
from graphdatascience.session import AuraAPICredentials, GdsSessions
6060
61-
# If your account is a member of several project, you must also specify the project ID to use
62-
61+
# you can also use AuraAPICredentials.from_env() to load credentials from environment variables
6362
api_credentials = AuraAPICredentials(
6463
client_id=os.environ["CLIENT_ID"],
6564
client_secret=os.environ["CLIENT_SECRET"],
65+
# If your account is a member of several project, you must also specify the project ID to use
6666
project_id=os.environ.get("PROJECT_ID", None),
6767
)
6868

doc/modules/ROOT/pages/tutorials/graph-analytics-serverless.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ import os
6060
6161
from graphdatascience.session import AuraAPICredentials, GdsSessions
6262
63-
# If your account is a member of several project, you must also specify the project ID to use
64-
63+
# you can also use AuraAPICredentials.from_env() to load credentials from environment variables
6564
api_credentials = AuraAPICredentials(
6665
client_id=os.environ["CLIENT_ID"],
6766
client_secret=os.environ["CLIENT_SECRET"],
67+
# If your account is a member of several project, you must also specify the project ID to use
6868
project_id=os.environ.get("PROJECT_ID", None),
6969
)
7070
@@ -111,6 +111,7 @@ from datetime import timedelta
111111
from graphdatascience.session import DbmsConnectionInfo
112112
113113
# Identify the AuraDB instance
114+
# you can also use DbmsConnectionInfo.from_env() to load credentials from environment variables
114115
db_connection = DbmsConnectionInfo(
115116
uri=os.environ["NEO4J_URI"],
116117
username=os.environ["NEO4J_USERNAME"],

examples/graph-analytics-serverless-self-managed.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@
9292
"\n",
9393
"from graphdatascience.session import AuraAPICredentials, GdsSessions\n",
9494
"\n",
95-
"# If your account is a member of several project, you must also specify the project ID to use\n",
96-
"\n",
95+
"# you can also use AuraAPICredentials.from_env() to load credentials from environment variables\n",
9796
"api_credentials = AuraAPICredentials(\n",
9897
" client_id=os.environ[\"CLIENT_ID\"],\n",
9998
" client_secret=os.environ[\"CLIENT_SECRET\"],\n",
99+
" # If your account is a member of several project, you must also specify the project ID to use\n",
100100
" project_id=os.environ.get(\"PROJECT_ID\", None),\n",
101101
")\n",
102102
"\n",
@@ -159,7 +159,8 @@
159159
"\n",
160160
"from graphdatascience.session import DbmsConnectionInfo\n",
161161
"\n",
162-
"# Identify the Neo4j DBMS\n",
162+
"# Identify the AuraDB instance\n",
163+
"# you can also use DbmsConnectionInfo.from_env() to load credentials from environment variables\n",
163164
"db_connection = DbmsConnectionInfo(\n",
164165
" uri=os.environ[\"NEO4J_URI\"],\n",
165166
" username=os.environ[\"NEO4J_USERNAME\"],\n",

examples/graph-analytics-serverless-standalone.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@
9393
"\n",
9494
"from graphdatascience.session import AuraAPICredentials, GdsSessions\n",
9595
"\n",
96-
"# If your account is a member of several project, you must also specify the project ID to use\n",
97-
"\n",
96+
"# you can also use AuraAPICredentials.from_env() to load credentials from environment variables\n",
9897
"api_credentials = AuraAPICredentials(\n",
9998
" client_id=os.environ[\"CLIENT_ID\"],\n",
10099
" client_secret=os.environ[\"CLIENT_SECRET\"],\n",
100+
" # If your account is a member of several project, you must also specify the project ID to use\n",
101101
" project_id=os.environ.get(\"PROJECT_ID\", None),\n",
102102
")\n",
103103
"\n",

examples/graph-analytics-serverless.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@
9393
"\n",
9494
"from graphdatascience.session import AuraAPICredentials, GdsSessions\n",
9595
"\n",
96-
"# If your account is a member of several project, you must also specify the project ID to use\n",
97-
"\n",
96+
"# you can also use AuraAPICredentials.from_env() to load credentials from environment variables\n",
9897
"api_credentials = AuraAPICredentials(\n",
9998
" client_id=os.environ[\"CLIENT_ID\"],\n",
10099
" client_secret=os.environ[\"CLIENT_SECRET\"],\n",
100+
" # If your account is a member of several project, you must also specify the project ID to use\n",
101101
" project_id=os.environ.get(\"PROJECT_ID\", None),\n",
102102
")\n",
103103
"\n",
@@ -151,6 +151,7 @@
151151
"from graphdatascience.session import DbmsConnectionInfo\n",
152152
"\n",
153153
"# Identify the AuraDB instance\n",
154+
"# you can also use DbmsConnectionInfo.from_env() to load credentials from environment variables\n",
154155
"db_connection = DbmsConnectionInfo(\n",
155156
" uri=os.environ[\"NEO4J_URI\"],\n",
156157
" username=os.environ[\"NEO4J_USERNAME\"],\n",

0 commit comments

Comments
 (0)