Skip to content

Commit 5494b93

Browse files
committed
update version to 3.2
1 parent 9948505 commit 5494b93

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

pyepsilla/cloud/client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ def get_db_info(self, db_id: str):
5959
res.close()
6060
return status_code, body
6161

62+
def get_db_statistics(self):
63+
req_url = "{}/vectordb/{}/statistics".format(self._baseurl, db_id)
64+
req_data = None
65+
res = requests.get(
66+
url=req_url, data=json.dumps(req_data), headers=self._header, verify=False
67+
)
68+
status_code = res.status_code
69+
body = res.json()
70+
res.close()
71+
return status_code, body
72+
6273
def vectordb(self, db_id: str):
6374
# validate project_id and api_key
6475
res = self.validate()

pyepsilla/vectordb/client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ def unload_db(self, db_name: str):
100100
res.close()
101101
return status_code, body
102102

103+
def statistics(self):
104+
if self._db is None:
105+
raise Exception("[ERROR] Please use_db() first!")
106+
req_url = "{}/api/{}/statistics".format(self._baseurl, self._db)
107+
req_data = None
108+
res = requests.get(
109+
url=req_url, data=json.dumps(req_data), headers=self._header, verify=False
110+
)
111+
status_code = res.status_code
112+
body = res.json()
113+
res.close()
114+
return status_code, body
115+
103116
def create_table(self, table_name: str, table_fields: list[str] = None):
104117
if self._db is None:
105118
raise Exception("[ERROR] Please use_db() first!")

pyepsilla/vectordb/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.6"
1+
__version__ = "0.3.2"

0 commit comments

Comments
 (0)