File tree Expand file tree Collapse file tree 3 files changed +32
-9
lines changed
doc/modules/ROOT/pages/tutorials Expand file tree Collapse file tree 3 files changed +32
-9
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,16 @@ listing, and deletion.
2222
2323== Prerequisites
2424
25- This notebook requires having an AuraDB instance available. We also need
26- to have the `graphdatascience` Python library installed, version
27- `1.11a4` or later.
25+ This notebook requires having an AuraDB instance available and have the
26+ GDS sessions feature enabled for your tenant. Contact your account
27+ manager to get the features enabled.
28+
29+ We also need to have the `graphdatascience` Python library installed,
30+ version `1.11a4` or later.
31+
32+
33+
34+
2835
2936[source, python, role=no-test]
3037----
@@ -51,7 +58,9 @@ client_id = os.environ["AURA_API_CLIENT_ID"]
5158client_secret = os.environ["AURA_API_CLIENT_SECRET"]
5259
5360# If your account is a member of several tenants, you must also specify the tenant ID to use
54- sessions = GdsSessions(api_credentials=AuraAPICredentials(client_id, client_secret))
61+ tenant_id = os.environ.get("AURA_API_TENANT_ID", None)
62+
63+ sessions = GdsSessions(api_credentials=AuraAPICredentials(client_id, client_secret, tenant_id=tenant_id))
5564----
5665
5766== Creating a new session
Original file line number Diff line number Diff line change 4040 "source" : [
4141 " ## Prerequisites\n " ,
4242 " \n " ,
43- " This notebook requires having an AuraDB instance available.\n " ,
43+ " This notebook requires having an AuraDB instance available and have the GDS sessions feature enabled for your tenant. \n " ,
44+ " Contact your account manager to get the features enabled. \n " ,
45+ " \n " ,
4446 " We also need to have the `graphdatascience` Python library installed, version `1.11a4` or later.\n " ,
4547 " \n "
4648 ]
4749 },
50+ {
51+ "cell_type" : " markdown" ,
52+ "metadata" : {},
53+ "source" : []
54+ },
55+ {
56+ "cell_type" : " markdown" ,
57+ "metadata" : {},
58+ "source" : []
59+ },
4860 {
4961 "cell_type" : " code" ,
5062 "execution_count" : null ,
8496 " client_secret = os.environ[\" AURA_API_CLIENT_SECRET\" ]\n " ,
8597 " \n " ,
8698 " # If your account is a member of several tenants, you must also specify the tenant ID to use\n " ,
87- " sessions = GdsSessions(api_credentials=AuraAPICredentials(client_id, client_secret))"
99+ " tenant_id = os.environ.get(\" AURA_API_TENANT_ID\" , None)\n " ,
100+ " \n " ,
101+ " sessions = GdsSessions(api_credentials=AuraAPICredentials(client_id, client_secret, tenant_id=tenant_id))"
88102 ]
89103 },
90104 {
Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ class AuraAPICredentials:
2222 Attributes:
2323 client_id (str): The client ID for authentication.
2424 client_secret (str): The client secret for authentication.
25- tenant (Optional[str]): The tenant for authentication. Needed if a client belongs to multiple tenants.
25+ tenant_id (Optional[str]): The tenant ID for authentication. Needed if a client belongs to multiple tenants.
2626 """
2727
2828 client_id : str
2929 client_secret : str
30- tenant : Optional [str ] = None
30+ tenant_id : Optional [str ] = None
3131
3232
3333class GdsSessions :
@@ -42,7 +42,7 @@ def __init__(self, api_credentials: AuraAPICredentials) -> None:
4242 Args:
4343 api_credentials (AuraAPICredentials): The Aura API credentials used for establishing a connection.
4444 """
45- aura_api = AuraApi (api_credentials .client_id , api_credentials .client_secret , api_credentials .tenant )
45+ aura_api = AuraApi (api_credentials .client_id , api_credentials .client_secret , api_credentials .tenant_id )
4646 session_type_flag = os .environ .get ("USE_DEDICATED_SESSIONS" , "true" ).lower () == "true"
4747 self ._impl : Union [DedicatedSessions , AuraDsSessions ] = (
4848 DedicatedSessions (aura_api ) if session_type_flag else AuraDsSessions (aura_api )
You can’t perform that action at this time.
0 commit comments