Skip to content

Commit 4a75b77

Browse files
Remove woql ref (#102)
* Removing references to old client name * Remove woql ref and extra spaces
1 parent 822963e commit 4a75b77

12 files changed

+31
-34
lines changed

getting_started/python-client/add_contractors.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from terminusdb_client import WOQLClient
1+
from terminusdb_client import Client
22
from terminusdb_client.woqlschema import WOQLSchema
33

44
# For Terminus X, use the following
5-
# client = WOQLClient("https://cloud.terminusdb.com/<Your Team>/")
5+
# client = Client("https://cloud.terminusdb.com/<Your Team>/")
66
# client.connect(db="demo_workshop", team="<Your Team>", use_token=True)
77

8-
client = WOQLClient("http://127.0.0.1:6363/")
8+
client = Client("http://127.0.0.1:6363/")
99
client.connect(db="getting_started", branch="contractors")
1010

1111
data_schema = WOQLSchema()

getting_started/python-client/insert_data.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import csv
22

33
from schema import Address, Employee, Team
4-
from terminusdb_client import WOQLClient
4+
from terminusdb_client import Client
55

66
# we keep all the information in dictionaries with Employee id as keys
77
employees = {}
@@ -42,10 +42,10 @@
4242
employees[emp_id].manager = employees[man_id]
4343

4444
# For Terminus X, use the following
45-
# client = WOQLClient("https://cloud.terminusdb.com/<Your Team>/")
45+
# client = Client("https://cloud.terminusdb.com/<Your Team>/")
4646
# client.connect(db="demo_workshop", team="<Your Team>", use_token=True)
4747

48-
client = WOQLClient("http://127.0.0.1:6363/")
48+
client = Client("http://127.0.0.1:6363/")
4949
client.connect(db="getting_started")
5050

5151
client.insert_document(list(employees.values()), commit_msg="Adding 4 Employees")

getting_started/python-client/lesson_3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Now, the `employees` dictionary should be populated with the `Employee` objects,
104104
The next step is the insert all `Employees` into the database. But before that, we need to create a client with our endpoint:
105105

106106
```python
107-
client = WOQLClient("http://127.0.0.1:6363/")
107+
client = Client("http://127.0.0.1:6363/")
108108
```
109109

110110
Then we will connect the client to our database. If you are connecting locally and use the default setting, just provide the database you are connecting to:

getting_started/python-client/lesson_6.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Branch 'contractors' created. Remain on 'main' branch.
2929
We have created the `contractors` branch. Let's verify:
3030

3131
```
32-
$ tdbpy branch
32+
$ tdbpy branch
3333
main
3434
contractors
3535
```
@@ -49,7 +49,7 @@ Now run the script:
4949
To verify we did things right, let's see if there are any changes in the current `main` branch, you can see all the logs with:
5050

5151
```
52-
$ tdbpy log
52+
$ tdbpy log
5353
========
5454
Connecting to 'getting_started' at 'http://127.0.0.1:6363/'
5555
on branch 'main'
@@ -100,7 +100,7 @@ Checked out 'contractors' branch.
100100
And check the log again:
101101

102102
```
103-
$ tdbpy log
103+
$ tdbpy log
104104
========
105105
Connecting to 'getting_started' at 'http://127.0.0.1:6363/'
106106
on branch 'contractors'
@@ -161,7 +161,7 @@ Time flies, now the project is done and the contractors have done their jobs and
161161
Let's verify our log again:
162162

163163
```
164-
$ tdbpy log
164+
$ tdbpy log
165165
========
166166
Connecting to 'getting_started' at 'http://127.0.0.1:6363/'
167167
on branch 'main'

getting_started/python-client/query_data.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from terminusdb_client import WOQLClient
1+
from terminusdb_client import Client
22
from terminusdb_client.woqlschema import WOQLSchema
33
from terminusdb_client.woqldataframe import result_to_df
44

55
# For Terminus X, use the following
6-
# client = WOQLClient("https://cloud.terminusdb.com/<Your Team>/")
6+
# client = Client("https://cloud.terminusdb.com/<Your Team>/")
77
# client.connect(db="demo_workshop", team="<Your Team>", use_token=True)
88

9-
client = WOQLClient("http://127.0.0.1:6363/")
9+
client = Client("http://127.0.0.1:6363/")
1010
client.connect(db="getting_started")
1111

1212
team_it_raw = client.query_document({"@type": "Employee", "team": "it"})

getting_started/python-client/update_data.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from terminusdb_client import WOQLClient
1+
from terminusdb_client import Client
22
from terminusdb_client.woqlschema import WOQLSchema
33

44
# For Terminus X, use the following
5-
# client = WOQLClient("https://cloud.terminusdb.com/<Your Team>/")
5+
# client = Client("https://cloud.terminusdb.com/<Your Team>/")
66
# client.connect(db="demo_workshop", team="<Your Team>", use_token=True)
77

8-
client = WOQLClient("http://127.0.0.1:6363/")
8+
client = Client("http://127.0.0.1:6363/")
99
client.connect(db="getting_started")
1010

1111
data_schema = WOQLSchema()

getting_started/python-client/woql_query.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import pprint as pp
22

3-
from terminusdb_client import WOQLClient
3+
from terminusdb_client import Client
44
from terminusdb_client import WOQLQuery as wq
55

66
# For Terminus X, use the following
7-
# client = WOQLClient("https://cloud.terminusdb.com/<Your Team>/")
7+
# client = Client("https://cloud.terminusdb.com/<Your Team>/")
88
# client.connect(db="demo_workshop", team="<Your Team>", use_token=True)
99

10-
client = WOQLClient("http://127.0.0.1:6363/")
10+
client = Client("http://127.0.0.1:6363/")
1111
client.connect(db="getting_started")
1212

1313
### Uncomment to see all triples ##

netflix/Netflix Tutorial.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"outputs": [],
2626
"source": [
2727
"from typing import Set, Optional\n",
28-
"from terminusdb_client import WOQLClient\n",
28+
"from terminusdb_client import Client\n",
2929
"from terminusdb_client.woqlschema.woql_schema import (\n",
3030
" DocumentTemplate,\n",
3131
" EnumTemplate,\n",
@@ -190,7 +190,7 @@
190190
"\n",
191191
" # TODO: change the team name \n",
192192
" team = \"TeamName\"\n",
193-
" client = WOQLClient(\"https://cloud.terminusdb.com/\"+team)\n",
193+
" client = Client(\"https://cloud.terminusdb.com/\"+team)\n",
194194
" \n",
195195
" try:\n",
196196
" client.connect(team=team, use_token=True)\n",

netflix/netflix.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import Set, Optional
2-
from terminusdb_client import WOQLClient
2+
from terminusdb_client import Client
33
from terminusdb_client.woqlschema.woql_schema import (
44
DocumentTemplate,
55
EnumTemplate,
@@ -135,18 +135,15 @@ def branches(client):
135135

136136
def time_travel(client):
137137
# Reset the current branch HEAD to the specified commit path.
138-
# more info: https://terminusdb.github.io/terminusdb-client-python/woqlClient.html#terminusdb_client.WOQLClient.reset
139138
# eg:
140139
# client.reset('hvatquoq9531k1u223v4azcdr1bfyde')
141140

142141
# Squash the current branch HEAD into a commit
143-
# more info: https://terminusdb.github.io/terminusdb-client-python/woqlClient.html#terminusdb_client.WOQLClient.squash
144142
commit_res = client.squash('This is a squash commit message!',"username")
145143
# reset to the squash commit
146144
client.reset(commit_res, use_path=True)
147145

148146
# Rebase the current branch onto the specified remote branch
149-
# more info: https://terminusdb.github.io/terminusdb-client-python/woqlClient.html#terminusdb_client.WOQLClient.rebase
150147
client.rebase("main")
151148

152149

@@ -156,7 +153,7 @@ def time_travel(client):
156153

157154
# TODO: change the team name
158155
team = "<TEAM_NAME>"
159-
client = WOQLClient("https://cloud.terminusdb.com/"+team)
156+
client = Client("https://cloud.terminusdb.com/"+team)
160157

161158
try:
162159
client.connect(team=team, use_token=True)

nuclear/enrichment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Of course we need the client so we can talk to the server...
99

1010
```python
1111
#!/usr/bin/python3
12-
from terminusdb_client import WOQLClient
12+
from terminusdb_client import Client
1313
import os
1414
import json
1515
import urllib.parse
1616

1717
team = os.environ['TERMINUSDB_TEAM']
1818
team_quoted = urllib.parse.quote(team)
19-
client = WOQLClient(f"https://cloud.terminusdb.com/{team_quoted}/")
19+
client = Client(f"https://cloud.terminusdb.com/{team_quoted}/")
2020
client.connect(db="nuclear", team=team, use_token=True)
2121
```
2222

nuclear/nuclear.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ we'll need...
1313

1414
```python
1515
#!/usr/bin/env python3
16-
from terminusdb_client import WOQLClient
16+
from terminusdb_client import Client
1717
import re
1818
import csv
1919
import json
@@ -34,13 +34,13 @@ team = os.environ['TERMINUSDB_TEAM']
3434
team_quoted = urllib.parse.quote(team)
3535
####
3636
# To use TerminusCMS
37-
client = WOQLClient(f"https://cloud.terminusdb.com/{team_quoted}/")
37+
client = Client(f"https://cloud.terminusdb.com/{team_quoted}/")
3838
# make sure you have put the token in environment variable
3939
# https://terminusdb.com/docs/terminuscms/get-api-key
4040
client.connect(team=team, use_token=True)
4141
####
4242
# to connect locally, comment the above client and call and try this instead:
43-
# client = WOQLClient("http://localhost:6363/")
43+
# client = Client("http://localhost:6363/")
4444
#client.connect(team=team)
4545
```
4646

nuclear/scraping.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ you'll see from the examples, it's fairly straightforward.
1515

1616
```python
1717
#!/usr/bin/python3
18-
from terminusdb_client import WOQLClient
18+
from terminusdb_client import Client
1919
import requests
2020
import re
2121
import os
@@ -195,7 +195,7 @@ if __name__ == "__main__":
195195

196196
team = os.environ['TERMINUSDB_TEAM']
197197
team_quoted = urllib.parse.quote(team)
198-
client = WOQLClient(f"https://cloud.terminusdb.com/{team_quoted}/")
198+
client = Client(f"https://cloud.terminusdb.com/{team_quoted}/")
199199
dbid = 'nuclear'
200200
client.connect(db=dbid,team=team, use_token=True)
201201

0 commit comments

Comments
 (0)