Skip to content

Commit 13a0712

Browse files
OJ423gitbook-bot
authored andcommitted
GITBOOK-125: Update to Connect with Python Client
1 parent 2dbef21 commit 13a0712

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

guides/how-to-guides/use-the-python-client/connect-with-the-python-client.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ You should put your access token in your environment, using the environment vari
2828
export TERMINUSDB_ACCESS_TOKEN="..."
2929
```
3030

31-
At this point you can connect with the API key using the code:
31+
At this point you can create the client with this code:
3232

3333
```python
34-
team="MyTeam"
35-
client.connect(team=team, use_token=True)
34+
from terminusdb_client import WOQLClient
35+
user = "user@email.com"
36+
team = "Team_Name"
37+
endpoint = "https://cloud.terminusdb.com/{team}/"
38+
client = WOQLClient(endpoint)
39+
40+
client.connect(user=user, team=team, use_token=True)
3641
```
3742

3843
### Connecting to a TerminusDB installation

terminuscms/start-with-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ client.setApiKey(process.env.TERMINUSDB_ACCESS_TOKEN)
9191
from terminusdb_client import WOQLClient
9292
user = "jimbo"
9393
team = "logicistics" # My team name.
94-
endpoint = f"https://cloud.terminusdb.com/{team}/"
94+
endpoint = "https://cloud.terminusdb.com/{team}/"
9595
client = WOQLClient(endpoint)
9696

9797
client.connect(user=user, team=team, use_token=True)

0 commit comments

Comments
 (0)