From ea6e9eae046cc0c020e14d7519ab07ef629c77e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Sat, 7 May 2022 14:40:06 +0200 Subject: [PATCH 1/8] adds pypi badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7351df0..2fd47b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![kern-python](https://uploads-ssl.webflow.com/61e47fafb12bd56b40022a49/62766400bd3c57b579d289bf_kern-python%20Banner.png) [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) +[![pypi 0.0.1](https://img.shields.io/badge/pypi-0.0.1-yellow.svg)](https://pypi.org/project/kern-python-client/0.0.1/) # Kern AI API for Python From 6eb9ca357b2bd1037c1fdbcbcc30825b34f12130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Sun, 15 May 2022 22:56:41 +0200 Subject: [PATCH 2/8] adds cli usage --- .gitignore | 1 + cli.py | 23 +++++++++++++++++++++++ kern/__init__.py | 29 +++++++++++++++++++++++++++-- kern/settings.py | 7 ++++++- setup.py | 9 +++++++-- 5 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 cli.py diff --git a/.gitignore b/.gitignore index 2c995a6..86f5eb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode/ +secrets.json # Jupyter *.ipynb diff --git a/cli.py b/cli.py new file mode 100644 index 0000000..636d277 --- /dev/null +++ b/cli.py @@ -0,0 +1,23 @@ +from kern import Client +import sys + + +def pull(): + client = Client.from_secrets_file("secrets.json") + project_name = client.get_project_details()["name"] + download_to = f"{project_name}.json" + client.fetch_export(download_to=download_to) + + +def main(): + cli_args = sys.argv[1:] + + # currently only need to easily pull data; + # in the near future, this might be expanded + cli_arg = cli_args[0] + if cli_arg == "pull": + pull() + + +if __name__ == "__main__": + main() diff --git a/kern/__init__.py b/kern/__init__.py index dbd1e5b..6f18b90 100644 --- a/kern/__init__.py +++ b/kern/__init__.py @@ -4,6 +4,7 @@ import pandas as pd from kern import authentication, api_calls, settings, exceptions from typing import Optional +import json class Client: @@ -20,7 +21,7 @@ class Client: """ def __init__( - self, user_name: str, password: str, project_id: str, uri="https://app.kern.ai" + self, user_name: str, password: str, project_id: str, uri=settings.DEFAULT_URI ): settings.set_base_uri(uri) self.session_token = authentication.create_session_token( @@ -33,7 +34,28 @@ def __init__( raise exceptions.get_api_exception_class(401) self.project_id = project_id - def fetch_export(self, num_samples: Optional[int] = None) -> pd.DataFrame: + @classmethod + def from_secrets_file(cls, path_to_file): + with open(path_to_file, "r") as file: + content = json.load(file) + uri = content.get("uri") + if uri is None: + uri = settings.DEFAULT_URI + return cls( + user_name=content["user_name"], + password=content["password"], + project_id=content["project_id"], + uri=uri, + ) + + def get_project_details(self): + url = settings.get_project_url(self.project_id) + api_response = api_calls.get_request(url, self.session_token) + return api_response + + def fetch_export( + self, num_samples: Optional[int] = None, download_to: Optional[str] = None + ) -> pd.DataFrame: """Collects the export data of your project (i.e. the same data if you would export in the web app). Args: @@ -45,4 +67,7 @@ def fetch_export(self, num_samples: Optional[int] = None) -> pd.DataFrame: url = settings.get_export_url(self.project_id, num_samples=num_samples) api_response = api_calls.get_request(url, self.session_token) df = pd.read_json(api_response) + if download_to is not None: + df.to_json(download_to, orient="records") + msg.good(f"Downloaded export to {download_to}") return df diff --git a/kern/settings.py b/kern/settings.py index 11688e8..84d9374 100644 --- a/kern/settings.py +++ b/kern/settings.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- BASE_URI: str +DEFAULT_URI: str = "https://app.kern.ai" def set_base_uri(uri: str): @@ -23,7 +24,11 @@ def get_authentication_url() -> str: return f"{BASE_URI}/.ory/kratos/public/self-service/login/api" +def get_project_url(project_id: str): + return f"{BASE_URI}/api/project/{project_id}" + + def get_export_url(project_id: str, **kwargs) -> str: - url = f"{BASE_URI}/api/project/{project_id}/export" + url = f"{get_project_url(project_id)}/export" url = add_query_params(url, **kwargs) return url diff --git a/setup.py b/setup.py index 3977945..186bbf1 100644 --- a/setup.py +++ b/setup.py @@ -9,11 +9,11 @@ long_description = file.read() setup( - name="kern-python-client", + name="kern-sdk", version="0.0.1", author="jhoetter", author_email="johannes.hoetter@kern.ai", - description="Official Python SDK for the Kern AI API", + description="Official SDK for the Kern AI API", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/code-kern-ai/kern-python", @@ -44,4 +44,9 @@ "urllib3==1.26.9", "wasabi==0.9.1", ], + entry_points={ + "console_scripts": [ + "kern=cli:main", + ], + }, ) From 6af7a423f002d0cbc49a1c70c2a638a743ca26f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Mon, 16 May 2022 20:00:24 +0200 Subject: [PATCH 3/8] session token from query params --- kern/__init__.py | 6 ++++-- kern/api_calls.py | 5 +++-- kern/settings.py | 10 ++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/kern/__init__.py b/kern/__init__.py index 6f18b90..8c2c662 100644 --- a/kern/__init__.py +++ b/kern/__init__.py @@ -64,8 +64,10 @@ def fetch_export( Returns: pd.DataFrame: DataFrame containing your record data. For more details, see https://docs.kern.ai """ - url = settings.get_export_url(self.project_id, num_samples=num_samples) - api_response = api_calls.get_request(url, self.session_token) + url = settings.get_export_url(self.project_id) + api_response = api_calls.get_request( + url, self.session_token, **{"num_samples": num_samples} + ) df = pd.read_json(api_response) if download_to is not None: df.to_json(download_to, orient="records") diff --git a/kern/api_calls.py b/kern/api_calls.py index 047a8e2..4a6209f 100644 --- a/kern/api_calls.py +++ b/kern/api_calls.py @@ -17,9 +17,9 @@ def post_request(url: str, body: Dict[str, Any], session_token: str) -> str: return _handle_response(response) -def get_request(url: str, session_token: str) -> str: +def get_request(url: str, session_token: str, **query_params) -> str: headers = _build_headers(session_token) - response = requests.get(url=url, headers=headers) + response = requests.get(url=url, headers=headers, params=query_params) return _handle_response(response) @@ -28,6 +28,7 @@ def _build_headers(session_token: str) -> Dict[str, str]: "Content-Type": "application/json", "User-Agent": f"python-sdk-{version}", "Authorization": f"Bearer {session_token}", + "Identifier": session_token, } diff --git a/kern/settings.py b/kern/settings.py index 84d9374..5e5da24 100644 --- a/kern/settings.py +++ b/kern/settings.py @@ -28,7 +28,9 @@ def get_project_url(project_id: str): return f"{BASE_URI}/api/project/{project_id}" -def get_export_url(project_id: str, **kwargs) -> str: - url = f"{get_project_url(project_id)}/export" - url = add_query_params(url, **kwargs) - return url +def get_records_url(project_id: str): + return f"{get_project_url(project_id)}/records" + + +def get_export_url(project_id: str) -> str: + return f"{get_project_url(project_id)}/export" From b545f3c601a15df65c491082d09dba7eee37a84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Mon, 16 May 2022 20:29:03 +0200 Subject: [PATCH 4/8] update version --- README.md | 2 +- kern/api_calls.py | 10 +++++----- setup.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2fd47b2..4335185 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is the official Python SDK for Kern AI, your IDE for programmatic data enri ## Installation -You can set up this library via either running `$ pip install kern-python-client`, or via cloning this repository and running `$ pip install -r requirements.txt` in your repository. +You can set up this library via either running `$ pip install kern-sdk`, or via cloning this repository and running `$ pip install -r requirements.txt` in your repository. ## Usage Once you installed the package, you can access the application from any Python terminal as follows: diff --git a/kern/api_calls.py b/kern/api_calls.py index 4a6209f..fcfd0a9 100644 --- a/kern/api_calls.py +++ b/kern/api_calls.py @@ -6,7 +6,7 @@ from typing import Any, Dict try: - version = pkg_resources.get_distribution("kern-python-client").version + version = pkg_resources.get_distribution("kern-sdk").version except pkg_resources.DistributionNotFound: version = "noversion" @@ -25,10 +25,10 @@ def get_request(url: str, session_token: str, **query_params) -> str: def _build_headers(session_token: str) -> Dict[str, str]: return { - "Content-Type": "application/json", - "User-Agent": f"python-sdk-{version}", - "Authorization": f"Bearer {session_token}", - "Identifier": session_token, + "content-type": "application/json", + "user-agent": f"python-sdk-{version}", + "authorization": f"Bearer {session_token}", + "identifier": session_token, } diff --git a/setup.py b/setup.py index 186bbf1..b9647ea 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="kern-sdk", - version="0.0.1", + version="0.0.2", author="jhoetter", author_email="johannes.hoetter@kern.ai", description="Official SDK for the Kern AI API", From eeb217bf7bc5a34fb1eca579b6977712855b2da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Mon, 16 May 2022 23:48:36 +0200 Subject: [PATCH 5/8] upload files --- cli.py | 2 +- kern/__init__.py | 39 ++++++++++++++++++++++++++++++++++++++- kern/api_calls.py | 3 +++ kern/settings.py | 8 ++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 636d277..fc4aaa8 100644 --- a/cli.py +++ b/cli.py @@ -6,7 +6,7 @@ def pull(): client = Client.from_secrets_file("secrets.json") project_name = client.get_project_details()["name"] download_to = f"{project_name}.json" - client.fetch_export(download_to=download_to) + client.get_record_export(download_to=download_to) def main(): diff --git a/kern/__init__.py b/kern/__init__.py index 8c2c662..6e93900 100644 --- a/kern/__init__.py +++ b/kern/__init__.py @@ -5,6 +5,7 @@ from kern import authentication, api_calls, settings, exceptions from typing import Optional import json +from minio import Minio class Client: @@ -53,7 +54,7 @@ def get_project_details(self): api_response = api_calls.get_request(url, self.session_token) return api_response - def fetch_export( + def get_record_export( self, num_samples: Optional[int] = None, download_to: Optional[str] = None ) -> pd.DataFrame: """Collects the export data of your project (i.e. the same data if you would export in the web app). @@ -73,3 +74,39 @@ def fetch_export( df.to_json(download_to, orient="records") msg.good(f"Downloaded export to {download_to}") return df + + def post_file_import(self, upload_from: str): + upload_from = f"{upload_from}_SCALE" + file_type = "records" + import_file_options = None + config_url = settings.get_config_url() + config_api_response = api_calls.get_request(config_url, self.session_token) + endpoint = config_api_response["KERN_S3_ENDPOINT"].replace("http://", "") + + import_url = settings.get_import_url(self.project_id) + import_api_response = api_calls.post_request( + import_url, + { + "file_name": upload_from, + "file_type": file_type, + "import_file_options": import_file_options, + }, + self.session_token, + ) + + credentials = import_api_response["Credentials"] + access_key = credentials["AccessKeyId"] + secret_key = credentials["SecretAccessKey"] + session_token = credentials["SessionToken"] + + upload_task_id = import_api_response["uploadTaskId"] + + minio = Minio( + endpoint, + access_key=access_key, + secret_key=secret_key, + session_token=session_token, + ) + + return minio + # return endpoint, access_key, secret_key, session_token, upload_task_id diff --git a/kern/api_calls.py b/kern/api_calls.py index fcfd0a9..3a7d103 100644 --- a/kern/api_calls.py +++ b/kern/api_calls.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import json from json.decoder import JSONDecodeError import pkg_resources from kern import exceptions @@ -36,6 +37,8 @@ def _handle_response(response: requests.Response) -> str: status_code = response.status_code if status_code == 200: json_data = response.json() + if type(json_data) == str: + json_data = json.loads(json_data) return json_data else: try: diff --git a/kern/settings.py b/kern/settings.py index 5e5da24..eac58c8 100644 --- a/kern/settings.py +++ b/kern/settings.py @@ -24,6 +24,10 @@ def get_authentication_url() -> str: return f"{BASE_URI}/.ory/kratos/public/self-service/login/api" +def get_config_url(): + return f"{BASE_URI}/api/config/" + + def get_project_url(project_id: str): return f"{BASE_URI}/api/project/{project_id}" @@ -34,3 +38,7 @@ def get_records_url(project_id: str): def get_export_url(project_id: str) -> str: return f"{get_project_url(project_id)}/export" + + +def get_import_url(project_id: str) -> str: + return f"{get_project_url(project_id)}/import" From 644cbc596c3822d69e472f6dab8ca0ad5e8e23a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Mon, 16 May 2022 23:49:07 +0200 Subject: [PATCH 6/8] adds minio --- requirements.txt | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/requirements.txt b/requirements.txt index 45f9731..a0c2849 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,19 +1,83 @@ +appnope==0.1.3 +argon2-cffi==21.3.0 +argon2-cffi-bindings==21.2.0 +asttokens==2.0.5 +attrs==21.4.0 +backcall==0.2.0 +beautifulsoup4==4.11.1 black==22.3.0 +bleach==5.0.0 certifi==2021.10.8 +cffi==1.15.0 charset-normalizer==2.0.12 click==8.1.3 +debugpy==1.6.0 +decorator==5.1.1 +defusedxml==0.7.1 +entrypoints==0.4 +executing==0.8.3 +fastjsonschema==2.15.3 idna==3.3 +ipykernel==6.13.0 +ipython==8.3.0 +ipython-genutils==0.2.0 +ipywidgets==7.7.0 +jedi==0.18.1 +Jinja2==3.1.2 +jsonschema==4.5.1 +jupyter==1.0.0 +jupyter-client==7.3.1 +jupyter-console==6.4.3 +jupyter-core==4.10.0 +jupyterlab-pygments==0.2.2 +jupyterlab-widgets==1.1.0 +kern-python-client @ file:///Users/jhoetter/repos/kern-python +MarkupSafe==2.1.1 +matplotlib-inline==0.1.3 +minio==7.1.8 +mistune==0.8.4 mypy-extensions==0.4.3 +nbclient==0.6.3 +nbconvert==6.5.0 +nbformat==5.4.0 +nest-asyncio==1.5.5 +notebook==6.4.11 numpy==1.22.3 +packaging==21.3 pandas==1.4.2 +pandocfilters==1.5.0 +parso==0.8.3 pathspec==0.9.0 +pexpect==4.8.0 +pickleshare==0.7.5 platformdirs==2.5.2 +prometheus-client==0.14.1 +prompt-toolkit==3.0.29 +psutil==5.9.0 +ptyprocess==0.7.0 +pure-eval==0.2.2 +pycparser==2.21 +Pygments==2.12.0 +pyparsing==3.0.9 +pyrsistent==0.18.1 python-dateutil==2.8.2 pytz==2022.1 +pyzmq==22.3.0 +qtconsole==5.3.0 +QtPy==2.1.0 requests==2.27.1 +Send2Trash==1.8.0 six==1.16.0 +soupsieve==2.3.2.post1 +stack-data==0.2.0 +terminado==0.15.0 tinycss2==1.1.1 tomli==2.0.1 +tornado==6.1 +traitlets==5.2.1.post0 typing_extensions==4.2.0 urllib3==1.26.9 wasabi==0.9.1 +wcwidth==0.2.5 +webencodings==0.5.1 +widgetsnbextension==3.6.0 From 0f0d97b58a9beb3b12bf5eb477c632a0a9897375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Tue, 17 May 2022 13:05:12 +0200 Subject: [PATCH 7/8] unfinished file upload --- kern/__init__.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/kern/__init__.py b/kern/__init__.py index 6e93900..6ba9b9d 100644 --- a/kern/__init__.py +++ b/kern/__init__.py @@ -5,7 +5,6 @@ from kern import authentication, api_calls, settings, exceptions from typing import Optional import json -from minio import Minio class Client: @@ -81,7 +80,7 @@ def post_file_import(self, upload_from: str): import_file_options = None config_url = settings.get_config_url() config_api_response = api_calls.get_request(config_url, self.session_token) - endpoint = config_api_response["KERN_S3_ENDPOINT"].replace("http://", "") + endpoint = config_api_response["KERN_S3_ENDPOINT"] import_url = settings.get_import_url(self.project_id) import_api_response = api_calls.post_request( @@ -100,13 +99,4 @@ def post_file_import(self, upload_from: str): session_token = credentials["SessionToken"] upload_task_id = import_api_response["uploadTaskId"] - - minio = Minio( - endpoint, - access_key=access_key, - secret_key=secret_key, - session_token=session_token, - ) - - return minio - # return endpoint, access_key, secret_key, session_token, upload_task_id + return endpoint, access_key, secret_key, session_token, upload_task_id From 3f2016fc84d6576297c7ed5d999e8b0d18552f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20H=C3=B6tter?= Date: Wed, 18 May 2022 09:37:19 +0200 Subject: [PATCH 8/8] version 0.0.3 --- README.md | 21 ++++++++++++---- kern/__init__.py | 62 ++++++++++++++++++++++++++---------------------- setup.py | 2 +- 3 files changed, 52 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 4335185..e83573b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![kern-python](https://uploads-ssl.webflow.com/61e47fafb12bd56b40022a49/62766400bd3c57b579d289bf_kern-python%20Banner.png) [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) -[![pypi 0.0.1](https://img.shields.io/badge/pypi-0.0.1-yellow.svg)](https://pypi.org/project/kern-python-client/0.0.1/) +[![pypi 0.0.3](https://img.shields.io/badge/pypi-0.0.3-yellow.svg)](https://pypi.org/project/kern-sdk/0.0.3/) # Kern AI API for Python @@ -8,7 +8,7 @@ This is the official Python SDK for Kern AI, your IDE for programmatic data enri ## Installation -You can set up this library via either running `$ pip install kern-sdk`, or via cloning this repository and running `$ pip install -r requirements.txt` in your repository. +You can set up this library via either running `$ pip install kern-sdk`, or via cloning this repository and running `$ pip install -r requirements.txt` in this repository. ## Usage Once you installed the package, you can access the application from any Python terminal as follows: @@ -25,11 +25,23 @@ client = Client(username, password, project_id) # client = Client(username, password, project_id, uri="http://localhost:4455") ``` +Alternatively, you can provide a `secrets.json` file in your repository, looking as follows: +```json +{ + "user_name": "your-username", + "password": "your-password", + "project_id": "your-project-id" +} +``` +Again, if you run on your local machine, you should provide also `"uri": "http://localhost:4455"`. + Now, you can easily fetch the data from your project: ```python -df = client.fetch_export() +df = client.get_record_export() ``` +Alternatively, you can also just run `kern pull` in your CLI given that you have provided the `secrets.json` file. + The `df` contains data of the following scheme: - all your record attributes are stored as columns, e.g. `headline` or `running_id` if you uploaded records like `{"headline": "some text", "running_id": 1234}` - per labeling task three columns: @@ -41,7 +53,8 @@ With the `client`, you easily integrate your data into any kind of system; may i ## Roadmap - [ ] Register information sources via wrappers -- [ ] Fetch project statistics +- [ ] Add project upload +- [x] Fetch project statistics If you want to have something added, feel free to open an [issue](https://github.com/code-kern-ai/kern-python/issues). diff --git a/kern/__init__.py b/kern/__init__.py index 6ba9b9d..0aaaed7 100644 --- a/kern/__init__.py +++ b/kern/__init__.py @@ -3,7 +3,7 @@ from wasabi import msg import pandas as pd from kern import authentication, api_calls, settings, exceptions -from typing import Optional +from typing import Optional, Dict import json @@ -35,7 +35,7 @@ def __init__( self.project_id = project_id @classmethod - def from_secrets_file(cls, path_to_file): + def from_secrets_file(cls, path_to_file: str): with open(path_to_file, "r") as file: content = json.load(file) uri = content.get("uri") @@ -48,7 +48,12 @@ def from_secrets_file(cls, path_to_file): uri=uri, ) - def get_project_details(self): + def get_project_details(self) -> Dict[str, str]: + """Collect high-level information about your project: name, description, and tokenizer + + Returns: + Dict[str, str]: dictionary containing the above information + """ url = settings.get_project_url(self.project_id) api_response = api_calls.get_request(url, self.session_token) return api_response @@ -62,7 +67,7 @@ def get_record_export( num_samples (Optional[int], optional): If set, only the first `num_samples` records are collected. Defaults to None. Returns: - pd.DataFrame: DataFrame containing your record data. For more details, see https://docs.kern.ai + pd.DataFrame: DataFrame containing your record data. """ url = settings.get_export_url(self.project_id) api_response = api_calls.get_request( @@ -74,29 +79,30 @@ def get_record_export( msg.good(f"Downloaded export to {download_to}") return df - def post_file_import(self, upload_from: str): - upload_from = f"{upload_from}_SCALE" - file_type = "records" - import_file_options = None - config_url = settings.get_config_url() - config_api_response = api_calls.get_request(config_url, self.session_token) - endpoint = config_api_response["KERN_S3_ENDPOINT"] - - import_url = settings.get_import_url(self.project_id) - import_api_response = api_calls.post_request( - import_url, - { - "file_name": upload_from, - "file_type": file_type, - "import_file_options": import_file_options, - }, - self.session_token, - ) + # TODO: issue #6 + # def post_file_import(self, upload_from: str): + # upload_from = f"{upload_from}_SCALE" + # file_type = "records" + # import_file_options = None + # config_url = settings.get_config_url() + # config_api_response = api_calls.get_request(config_url, self.session_token) + # endpoint = config_api_response["KERN_S3_ENDPOINT"] + + # import_url = settings.get_import_url(self.project_id) + # import_api_response = api_calls.post_request( + # import_url, + # { + # "file_name": upload_from, + # "file_type": file_type, + # "import_file_options": import_file_options, + # }, + # self.session_token, + # ) - credentials = import_api_response["Credentials"] - access_key = credentials["AccessKeyId"] - secret_key = credentials["SecretAccessKey"] - session_token = credentials["SessionToken"] + # credentials = import_api_response["Credentials"] + # access_key = credentials["AccessKeyId"] + # secret_key = credentials["SecretAccessKey"] + # session_token = credentials["SessionToken"] - upload_task_id = import_api_response["uploadTaskId"] - return endpoint, access_key, secret_key, session_token, upload_task_id + # upload_task_id = import_api_response["uploadTaskId"] + # return endpoint, access_key, secret_key, session_token, upload_task_id diff --git a/setup.py b/setup.py index b9647ea..1587d92 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="kern-sdk", - version="0.0.2", + version="0.0.3", author="jhoetter", author_email="johannes.hoetter@kern.ai", description="Official SDK for the Kern AI API",