From a3e454352dbf1a4cf1ca56593af903834d43bc90 Mon Sep 17 00:00:00 2001 From: ea-mtenhoor Date: Sun, 14 Jan 2024 16:30:58 -0600 Subject: [PATCH 1/2] Make api_mode optional --- edfi_api_client/edfi_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edfi_api_client/edfi_client.py b/edfi_api_client/edfi_client.py index 8a2e1ec..cf3e753 100644 --- a/edfi_api_client/edfi_client.py +++ b/edfi_api_client/edfi_client.py @@ -93,7 +93,7 @@ def __repr__(self): (Un)Authenticated Ed-Fi(2/3) Client [{api_mode}] """ _session_string = "Authenticated" if self.session else "Unauthenticated" - _api_mode = util.snake_to_camel(self.api_mode) + _api_mode = util.snake_to_camel(self.api_mode) if self.api_mode else "None" if self.api_year: _api_mode += f" {self.api_year}" @@ -129,14 +129,14 @@ def get_info(self) -> dict: return requests.get(self.base_url, verify=self.verify_ssl).json() - def get_api_mode(self) -> str: + def get_api_mode(self) -> Optional[str]: """ Retrieve api_mode from the metadata exposed at the API root. :return: """ api_mode = self.get_info().get('apiMode') - return util.camel_to_snake(api_mode) + return util.camel_to_snake(api_mode) if api_mode else None def get_ods_version(self) -> Optional[str]: From 33f4f827b3436165c2a6d540f15f0d0104add9ed Mon Sep 17 00:00:00 2001 From: Jay Kaiser Date: Tue, 30 Jan 2024 12:52:12 -0600 Subject: [PATCH 2/2] Update setup.py Increment patch version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c218fb8..1881123 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name='edfi_api_client', - version='0.2.0', + version='0.2.1', description='Ed-Fi API client and tools', license_files=['LICENSE'], url='https://github.com/edanalytics/edfi_api_client',