diff --git a/client.py b/client.py index e7cfd3d..34ed950 100644 --- a/client.py +++ b/client.py @@ -15,6 +15,12 @@ class Client: resp.raise_for_status() return ResponseWrapper(resp) + def get(self): + addr = f"http://{self.host}:{self.port}/" + resp = self.session.get(addr) + resp.raise_for_status() + return ResponseWrapper(resp) + class ResponseWrapper: diff --git a/restapi.py b/restapi.py index 60f814a..279056d 100644 --- a/restapi.py +++ b/restapi.py @@ -32,6 +32,9 @@ class TableAPI: rerun(self.sid) return str(self.dfh.df) + def GET(self): + return str(self.dfh.df) + # creating instances here allows to use TableAPI etc. as singletons