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]: 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',