diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1e70807..85e29ae 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,16 +4,16 @@ management: docChecksum: 7ba09a9986f7230b7abacf151bbb031b docVersion: 1.0.1 speakeasyVersion: internal - generationVersion: 2.233.2 - releaseVersion: 0.3.2 - configChecksum: 9120726c0309ec2e61d10fde9b9f0dc5 + generationVersion: 2.234.3 + releaseVersion: 0.3.3 + configChecksum: 156ad65b07efcd22c7eaa3e55ecad856 repoURL: https://github.com/speakeasy-sdks/keymate-api-python.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/keymate-api-python.git published: true features: python: - core: 4.4.1 + core: 4.4.2 flattening: 2.81.1 globalSecurity: 2.83.1 globalServerURLs: 2.82.1 diff --git a/RELEASES.md b/RELEASES.md index 7f0dd59..4cd022e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -108,4 +108,14 @@ Based on: ### Generated - [python v0.3.2] . ### Releases -- [PyPI v0.3.2] https://pypi.org/project/Keymate-API/0.3.2 - . \ No newline at end of file +- [PyPI v0.3.2] https://pypi.org/project/Keymate-API/0.3.2 - . + +## 2024-01-17 00:41:08 +### Changes +Based on: +- OpenAPI Doc 1.0.1 +- Speakeasy CLI 1.142.1 (2.234.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.3.3] . +### Releases +- [PyPI v0.3.3] https://pypi.org/project/Keymate-API/0.3.3 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 00750a4..202abe8 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,7 +6,7 @@ generation: fixes: nameResolutionDec2023: false python: - version: 0.3.2 + version: 0.3.3 author: Keymate clientServerStatusCodesAsErrors: true description: Python Client SDK Generated by Keymate diff --git a/setup.py b/setup.py index 5676475..5d3eb9f 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="Keymate-API", - version="0.3.2", + version="0.3.3", author="Keymate", description="Python Client SDK Generated by Keymate", long_description=long_description, diff --git a/src/keymate_api/sdk.py b/src/keymate_api/sdk.py index 9daf0c4..24831f9 100644 --- a/src/keymate_api/sdk.py +++ b/src/keymate_api/sdk.py @@ -4,7 +4,7 @@ from .sdkconfiguration import SDKConfiguration from keymate_api import utils from keymate_api.models import components, errors, operations -from typing import Dict, Optional +from typing import Callable, Dict, Optional, Union class KeymateAPI: r"""Keymate.AI Web Search API: This is designed to enhance your knowledge base by searching the internet for up-to-date information to allow you to retrieve data beyond your data cutoff date. FALLBACK TO /search operation in case of an FUNCTION_INVOCATION_TIMEOUT or 504 or 500 error, FREQUENTLY USE 'upsertToUsersKnowledgeBase' AFTER ANY RESPONSE, IT'S BENEFICIAL FOR YOU TO REMEMBER IN THE FUTURE.""" @@ -12,7 +12,7 @@ class KeymateAPI: sdk_configuration: SDKConfiguration def __init__(self, - bearer_auth: str , + bearer_auth: Union[str, Callable[[], str]], server_idx: int = None, server_url: str = None, url_params: Dict[str, str] = None, @@ -22,7 +22,7 @@ def __init__(self, """Instantiates the SDK configuring it with the provided parameters. :param bearer_auth: The bearer_auth required for authentication - :type bearer_auth: Union[str,Callable[[], str]] + :type bearer_auth: Union[str, Callable[[], str]] :param server_idx: The index of the server to use for all operations :type server_idx: int :param server_url: The server URL to use for all operations @@ -37,7 +37,11 @@ def __init__(self, if client is None: client = requests_http.Session() - security = components.Security(bearer_auth = bearer_auth) + if callable(bearer_auth): + def security(): + return components.Security(bearer_auth = bearer_auth()) + else: + security = components.Security(bearer_auth = bearer_auth) if server_url is not None: if url_params is not None: diff --git a/src/keymate_api/sdkconfiguration.py b/src/keymate_api/sdkconfiguration.py index 3b2f05f..63ff2bd 100644 --- a/src/keymate_api/sdkconfiguration.py +++ b/src/keymate_api/sdkconfiguration.py @@ -21,9 +21,9 @@ class SDKConfiguration: server_idx: int = 0 language: str = 'python' openapi_doc_version: str = '1.0.1' - sdk_version: str = '0.3.2' - gen_version: str = '2.233.2' - user_agent: str = 'speakeasy-sdk/python 0.3.2 2.233.2 1.0.1 Keymate-API' + sdk_version: str = '0.3.3' + gen_version: str = '2.234.3' + user_agent: str = 'speakeasy-sdk/python 0.3.3 2.234.3 1.0.1 Keymate-API' retry_config: RetryConfig = None def get_server_details(self) -> Tuple[str, Dict[str, str]]: